generator-jhipster: Jhipster tutorial application crashes when I access from the browser.
Overview of the issue
I followed the video tutorial using the default options for jhipster. The application built and starts up without an error. However, when I try to access the application at http://localhost:8080, I get the following stack trace:
Application 'dipity' is running! Access URLs:
Local: http://localhost:8080/
External: http://192.168.1.78:8080/
Profile(s): [dev, api-docs]
2022-04-21 22:11:08.689 ERROR 16740 — [ XNIO-1 task-2] io.undertow.request : UT005023: Exception handling request to /index.html
org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class org.xnio.conduits.Conduits at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1082) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) at javax.servlet.http.HttpServlet.service(HttpServlet.java:497) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) at javax.servlet.http.HttpServlet.service(HttpServlet.java:584) at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74) at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
Motivation for or Use Case
I am trying to evaluate jhipster for a project, but can’t get the tutorial application to work.
Reproduce the error
- Follow the steps in the tutorial on Windows 11.
- Run the application using ./mvnw
- Access the app from your browser…
Related issues
n/a
Suggest a Fix
n/a
JHipster Version(s)
7.8.1
JHipster configuration
PS C:\jhipster\dipity> jhipster version INFO! Switching to JHipster installed locally in current project’s node repository (node_modules) version is not a known command. See ‘jhipster --help’. PS C:\jhipster\dipity> jhipster info INFO! Switching to JHipster installed locally in current project’s node repository (node_modules)
██╗ ██╗ ██╗ ████████╗ ███████╗ ██████╗ ████████╗ ████████╗ ███████╗
██║ ██║ ██║ ╚══██╔══╝ ██╔═══██╗ ██╔════╝ ╚══██╔══╝ ██╔═════╝ ██╔═══██╗
██║ ████████║ ██║ ███████╔╝ ╚█████╗ ██║ ██████╗ ███████╔╝
██╗ ██║ ██╔═══██║ ██║ ██╔════╝ ╚═══██╗ ██║ ██╔═══╝ ██╔══██║ ╚██████╔╝ ██║ ██║ ████████╗ ██║ ██████╔╝ ██║ ████████╗ ██║ ╚██╗ ╚═════╝ ╚═╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═╝ https://www.jhipster.tech Welcome to JHipster v7.8.1
Welcome to the JHipster Information Sub-Generator
JHipster Version(s)
dipity@0.0.1-SNAPSHOT C:\jhipster\dipity
`-- (empty)
JHipster configuration, a .yo-rc.json file generated in the root folder
.yo-rc.json file
{
"generator-jhipster": {
"applicationType": "monolith",
"authenticationType": "jwt",
"baseName": "dipity",
"blueprints": [],
"buildTool": "maven",
"cacheProvider": "ehcache",
"clientFramework": "angularX",
"clientPackageManager": "npm",
"clientTheme": "none",
"clientThemeVariant": "",
"creationTimestamp": 1650602888302,
"databaseType": "sql",
"devDatabaseType": "mysql",
"devServerPort": 4200,
"dtoSuffix": "DTO",
"enableGradleEnterprise": false,
"enableHibernateCache": true,
"enableSwaggerCodegen": false,
"enableTranslation": true,
"entitySuffix": "",
"jhiPrefix": "jhi",
"jhipsterVersion": "7.8.1",
"jwtSecretKey": "YourJWTSecretKeyWasReplacedByThisMeaninglessTextByTheJHipsterInfoCommandForObviousSecurityReasons",
"languages": ["en", "es"],
"messageBroker": false,
"nativeLanguage": "en",
"otherModules": [],
"packageName": "com.barry.dipity",
"pages": [],
"prodDatabaseType": "mysql",
"reactive": false,
"searchEngine": false,
"serverPort": "8080",
"serverSideOptions": [],
"serviceDiscoveryType": "no",
"skipCheckLengthOfIdentifier": false,
"skipFakeData": false,
"skipUserManagement": false,
"testFrameworks": [],
"websocket": false,
"withAdminUi": true
}
}
JDL for the Entity configuration(s) entityName.json files generated in the .jhipster directory
JDL entity definitions
Environment and Tools
java version “17.0.3” 2022-04-19 LTS Java™ SE Runtime Environment (build 17.0.3+8-LTS-111) Java HotSpot™ 64-Bit Server VM (build 17.0.3+8-LTS-111, mixed mode, sharing)
git version 2.29.2.windows.3
node: v14.15.1
npm: 6.14.8
Entity configuration(s) entityName.json files generated in the .jhipster directory
None. No entities.
Browsers and Operating System
Chrome. Windows 11.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 41 (11 by maintainers)
I tried on Parallels and Windows 11. After installing Git and Java 11 from https://adoptium.net, I cloned the repo, set up JAVA_HOME and ran
mvnw. When I tried to access it in Microsoft Edge, the app does indeed crash and there is a stack trace in my console. This appears to be caused by Undertow. If I change all instances of “undertow” to “tomcat” inpom.xml, it fixes it.I’ll try with Windows Subsystem for Linux to see if it works w/o these changes.
Hi, ThePoipoi
add this option to your vm options.
-Djdk.io.File.enableADS=true
ref https://www.oracle.com/java/technologies/javase/11-0-15-1-relnotes.html#JDK-8285660
It’s possible this is a related issue: https://issues.redhat.com/browse/WFLY-16284
Perfect, it’s working !!! Thanks a lot 😃 For those who want to know, I had to add it in VM option of the run configuration, like that: