generator-jhipster icon indicating copy to clipboard operation
generator-jhipster copied to clipboard

Jhipster tutorial application crashes when I access from the browser.

Open barry1cassidy opened this issue 3 years ago • 36 comments

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
  1. Follow the steps in the tutorial on Windows 11.
  2. Run the application using ./mvnw
  3. 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)
[email protected] 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(TM) SE Runtime Environment (build 17.0.3+8-LTS-111) Java HotSpot(TM) 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.

barry1cassidy avatar Apr 22 '22 05:04 barry1cassidy

i am facing the same problem .. Hope you a solution for that!

asmakhoualdia98 avatar Apr 27 '22 14:04 asmakhoualdia98

Nope. No solution yet. I've tried from scratch by changing a few choices, but I get the same error. I think it's a an incompatibly with Windows.

barry1cassidy avatar Apr 27 '22 16:04 barry1cassidy

What tutorial are you talking about? This one? https://www.youtube.com/watch?v=6lf64CctDAQ

mraible avatar Apr 27 '22 16:04 mraible

Yes. That's the one. Thanks.

barry1cassidy avatar Apr 27 '22 17:04 barry1cassidy

If you clone the repo, are you able to run it?

git clone https://github.com/mraible/jhipster7-demo.git

I'm trying to figure out if something broke in recent versions since everything worked when I created it with 7.0.1.

mraible avatar Apr 27 '22 17:04 mraible

I cloned the repo and it looks like I have a similar problem. Here are the first few lines of the stack trace:


    Application 'blog' is running! Access URLs:
    Local:          http://localhost:8080/
    External:       http://192.168.1.78:8080/
    Profile(s):     [dev, api-docs]

2022-04-27 11:30:33.913 ERROR 16668 --- [ XNIO-1 task-1] io.undertow.request : UT005023: Exception handling request to /index.html

org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.io.IOError: java.io.FileNotFoundException: Invalid file path at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1075) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:962) 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)

I'm using Java 17, so I had to change the requireJavaVersion entry in the POM.

barry1cassidy avatar Apr 27 '22 18:04 barry1cassidy

Any update please?

amalorayk avatar Apr 28 '22 11:04 amalorayk

I tried it on my MacBook Pro yesterday and had no issues. I can try on Windows today.

On Thu, Apr 28, 2022 at 05:56 amalorayk @.***> wrote:

Any update please?

— Reply to this email directly, view it on GitHub https://github.com/jhipster/generator-jhipster/issues/18440#issuecomment-1112114370, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAELZGZNP6EGWG7GTXFL7DVHJ4HBANCNFSM5UBFVQGA . You are receiving this because you commented.Message ID: @.***>

mraible avatar Apr 28 '22 12:04 mraible

I got the issue with the demo app and also with jhipster-registry, on windows.

amalorayk avatar Apr 28 '22 12:04 amalorayk

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" in pom.xml, it fixes it.

Screen Shot 2022-04-28 at 07 48 36

I'll try with Windows Subsystem for Linux to see if it works w/o these changes.

mraible avatar Apr 28 '22 13:04 mraible

It's possible this is a related issue: https://issues.redhat.com/browse/WFLY-16284

mraible avatar Apr 28 '22 14:04 mraible

Hi thanks a lot... I changed all instances of "undertow" to "tomcat" in pom.xml. I get errors ..What other thing I supposed to modify . I am working on a maven project.

asmakhoualdia98 avatar Apr 28 '22 16:04 asmakhoualdia98

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" in pom.xml, it fixes it.

Screen Shot 2022-04-28 at 07 48 36

I'll try with Windows Subsystem for Linux to see if it works w/o these changes.

This solution worked like a charm for me also. Thanks very much for your help.

barry1cassidy avatar Apr 28 '22 16:04 barry1cassidy

Changing all instances of undertow to tomcat in pom.xml worked perfectly for me. The app comes up, no errors. Thank you very much!

barry1cassidy avatar Apr 28 '22 16:04 barry1cassidy

Please what did you exactly change. I have the same issue.

Le jeu. 28 avr. 2022 à 5:55 PM, barry1cassidy @.***> a écrit :

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" in pom.xml, it fixes it. [image: Screen Shot 2022-04-28 at 07 48 36] https://user-images.githubusercontent.com/17892/165767241-489f20f6-a5fd-4830-8ca0-cac9cdd4ac83.png

I'll try with Windows Subsystem for Linux to see if it works w/o these changes.

This solution worked like a charm for me also. Thanks very much for your help.

— Reply to this email directly, view it on GitHub https://github.com/jhipster/generator-jhipster/issues/18440#issuecomment-1112441411, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVIWAEVBDJPQNP2OFBIVUXLVHK7IFANCNFSM5UBFVQGA . You are receiving this because you commented.Message ID: @.***>

asmakhoualdia98 avatar Apr 28 '22 16:04 asmakhoualdia98

Here's a PR that shows the changes:

https://github.com/mraible/jhipster7-demo/pull/8

You can clone it using:

git clone -b tomcat https://github.com/mraible/jhipster7-demo.git

mraible avatar Apr 28 '22 16:04 mraible

FWIW, I tried upgrading the project to use the latest JHipster 7.8.1 release and it still happens there.

2022-04-28 11:05:51.014 ERROR 4496 --- [  XNIO-1 task-1] io.undertow.request                      : UT005023: Exception handling request to /index.html

org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.io.IOError: java.io.FileNotFoundException: Invalid file path
        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)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)
        at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
        at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)
        at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
        at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)
        at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
        at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)
        at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
        at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
        at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
        at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
        at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)
        at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
        at io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(RedirectDirHandler.java:68)
        at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
        at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
        at io.undertow.servlet.handlers.SessionRestoringHandler.handleRequest(SessionRestoringHandler.java:119)
        at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:257)
        at io.undertow.servlet.handlers.ServletInitialHandler.dispatchToPath(ServletInitialHandler.java:182)
        at io.undertow.servlet.spec.RequestDispatcherImpl.forwardImpl(RequestDispatcherImpl.java:225)
        at io.undertow.servlet.spec.RequestDispatcherImpl.forwardImplSetup(RequestDispatcherImpl.java:147)
        at io.undertow.servlet.spec.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:110)
        at org.springframework.security.web.header.HeaderWriterFilter$HeaderWriterRequestDispatcher.forward(HeaderWriterFilter.java:170)
        at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:171)
        at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:316)
        at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1401)
        at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1145)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1084)
        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)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)
        at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
        at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)
        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)
        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
        at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122)
        at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
        at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)
        at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
        at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
        at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
        at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
        at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:150)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
        at com.mycompany.myapp.security.jwt.JWTFilter.doFilter(JWTFilter.java:37)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
        at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
        at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)
        at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
        at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)
        at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
        at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)
        at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
        at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
        at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)
        at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)
        at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
        at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
        at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
        at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
        at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
        at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
        at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
        at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
        at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:96)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
        at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
        at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
        at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
        at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
        at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
        at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
        at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)
        at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
        at io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(RedirectDirHandler.java:68)
        at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:117)
        at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
        at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
        at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
        at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
        at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
        at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
        at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
        at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
        at io.undertow.servlet.handlers.SendErrorPageHandler.handleRequest(SendErrorPageHandler.java:52)
        at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
        at io.undertow.servlet.handlers.SessionRestoringHandler.handleRequest(SessionRestoringHandler.java:119)
        at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:275)
        at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:79)
        at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:134)
        at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:131)
        at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
        at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
        at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:255)
        at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:79)
        at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:100)
        at io.undertow.server.Connectors.executeRootHandler(Connectors.java:387)
        at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:852)
        at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
        at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2019)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1558)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1423)
        at org.xnio.XnioWorker$WorkerThreadFactory$1$1.run(XnioWorker.java:1280)
        at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.io.IOError: java.io.FileNotFoundException: Invalid file path
        at org.xnio.conduits.Conduits$1.run(Conduits.java:237)
        at org.xnio.conduits.Conduits$1.run(Conduits.java:227)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at org.xnio.conduits.Conduits.<clinit>(Conduits.java:227)
        at io.undertow.conduits.AbstractFixedLengthStreamSinkConduit.writeFinal(AbstractFixedLengthStreamSinkConduit.java:175)
        at org.xnio.conduits.ConduitStreamSinkChannel.writeFinal(ConduitStreamSinkChannel.java:104)
        at io.undertow.channels.DetachableStreamSinkChannel.writeFinal(DetachableStreamSinkChannel.java:195)
        at io.undertow.server.HttpServerExchange$WriteDispatchChannel.writeFinal(HttpServerExchange.java:2171)
        at io.undertow.servlet.spec.ServletOutputStreamImpl.writeBufferBlocking(ServletOutputStreamImpl.java:582)
        at io.undertow.servlet.spec.ServletOutputStreamImpl.close(ServletOutputStreamImpl.java:619)
        at io.undertow.servlet.spec.ServletOutputStreamImpl.updateWritten(ServletOutputStreamImpl.java:372)
        at io.undertow.servlet.spec.ServletOutputStreamImpl.write(ServletOutputStreamImpl.java:154)
        at org.springframework.security.web.util.OnCommittedResponseWrapper$SaveContextServletOutputStream.write(OnCommittedResponseWrapper.java:638)
        at org.springframework.util.StreamUtils.copy(StreamUtils.java:167)
        at org.springframework.http.converter.ResourceHttpMessageConverter.writeContent(ResourceHttpMessageConverter.java:139)
        at org.springframework.http.converter.ResourceHttpMessageConverter.writeInternal(ResourceHttpMessageConverter.java:129)
        at org.springframework.http.converter.ResourceHttpMessageConverter.writeInternal(ResourceHttpMessageConverter.java:45)
        at org.springframework.http.converter.AbstractHttpMessageConverter.write(AbstractHttpMessageConverter.java:227)
        at org.springframework.web.servlet.resource.ResourceHttpRequestHandler.handleRequest(ResourceHttpRequestHandler.java:590)
        at org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle(HttpRequestHandlerAdapter.java:52)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)
        ... 143 common frames omitted
Caused by: java.io.FileNotFoundException: Invalid file path
        at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:231)
        at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:126)
        at org.xnio.conduits.Conduits$1.run(Conduits.java:232)
        ... 163 common frames omitted

mraible avatar Apr 28 '22 17:04 mraible

I follow this but I get this error: The container 'Maven Dependencies' references non existing library 'C:\Users\Asma.m2\repository\org\springframework\boot\spring-boot-starter-tomcat\2.6.6\spring-boot-starter-tomcat-2.6.6.jar' I get errors in pom.xml

asmakhoualdia98 avatar Apr 29 '22 09:04 asmakhoualdia98

I am working on Windows 10

asmakhoualdia98 avatar Apr 29 '22 10:04 asmakhoualdia98

@asmakhoualdia98 Did you try cloning the tomcat branch from my project? If so, and it still doesn't work, can you push your project to a GitHub repo?

FWIW, some people reported this issue happens on JDK 17.0.3, but not 17.0.2.

mraible avatar Apr 29 '22 13:04 mraible

Yes I try it but nothing changed. I push my projest to a GitHub repository. Here is the link: https://github.com/asmakhoualdia98/Jhipster_project/tree/master Thank you.

asmakhoualdia98 avatar Apr 29 '22 15:04 asmakhoualdia98

@asmakhoualdia98 It looks like there's a jhipster7-demo folder in your project. Is that intentional? Also, I don't see a .jhipster directory, which should exist if you cloned https://github.com/mraible/jhipster7-demo/tree/tomcat.

mraible avatar Apr 29 '22 15:04 mraible

No it is not intentional. It was generated with the whole project itself. ".jhipster" exists already in jhipster7-demo. I checked it.

asmakhoualdia98 avatar Apr 29 '22 15:04 asmakhoualdia98

I solve the problem. Actually, I deleted one of the following dependency from pom.xml. (There are 2 in my case) so there is 2 jars, and it works. Thanks for your time:

            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-tomcat</artifactId>
            </dependency> 

asmakhoualdia98 avatar May 01 '22 12:05 asmakhoualdia98

The extra dependency that I deleted was actually added due to issue #9175.

asmakhoualdia98 avatar May 01 '22 12:05 asmakhoualdia98

Hi,

I used the latest JHipster 7.8.1 release,

This issue happens on JDK 17.0.3, but not 17.0.2.

amalorayk avatar May 03 '22 21:05 amalorayk

I switched from undertow to tomcat. What worked for me was to add the

  • implementation "org.springframework.boot:spring-boot-starter-tomcat"
  • compileOnly group: 'javax.servlet', name: 'javax.servlet-api', version: '3.0.1' dependencies in gradle (same for maven), remove the tomcat exclusions (from both configuration and dependencies) and remove the undertow dependency.

Also had to instantiate manually the ServletWebServerFactory bean (in main class; the one annotated with @ SpringBootApplication)

    @Bean
    public ServletWebServerFactory servletWebServerFactory() {
        return new TomcatServletWebServerFactory();
    }

dragossas avatar May 04 '22 11:05 dragossas

Hi, I have same issue in windows with latest version JHipster (7.8.1) and I used open JDK 11

Allenkc avatar May 31 '22 13:05 Allenkc

Changing undertow to tomcat in the pom file also fixed it for me. There are two places, one seems to be some eclipse fix but changed it everywhere to be sure. spring-boot-starter-undertow became spring-boot-starter-tomcat . Did an "mvn clean install" and pressed the refresh maven button in the pom file in intelij.

This started happening on a fresh install on a laptop on windows 10. I didn't have the issue on my desktop. My java version on the laptop is java version "11.0.15" 2022-04-19 LTS Java(TM) SE Runtime Environment 18.9 (build 11.0.15+8-LTS-149) Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.15+8-LTS-149, mixed mode)

I can't check my java version on my desktop but I'm guessing it's slightly older.

liviuoprisan avatar Jun 02 '22 08:06 liviuoprisan

I have same issue in windows with latest version JHipster (7.8.1). It's working fine on macos and linux

dunfe avatar Jun 19 '22 16:06 dunfe