Giter Site home page Giter Site logo

joinfaces-gradle-jar-example's Issues

Errors with Spring Boot container images

I cloned this project and checked out the last 4.x version
I bumped the version to 4.7.17
I executed ./gradlew bootRun
Visiting http://localhost:8080 resulted in 404
Visiting http://localhost:8080/index.faces resulted on the expected response.

I then executed ./gradlew bootBuildImage and docker run -p 8080:8080 library/joinfaces-gradle-jar-example
The application launched.
Visiting http://localhost:8080/index.faces resulted in:

java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config
	at com.sun.faces.application.view.JspViewHandlingStrategy.executePageToBuildView(JspViewHandlingStrategy.java:337) ~[jakarta.faces-2.3.21.jar:2.3.21]
	at com.sun.faces.application.view.JspViewHandlingStrategy.buildView(JspViewHandlingStrategy.java:106) ~[jakarta.faces-2.3.21.jar:2.3.21]
	at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:78) ~[jakarta.faces-2.3.21.jar:2.3.21]
	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:76) ~[jakarta.faces-2.3.21.jar:2.3.21]
	at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:199) [jakarta.faces-2.3.21.jar:2.3.21]
	at javax.faces.webapp.FacesServlet.executeLifecyle(FacesServlet.java:708) [jakarta.faces-2.3.21.jar:2.3.21]
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:451) [jakarta.faces-2.3.21.jar:2.3.21]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:209) [tomcat-embed-core-9.0.82.jar:9.0.82]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) [tomcat-embed-core-9.0.82.jar:9.0.82]
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51) [tomcat-embed-websocket-9.0.82.jar:9.0.82]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) [tomcat-embed-core-9.0.82.jar:9.0.82]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) [tomcat-embed-core-9.0.82.jar:9.0.82]
	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) [spring-web-5.3.30.jar:5.3.30]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) [spring-web-5.3.30.jar:5.3.30]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) [tomcat-embed-core-9.0.82.jar:9.0.82]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) [tomcat-embed-core-9.0.82.jar:9.0.82]
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) [spring-web-5.3.30.jar:5.3.30]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) [spring-web-5.3.30.jar:5.3.30]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) [tomcat-embed-core-9.0.82.jar:9.0.82]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) [tomcat-embed-core-9.0.82.jar:9.0.82]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:168) [tomcat-embed-core-9.0.82.jar:9.0.82]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90) [tomcat-embed-core-9.0.82.jar:9.0.82]
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:481) [tomcat-embed-core-9.0.82.jar:9.0.82]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:130) [tomcat-embed-core-9.0.82.jar:9.0.82]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93) [tomcat-embed-core-9.0.82.jar:9.0.82]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) [tomcat-embed-core-9.0.82.jar:9.0.82]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) [tomcat-embed-core-9.0.82.jar:9.0.82]
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:390) [tomcat-embed-core-9.0.82.jar:9.0.82]
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) [tomcat-embed-core-9.0.82.jar:9.0.82]
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:928) [tomcat-embed-core-9.0.82.jar:9.0.82]
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1794) [tomcat-embed-core-9.0.82.jar:9.0.82]
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) [tomcat-embed-core-9.0.82.jar:9.0.82]
	at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) [tomcat-embed-core-9.0.82.jar:9.0.82]
	at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) [tomcat-embed-core-9.0.82.jar:9.0.82]
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-9.0.82.jar:9.0.82]
	at java.lang.Thread.run(Thread.java:750) [na:1.8.0_372]
Caused by: java.lang.ClassNotFoundException: javax.servlet.jsp.jstl.core.Config
	at java.net.URLClassLoader.findClass(URLClassLoader.java:387) ~[na:1.8.0_372]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:418) ~[na:1.8.0_372]
	at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:135) ~[workspace/:na]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[na:1.8.0_372]
	... 36 common frames omitted

After adding the dependency for JSTL as follows implementation 'jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api' I receive no error messages but only response 404.

Visiting http://localhost:8080/index.xhtml also results in 404 and the following in the log:

2023-10-21 13:26:29.927 DEBUG 1 --- [nio-8080-exec-4] o.a.c.authenticator.AuthenticatorBase    : Security checking request GET /index.xhtml
2023-10-21 13:26:29.927 DEBUG 1 --- [nio-8080-exec-4] org.apache.catalina.realm.RealmBase      :   No applicable constraints defined
2023-10-21 13:26:29.928 DEBUG 1 --- [nio-8080-exec-4] o.a.c.authenticator.AuthenticatorBase    : Not subject to any constraint
2023-10-21 13:26:29.928 DEBUG 1 --- [nio-8080-exec-4] j.e.r.webcontainer.jsf.application       : servletPath /index.xhtml
2023-10-21 13:26:29.928 DEBUG 1 --- [nio-8080-exec-4] j.e.r.webcontainer.jsf.application       : pathInfo null
2023-10-21 13:26:29.928 DEBUG 1 --- [nio-8080-exec-4] j.e.r.webcontainer.jsf.application       : URL pattern of the FacesServlet executing the current request .xhtml
2023-10-21 13:26:29.928 DEBUG 1 --- [nio-8080-exec-4] j.e.resource.webcontainer.jsf.lifecycle  : execute(com.sun.faces.context.FacesContextImpl@29598fcb)
2023-10-21 13:26:29.929 DEBUG 1 --- [nio-8080-exec-4] j.e.resource.webcontainer.jsf.lifecycle  : Entering RestoreViewPhase
2023-10-21 13:26:29.929 DEBUG 1 --- [nio-8080-exec-4] j.e.r.webcontainer.jsf.application       : Created component with component type of 'javax.faces.ViewRoot'
2023-10-21 13:26:29.929 DEBUG 1 --- [nio-8080-exec-4] org.apache.tomcat.util.http.Parameters   : Set encoding to UTF-8
2023-10-21 13:26:29.929 DEBUG 1 --- [nio-8080-exec-4] j.e.r.webcontainer.jsf.application       : Created component with component type of 'javax.faces.ViewRoot'
2023-10-21 13:26:29.929 DEBUG 1 --- [nio-8080-exec-4] j.e.r.webcontainer.jsf.application       : Created component with component type of 'javax.faces.ViewRoot'
2023-10-21 13:26:29.929 DEBUG 1 --- [nio-8080-exec-4] j.e.resource.webcontainer.jsf.lifecycle  : New request: creating a view for /index.xhtml
2023-10-21 13:26:29.929 DEBUG 1 --- [nio-8080-exec-4] j.e.r.webcontainer.jsf.application       : URL pattern of the FacesServlet executing the current request .xhtml
2023-10-21 13:26:29.929 DEBUG 1 --- [nio-8080-exec-4] j.e.r.webcontainer.jsf.application       : URL pattern of the FacesServlet executing the current request .xhtml
2023-10-21 13:26:29.929 DEBUG 1 --- [nio-8080-exec-4] j.e.r.webcontainer.jsf.application       : Created component with component type of 'javax.faces.ViewRoot'
2023-10-21 13:26:29.929 DEBUG 1 --- [nio-8080-exec-4] j.e.r.webcontainer.jsf.application       : Created new view for /index.xhtml
2023-10-21 13:26:29.929 DEBUG 1 --- [nio-8080-exec-4] j.e.r.webcontainer.jsf.application       : Locale for this view as determined by calculateLocale en_US
2023-10-21 13:26:29.930 DEBUG 1 --- [nio-8080-exec-4] j.e.r.webcontainer.jsf.application       : Created component with component type of 'javax.faces.ViewRoot'
2023-10-21 13:26:29.930 DEBUG 1 --- [nio-8080-exec-4] j.e.r.webcontainer.jsf.application       : RenderKitId for this view as determined by calculateRenderKitId HTML_BASIC
2023-10-21 13:26:29.930 DEBUG 1 --- [nio-8080-exec-4] j.e.r.webcontainer.jsf.facelets.factory  : Resource-Url from external context: null
2023-10-21 13:26:29.930 DEBUG 1 --- [nio-8080-exec-4] j.e.r.webcontainer.jsf.facelets.factory  : Resource-Url from external context: null
2023-10-21 13:26:29.931 DEBUG 1 --- [nio-8080-exec-4] j.e.resource.webcontainer.jsf.lifecycle  : Exiting RestoreViewPhase
2023-10-21 13:26:29.931 DEBUG 1 --- [nio-8080-exec-4] j.e.resource.webcontainer.jsf.timing     :  [TIMING] - [2ms] : Execution time for phase (including any PhaseListeners) -> RESTORE_VIEW 1
2023-10-21 13:26:29.931 DEBUG 1 --- [nio-8080-exec-4] j.e.resource.webcontainer.jsf.lifecycle  : render(com.sun.faces.context.FacesContextImpl@29598fcb)
2023-10-21 13:26:29.931 DEBUG 1 --- [nio-8080-exec-4] o.a.coyote.http11.Http11InputBuffer      : Before fill(): parsingHeader: [true], parsingRequestLine: [true], parsingRequestLinePhase: [0], parsingRequestLineStart: [0], byteBuffer.position(): [0], byteBuffer.limit(): [0], end: [553]
2023-10-21 13:26:29.931 DEBUG 1 --- [nio-8080-exec-4] o.a.tomcat.util.net.SocketWrapperBase    : Socket: [org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper@23a1e4bb:org.apache.tomcat.util.net.NioChannel@41b95094:java.nio.channels.SocketChannel[connected local=/172.17.0.2:8080 remote=/172.17.0.1:58076]], Read from buffer: [0]
2023-10-21 13:26:29.931 DEBUG 1 --- [nio-8080-exec-4] org.apache.tomcat.util.net.NioEndpoint   : Socket: [org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper@23a1e4bb:org.apache.tomcat.util.net.NioChannel@41b95094:java.nio.channels.SocketChannel[connected local=/172.17.0.2:8080 remote=/172.17.0.1:58076]], Read direct from socket: [0]
2023-10-21 13:26:29.931 DEBUG 1 --- [nio-8080-exec-4] o.a.coyote.http11.Http11InputBuffer      : Received []
2023-10-21 13:26:29.931 DEBUG 1 --- [nio-8080-exec-4] o.apache.coyote.http11.Http11Processor   : Socket: [org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper@23a1e4bb:org.apache.tomcat.util.net.NioChannel@41b95094:java.nio.channels.SocketChannel[connected local=/172.17.0.2:8080 remote=/172.17.0.1:58076]], Status in: [OPEN_READ], State out: [OPEN]
2023-10-21 13:26:29.932 DEBUG 1 --- [nio-8080-exec-4] org.apache.tomcat.util.net.NioEndpoint   : Registered read interest for [org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper@23a1e4bb:org.apache.tomcat.util.net.NioChannel@41b95094:java.nio.channels.SocketChannel[connected local=/172.17.0.2:8080 remote=/172.17.0.1:58076]]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.