- This topic has 4 replies, 3 voices, and was last updated 13 years, 4 months ago by
joerg.vollmer.
-
AuthorPosts
-
bapurvisMemberI 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 getSEVERE: 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
bapurvisMemberManaged 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.
jkennedyMemberThanks 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
bapurvisMemberHi
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.
joerg.vollmerMemberThe 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.
-
AuthorPosts