spring-petclinic / spring-framework-petclinic

A Spring Framework application based on JSP, Spring MVC, Spring Data JPA, Hibernate and JDBC

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to deploy on Tomcat 10 server

madhinenidivya opened this issue · comments

Hi @madhinenidivya
Which version of Tomcat are you using?
The latest version of Spring Petclinic required Tomcat 10 (with the jakarta.* pakage support)

Having the same problem. Tested with 2 different instance of tomcat with Tomcat 10 and java 17 and 19. Both give the following error on startup.

org.apache.jasper.JasperException: The absolute uri: [http://java.sun.com/jsp/jstl/fmt] cannot be resolved in either web.xml or the jar files deployed with this application
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:54)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:294)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:81)
org.apache.jasper.compiler.TagLibraryInfoImpl.generateTldResourcePath(TagLibraryInfoImpl.java:251)
org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:122)
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:429)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:487)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1444)
org.apache.jasper.compiler.Parser.parse(Parser.java:138)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:244)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:105)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:206)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:391)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:367)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:351)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:603)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:399)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:380)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:328)
jakarta.servlet.http.HttpServlet.service(HttpServlet.java:777)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:171)
org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:314)
org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1415)
org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1159)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1098)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:974)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1011)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:903)
jakarta.servlet.http.HttpServlet.service(HttpServlet.java:668)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885)
jakarta.servlet.http.HttpServlet.service(HttpServlet.java:777)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
com.microsoft.azure.appservice.servlet5.filters.AppServiceFilter.doFilter(AppServiceFilter.java:57)
com.microsoft.azure.appservice.servlet5.EasyAuthFilter.doFilter(EasyAuthFilter.java:45)
Note The full stack trace of the root cause is available in the server logs.

I've got the same issue with Tomcat 10. Good catch. I'm not sure that Tomcat provides anymore the JSTL library implementation and maybe we have to add the org.glassfish.web:jakarta.servlet.jsp.jstl artifact. We have to check it. And by the way I don't understand why the sample is working with Jetty.

Should be fixed by #89

Could you test the patch please?

I close this issue. Please reopen if Tomcat deployment always failed.