facebook

Flex Crud Scaffold with Maven Fails at Runtime

  1. MyEclipse IDE
  2.  > 
  3. Spring Development
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #317429 Reply

    bapurvis
    Member

    I have generated a flex crud application successfully. This runs fine and I can execute the application.
    I do the same generation with Maven support added. This time when I run the application and try to access the index.jsp I get

    SEVERE: Servlet.service() for servlet jsp threw exception
    java.lang.NullPointerException
    at org.apache.jsp.index_jsp._jspInit(index_jsp.java:23)
    at org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:52)
    at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:159)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java:129)
    at com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:77)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:113)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Thread.java:619)

    It seems there is a problem with the deployed jars that are automatically generated for the maven case. If I delete the deploy libs from the maven version and copy in the non-maven ones the application works fine. I have been trying to step through the jars to compare but I am not having any success resolving the generated maven dependanies (there are hundreds of jars). The sitemesh.jar was different so I replaced this but it did not solve the issue. The spring.framework jars seem to be the same version. This seem to be the only deployed jars in the trace stack.

    Thanks for any help

    #317430 Reply

    bapurvis
    Member

    Managed to resolve issue.

    Problem was not “which jars were different” but “what should not be deployed”. I looked in Tomcat libs directory and found the javax annontations, servlet, jsp and el jars. The Maven was also deploying these or similar flavours of to my application lib. I edited the pom file by changing the corresponding entries to provided and it now runs!!

    I found some similar problems on this site and this lead me in this “new” direction.

    #317461 Reply

    jkennedy
    Member

    Thanks for posting the update and your resolution. Can you tell me which Maven Archetype you started from and whether that archetype included these libs without the “provided” scope to begin with…

    Thanks,
    jack

    #318703 Reply

    bapurvis
    Member

    Hi
    Just saw your post. Not to sure how to answer which Maven Archetype did I start with. I created a Web Project. Select add Maven as part of this creation from the dialog. I then did the Crud. So maven creation was handle by myeclipse.

    #320256 Reply

    The NullPointerException (at org.apache.jsp.index_jsp._jspInit(index_jsp.java:23) happens also if JavaEE 6.0 instead of JavaEE 5.0 is choosen on the first page of the wizzard.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: Flex Crud Scaffold with Maven Fails at Runtime

You must be logged in to post in the forum log in