Closed barry1cassidy closed 2 years ago
i am facing the same problem .. Hope you a solution for that!
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.
What tutorial are you talking about? This one? https://www.youtube.com/watch?v=6lf64CctDAQ
Yes. That's the one. Thanks.
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.
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.
Any update please?
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: @.***>
I got the issue with the demo app and also with jhipster-registry, on windows.
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.
I'll try with Windows Subsystem for Linux to see if it works w/o these changes.
It's possible this is a related issue: https://issues.redhat.com/browse/WFLY-16284
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.
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.
This solution worked like a charm for me also. Thanks very much for your help.
Changing all instances of undertow to tomcat in pom.xml worked perfectly for me. The app comes up, no errors. Thank you very much!
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: @.***>
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
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
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
I am working on Windows 10
@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.
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 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.
No it is not intentional. It was generated with the whole project itself. ".jhipster" exists already in jhipster7-demo. I checked it.
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>
The extra dependency that I deleted was actually added due to issue #9175.
Hi,
I used the latest JHipster 7.8.1 release,
This issue happens on JDK 17.0.3, but not 17.0.2.
I switched from undertow to tomcat. What worked for me was to add the
Also had to instantiate manually the ServletWebServerFactory bean (in main class; the one annotated with @ SpringBootApplication)
@Bean
public ServletWebServerFactory servletWebServerFactory() {
return new TomcatServletWebServerFactory();
}
Hi, I have same issue in windows with latest version JHipster (7.8.1) and I used open JDK 11
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.
I have same issue in windows with latest version JHipster (7.8.1). It's working fine on macos and linux
Hi Same issue here, and can't switch to Tomcat (for a lot of others Undertow dependancies)
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
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
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:
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
I tried but still get these error,
Solution! In my case, the issue is that the xnio version doesn't work on Windows 11.
Replace the first undertow dependency (spring-boot-starter-undertow) with the following and everything works fine. There is another mention of this on the Jboss thread somewhere. The issue is the version of jboss.xnio in use on latest doesn't work with Windows 11.
`
<artifactId>spring-boot-starter-undertow</artifactId>
<exclusions>
<exclusion>
<groupId>org.jboss.xnio</groupId>
<artifactId>xnio-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.xnio</groupId>
<artifactId>xnio-nio</artifactId>
</exclusion>
</exclusions>
`
I have expanded on the root cause of this issue on the following post: https://stackoverflow.com/a/72276869/3756780 The issue should be resolved in newer versions of spring-boot(-undertow), (which uses) xnio-api and/or the Java Runtime (depending on your platform).
Summary of my solution (please correct me if i'm wrong): upgrading to JHipster >= 7.9.0 should fix this problematic xnio-api dependency.
For me changing spring-boot-starter-undertow
=> spring-boot-starter-tomcat
in pom.xml works
Is there any updates please.
Le ven. 29 avr. 2022 à 4:49 PM, Matt Raible @.***> a écrit :
@asmakhoualdia98 https://github.com/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.
— Reply to this email directly, view it on GitHub https://github.com/jhipster/generator-jhipster/issues/18440#issuecomment-1113469091, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVIWAESHONKAXU3ZMLIPCSDVHQAKDANCNFSM5UBFVQGA . You are receiving this because you were mentioned.Message ID: @.***>
This is the error that I get
Le jeu. 28 avr. 2022 à 18:59, Matt Raible @.***> a écrit :
Here's a PR that shows the changes:
mraible/jhipster7-demo#8 https://github.com/mraible/jhipster7-demo/pull/8
You can clone it using:
git clone -b tomcat https://github.com/mraible/jhipster7-demo.git
— Reply to this email directly, view it on GitHub https://github.com/jhipster/generator-jhipster/issues/18440#issuecomment-1112445199, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVIWAEQM7KQD4WRI3T5KCW3VHK7YDANCNFSM5UBFVQGA . You are receiving this because you commented.Message ID: @.***>
Did you try my branch that uses Tomcat?
git clone -b tomcat https://github.com/mraible/jhipster7-demo.git
You can see the changes in https://github.com/mraible/jhipster7-demo/pull/8.
It works for me on macOS Monterey 12.6.
2022-10-11 13:13:03.989 INFO 40768 --- [ restartedMain] org.jhipster.blog.BlogApp : Started BlogApp in 3.798 seconds (JVM running for 4.042)
2022-10-11 13:13:03.994 INFO 40768 --- [ restartedMain] org.jhipster.blog.BlogApp :
----------------------------------------------------------
Application 'blog' is running! Access URLs:
Local: http://localhost:8080/
External: http://127.0.0.1:8080/
Profile(s): [dev, api-docs]
----------------------------------------------------------
I just tried the main
branch on Windows 11 (via Parallels) using Java 11.0.15. It does fail on the first request:
2022-10-11 13:20:53.324 ERROR 8608 --- [ 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.lang.NoClassDefFoundError: Could not initialize class org.xnio.conduits.Conduits
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)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:584)
If I switch to the tomcat
branch, everything works:
git checkout tomcat
mvnw
Since a workaround has been provided for Windows, I'm closing this issue.
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:
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
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)
JHipster configuration, a
.yo-rc.json
file generated in the root folder.yo-rc.json file
JDL for the Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryJDL 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
directoryNone. No entities.
Browsers and Operating System
Chrome. Windows 11.