Announcement Announcement Module
Collapse
No announcement yet.
pizza shop example can't run on tomcat 5.5.15 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • pizza shop example can't run on tomcat 5.5.15

    the Spring Roo 1.0 ,The Tutorial Roo Pizza Shop application,fine run on tomcat 6.0.20,but run on tomcat 5.5.15 ,it happen error:

    HTTP Status 500 -

    --------------------------------------------------------------------------------

    type Exception report

    message

    description The server encountered an internal error () that prevented it from fulfilling this request.

    exception

    org.apache.tiles.impl.CannotRenderException: ServletException including path '/WEB-INF/layouts/default.jspx'.
    org.apache.tiles.impl.BasicTilesContainer.render(B asicTilesContainer.java:691)
    org.apache.tiles.impl.BasicTilesContainer.render(B asicTilesContainer.java:643)
    org.apache.tiles.impl.BasicTilesContainer.render(B asicTilesContainer.java:626)
    org.apache.tiles.impl.BasicTilesContainer.render(B asicTilesContainer.java:322)
    org.springframework.web.servlet.view.tiles2.TilesV iew.renderMergedOutputModel(TilesView.java:100)
    org.springframework.web.servlet.view.AbstractView. render(AbstractView.java:250)
    org.springframework.web.servlet.DispatcherServlet. render(DispatcherServlet.java:1060)
    org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:798)
    org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:716)
    org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:647)
    org.springframework.web.servlet.FrameworkServlet.d oGet(FrameworkServlet.java:552)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:689)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
    org.tuckey.web.filters.urlrewrite.NormalRewrittenU rl.doRewrite(NormalRewrittenUrl.java:195)
    org.tuckey.web.filters.urlrewrite.RuleChain.handle Rewrite(RuleChain.java:159)
    org.tuckey.web.filters.urlrewrite.RuleChain.doRule s(RuleChain.java:141)
    org.tuckey.web.filters.urlrewrite.UrlRewriter.proc essRequest(UrlRewriter.java:90)
    org.tuckey.web.filters.urlrewrite.UrlRewriteFilter .doFilter(UrlRewriteFilter.java:417)
    org.springframework.web.filter.HiddenHttpMethodFil ter.doFilterInternal(HiddenHttpMethodFilter.java:7 1)
    org.springframework.web.filter.OncePerRequestFilte r.doFilter(OncePerRequestFilter.java:76)
    org.springframework.web.filter.CharacterEncodingFi lter.doFilterInternal(CharacterEncodingFilter.java :88)
    org.springframework.web.filter.OncePerRequestFilte r.doFilter(OncePerRequestFilter.java:76)
    org.springframework.web.filter.ShallowEtagHeaderFi lter.doFilterInternal(ShallowEtagHeaderFilter.java :57)
    org.springframework.web.filter.OncePerRequestFilte r.doFilter(OncePerRequestFilter.java:76)
    org.springframework.orm.jpa.support.OpenEntityMana gerInViewFilter.doFilterInternal(OpenEntityManager InViewFilter.java:113)
    org.springframework.web.filter.OncePerRequestFilte r.doFilter(OncePerRequestFilter.java:76)
    org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 344)
    org.springframework.security.web.access.intercept. FilterSecurityInterceptor.invoke(FilterSecurityInt erceptor.java:110)
    org.springframework.security.web.access.intercept. FilterSecurityInterceptor.doFilter(FilterSecurityI nterceptor.java:84)
    org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 356)
    org.springframework.security.web.access.ExceptionT ranslationFilter.doFilter(ExceptionTranslationFilt er.java:98)
    org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 356)
    org.springframework.security.web.session.SessionMa nagementFilter.doFilter(SessionManagementFilter.ja va:95)
    org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 356)
    org.springframework.security.web.authentication.An onymousAuthenticationFilter.doFilter(AnonymousAuth enticationFilter.java:79)
    org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 356)
    org.springframework.security.web.servletapi.Securi tyContextHolderAwareRequestFilter.doFilter(Securit yContextHolderAwareRequestFilter.java:55)
    org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 356)
    org.springframework.security.web.savedrequest.Requ estCacheAwareFilter.doFilter(RequestCacheAwareFilt er.java:36)
    org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 356)
    org.springframework.security.web.authentication.http://www.BasicAuthenticationFilter...ilter.java:178)
    org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 356)
    org.springframework.security.web.authentication.Ab stractAuthenticationProcessingFilter.doFilter(Abst ractAuthenticationProcessingFilter.java:188)
    org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 356)
    org.springframework.security.web.authentication.lo gout.LogoutFilter.doFilter(LogoutFilter.java:106)
    org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 356)
    org.springframework.security.web.context.SecurityC ontextPersistenceFilter.doFilter(SecurityContextPe rsistenceFilter.java:80)
    org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 356)
    org.springframework.security.web.FilterChainProxy. doFilter(FilterChainProxy.java:150)
    org.springframework.web.filter.DelegatingFilterPro xy.invokeDelegate(DelegatingFilterProxy.java:237)
    org.springframework.web.filter.DelegatingFilterPro xy.doFilter(DelegatingFilterProxy.java:167)


    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.15 logs.

  • #2
    Hi Tom,

    I have just tried running the petclinic application under Tomcat 5.5.28 (the latest 5.5 version available). Indeed I can see some weird issues in the error logs regarding the presence of some classes which are part of the servlet API:

    ClassNotFoundException: javax.el.ValueExpression

    Now, Roo marks this dependency as 'provided' in its pom.xml file but maybe you need to include it explicitly into your WEB-INF/lib directory (or the Tomcat lib directory) since there seem to be some issues with maven on this. A quick google on this issue shows me you are not the only one seeing this.

    Note, despite some of these errors shown in the tomcat logs my petclinic application seems to work fine.

    So it would be interesting what exact underlying error you are seeing. Can you attach the relevant section of your error log so we can see the root cause? Also, which maven version are you using?

    Cheers,
    Stefan

    Comment


    • #3
      Thank Stefan,I use maven 2.2.1, login in by 'admin' user ,error happen at http://localhost:8080/pizzashop/topping?page=1&size=10.

      Comment


      • #4
        Can you please share the root cause of the exception you are seeing? As mentioned above, you should be able to find it in your Tomcat logs.

        Thanks,
        Stefan

        Comment


        • #5
          this is tomcat log:

          Code:
          2010-2-2 21:14:46 org.apache.catalina.core.StandardHostValve custom
          FATAL: Exception Processing ErrorPage[errorCode=404, location=/app/resourceNotFound]
          org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.apache.tiles.impl.CannotRenderException: ServletException including path '/WEB-INF/layouts/default.jspx'.
          	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:659)
          	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:552)
          	at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
          	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
          	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
          	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
          	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
          	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:465)
          	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
          	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
          	at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:363)
          	at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:284)
          	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:136)
          	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
          	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
          	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
          	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
          	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
          	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
          	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
          	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
          	at java.lang.Thread.run(Unknown Source)
          Caused by: org.apache.tiles.impl.CannotRenderException: ServletException including path '/WEB-INF/layouts/default.jspx'.
          	at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:691)
          	at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:643)
          	at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:626)
          	at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:322)
          	at org.springframework.web.servlet.view.tiles2.TilesView.renderMergedOutputModel(TilesView.java:100)
          	at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
          	at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1060)
          	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:798)
          	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
          	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
          	... 21 more
          Caused by: org.apache.tiles.util.TilesIOException: ServletException including path '/WEB-INF/layouts/default.jspx'.
          	at org.apache.tiles.servlet.context.ServletUtil.wrapServletException(ServletUtil.java:232)
          	at org.apache.tiles.servlet.context.ServletTilesRequestContext.forward(ServletTilesRequestContext.java:243)
          	at org.apache.tiles.servlet.context.ServletTilesRequestContext.dispatch(ServletTilesRequestContext.java:222)
          	at org.apache.tiles.renderer.impl.TemplateAttributeRenderer.write(TemplateAttributeRenderer.java:44)
          	at org.apache.tiles.renderer.impl.AbstractBaseAttributeRenderer.render(AbstractBaseAttributeRenderer.java:103)
          	at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:669)
          	at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:689)
          	... 30 more
          Caused by: javax.servlet.ServletException: org.apache.tiles.jsp.taglib.TilesJspException: IO Error executing tag: JSPException including path '/WEB-INF/views/resourceNotFound.jspx'.
          	at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:854)
          	at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
          	at org.apache.jsp.WEB_002dINF.layouts.default_jspx._jspService(org.apache.jsp.WEB_002dINF.layouts.default_jspx:178)
          	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
          	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
          	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
          	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
          	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
          	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
          	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
          	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
          	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
          	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:465)
          	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
          	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
          	at org.apache.tiles.servlet.context.ServletTilesRequestContext.forward(ServletTilesRequestContext.java:241)
          	... 35 more

          Comment


          • #6
            Hmm it looks like there is something in resourceNotFound.jspx which the JSP engine in Tomcat 5.5 is unhappy about. Looking at the Tomcat websites it tells me that both Tomcat 5.5 and Tomcat 6 use JSP 2.0 so there should not be a difference. Have you tried it with the latest release of Tomcat 5.5.28? Maybe this is an issue that has been addressed in one of these bugfixes?

            -Stefan

            Comment


            • #7
              I tried it with the latest release of Tomcat 5.5.28,it still can not run, error is the same, the generated code by Roo may be are incompatible with something, but I do not know where it is.

              Comment


              • #8
                Did you try running one of the samples, like "script clinic.roo" and then "mvn tomcat:run" to see if that works OK in your Tomcat?

                Comment


                • #9
                  hi,I try the example clinic.roo,I have to modify the clinic pom.xml for java 5.0 , add code:

                  Code:
                  <dependency>
                  <groupId>javax.xml.bind</groupId>
                  <artifactId>jaxb-api</artifactId>
                  <version>2.1</version>
                  </dependency>
                  
                  <dependency>
                  <groupId>com.sun.xml.bind</groupId>
                  <artifactId>jaxb-impl</artifactId>
                  <version>2.1.3</version>
                  </dependency>
                  petclinic work fine on tomcat 6.0,but happen error on tomcat 5.5.28.
                  this is log:
                  Code:
                  ERROR http-8080-Processor20 org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/petclinic].[jsp] - Servlet.service() for servlet jsp threw exception
                  java.lang.NoClassDefFoundError: javax/el/ValueExpression
                  	at java.lang.Class.getDeclaredMethods0(Native Method)
                  	at java.lang.Class.privateGetDeclaredMethods(Class.java:2395)
                  	at java.lang.Class.getDeclaredMethods(Class.java:1763)
                  	at java.beans.Introspector$1.run(Introspector.java:1265)
                  	at java.security.AccessController.doPrivileged(Native Method)
                  	at java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:1263)
                  	at java.beans.Introspector.getTargetMethodInfo(Introspector.java:1129)
                  	at java.beans.Introspector.getBeanInfo(Introspector.java:387)
                  	at java.beans.Introspector.getBeanInfo(Introspector.java:159)
                  	at java.beans.Introspector.getBeanInfo(Introspector.java:220)
                  	at java.beans.Introspector.<init>(Introspector.java:368)
                  	at java.beans.Introspector.getBeanInfo(Introspector.java:159)
                  	at java.beans.Introspector.getBeanInfo(Introspector.java:220)
                  	at java.beans.Introspector.<init>(Introspector.java:368)
                  	at java.beans.Introspector.getBeanInfo(Introspector.java:159)
                  	at org.apache.jasper.compiler.Generator$TagHandlerInfo.<init>(Generator.java:3734)
                  	at org.apache.jasper.compiler.Generator$GenerateVisitor.getTagHandlerInfo(Generator.java:2146)
                  	at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1614)
                  	at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1442)
                  	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2166)
                  	at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2216)
                  	at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1819)
                  	at 
                  .....
                  ERROR http-8080-Processor20 org.apache.tiles.jsp.taglib.RenderTag - IO Error executing tag: JSPException including path '/WEB-INF/views/uncaughtException.jspx'.
                  org.apache.tiles.util.TilesIOException: JSPException including path '/WEB-INF/views/uncaughtException.jspx'.
                  	at org.apache.tiles.servlet.context.ServletUtil.wrapServletException(ServletUtil.java:232)
                  	at org.apache.tiles.jsp.context.JspTilesRequestContext.include(JspTilesRequestContext.java:105)
                  	at org.apache.tiles.jsp.context.JspTilesRequestContext.dispatch(JspTilesRequestContext.java:96)
                  	at org.apache.tiles.renderer.impl.UntypedAttributeRenderer.write(UntypedAttributeRenderer.java:61)
                  	at org.apache.tiles.renderer.impl.AbstractBaseAttributeRenderer.render(AbstractBaseAttributeRenderer.java:103)
                  	at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:669)
                  	at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:337)
                  	at org.apache.tiles.jsp.taglib.InsertAttributeTag.render(InsertAttributeTag.java:234)
                  	at org.apache.tiles.jsp.taglib.InsertAttributeTag.render(InsertAttributeTag.java:211)
                  	at org.apache.tiles.jsp.taglib.RenderTag.doEndTag(RenderTag.java:220)
                  	at org.apache.jsp.WEB_002dINF.layouts.default_jspx._jspx_meth_tiles_005finsertAttribute_005f1(default_jspx.java:467)
                  	at org.apache.jsp.WEB_002dINF.layouts.default_jspx._jspService(default_jspx.java:142)
                  	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
                  	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
                  	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
                  	at 
                  ...

                  Comment


                  • #10
                    I'm getting the same stack traces on my own Roo application. It seems to be the error handling that is broken. Most pages work fine, it is only when an exception is thrown or you get a 404 that this happens. I am using Tomcat 5.5.25-5ubuntu1 on Ubuntu 8.04 LTS.

                    Comment


                    • #11
                      Hi All,

                      I also faced the same problem trying to deploy to Websphere AS 6.1 which is J2EE 1.4 complying container, alsoi tried to deploy it to another J2EE 1.4 container which was Tomcat 5.5.

                      I got the underlying issue where the Roo app that i'm currently developing is using some JSP 2.1 API which only supported J2EE 5. In the docos, it doesn't say at all that what J2EE 5 is required for roo to run, it only mentioned JDK 5, i don't think that implies to J2EE 5? or it does?

                      I have the requirement for the project to be able to run the app on WAS 6.1, so this seems to be a deal breaker, or is there a known quick fix?

                      Thanks all

                      Comment


                      • #12
                        @sdyson,

                        Thanks for your valuable feedback. It appears we are using a JSP 2.1 API fragment in the error handling page somewhere. This needs to be investigated further. Can you please open a Jira ticket for this?

                        Cheers,
                        Stefan

                        Comment


                        • #13
                          create and show pages not affected by 'CannotRenderException' problem

                          It appears that create and show pages are unaffected by the error and only when the list page loads does the error occur. The home page also loads without a problem.

                          I can create and show the record I created but 'list' is not happening.

                          You mentioned the fragment is in the exception page but it appears to be in the list page, and possibly the exception page as well.

                          Hope this helps!

                          Thanks,
                          Michael

                          Comment


                          • #14
                            I've worked around this problem by rebuilding my server to use Tomcat 6 but I've posted a bug report:

                            http://jira.springframework.org/browse/ROO-680

                            Comment


                            • #15
                              Hi, I had the same problem.

                              Tomcat 5.5 uses JSTL 1.1.
                              Tomcat 6.0 uses JSTL 1.2.

                              The problem has been solved after pom.xml file modifications:

                              remove dependency
                              Code:
                                      <dependency>
                                          <groupId>javax.servlet</groupId>
                                          <artifactId>com.springsource.javax.servlet.jsp.jstl</artifactId>
                                          <version>1.2.0</version>
                                      </dependency>
                                      <dependency>
                                          <groupId>org.apache.el</groupId>
                                          <artifactId>com.springsource.org.apache.el</artifactId>
                                          <version>6.0.20</version>
                                      </dependency>
                              add dependency
                              Code:
                                      <dependency>
                                          <groupId>javax.servlet</groupId>
                                          <artifactId>com.springsource.javax.servlet.jsp</artifactId>
                                          <version>2.1.0</version>
                                          <scope>provided</scope>
                                      </dependency>
                                      <dependency>
                                          <groupId>javax.servlet</groupId>
                                          <artifactId>com.springsource.javax.servlet.jsp.jstl</artifactId>
                                          <version>1.1.2</version>
                                      </dependency>

                              All pages generated by Roo are rendered under Tomcat 5.5 as under Tomcat 6.0 successfully.
                              Last edited by dzmitry; Mar 7th, 2010, 12:04 PM.

                              Comment

                              Working...
                              X