aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes tomcat6 and eclipse - NullPointer Exception in _jspInit-method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "tomcat6 and eclipse - NullPointer Exception in _jspInit-method" Watch "tomcat6 and eclipse - NullPointer Exception in _jspInit-method" New topic
Author

tomcat6 and eclipse - NullPointer Exception in _jspInit-method

Aldun Samlye
Greenhorn

Joined: Mar 08, 2011
Posts: 2
Hi,

I deployed a dynamic web project with eclipse on a tomcat6-server (running on Kubuntu).
After typing in a URL pointing to that server I get the following error:


08.03.2011 12:31:33 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
08.03.2011 12:31:33 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1127 ms
08.03.2011 12:31:33 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
08.03.2011 12:31:33 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.28
08.03.2011 12:31:33 org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor frontend.xml
08.03.2011 12:31:34 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
08.03.2011 12:31:34 org.apache.catalina.startup.Catalina start
INFO: Server startup in 1160 ms
08.03.2011 12:31:38 org.apache.catalina.core.ApplicationDispatcher invoke
SCHWERWIEGEND: Servlet.service() for servlet jsp threw exception
java.lang.NullPointerException
at org.apache.jsp.search.search_005fform_jsp._jspInit(search_005fform_jsp.java:22)
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:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
at website.management.WebUtil.forwardToWebpage(WebUtil.java:180)
at website.SearchPage.processSearchForm(SearchPage.java:58)
at website.SearchPage.createChildResponse(SearchPage.java:67)
at website.management.AbstractWorker.createResponse(AbstractWorker.java:39)
at website.MainServlet.doChildGet(MainServlet.java:155)
at website.MasterServlet.doGet(MasterServlet.java:24)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
at website.management.WebUtil.forwardToPattern(WebUtil.java:207)
at website.MainPage.createChildResponse(MainPage.java:28)
at website.management.AbstractWorker.createResponse(AbstractWorker.java:39)
at website.MainServlet.doChildGet(MainServlet.java:155)
at website.MasterServlet.doGet(MasterServlet.java:24)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
org.apache.jasper.JasperException: java.lang.NullPointerException
at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:527)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:359)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
at website.management.WebUtil.forwardToWebpage(WebUtil.java:180)
at website.SearchPage.processSearchForm(SearchPage.java:58)
at website.SearchPage.createChildResponse(SearchPage.java:67)
at website.management.AbstractWorker.createResponse(AbstractWorker.java:39)
at website.MainServlet.doChildGet(MainServlet.java:155)
at website.MasterServlet.doGet(MasterServlet.java:24)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
at website.management.WebUtil.forwardToPattern(WebUtil.java:207)
at website.MainPage.createChildResponse(MainPage.java:28)
at website.management.AbstractWorker.createResponse(AbstractWorker.java:39)
at website.MainServlet.doChildGet(MainServlet.java:155)
at website.MasterServlet.doGet(MasterServlet.java:24)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
at org.apache.jsp.search.search_005fform_jsp._jspInit(search_005fform_jsp.java:22)
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)
... 42 more



Does anyone know what I can do to fix this?
If you need more information, just ask.

Thanks for your help,
Aldun Samlye

PS: Sorry for my bad english...
Aniruddh Joshi
Ranch Hand

Joined: Jul 29, 2008
Posts: 275

fform.jsp is throwing a NullPointerException, have you written this JSP ?


SCHWERWIEGEND: Servlet.service() for servlet jsp threw exception
java.lang.NullPointerException
at org.apache.jsp.search.search_005fform_jsp._jspInit(search_005fform_jsp.java:22)
at org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:52)


Anrd
"One of the best things you could do is to simplify a larger application into a smaller one by reducing its process and complexity - Fowler"
Aldun Samlye
Greenhorn

Joined: Mar 08, 2011
Posts: 2
Hi,

thanks for the quick answer.
The corresponding jsp is search_form.jsp.

It's code is:


The file header.jsp contains the following code (I know that It looks ugly, but I did not have time to refactor it, yet):


And footer.jsp looks like this:


I've written those JSPs by myself.

When I rename search_form.jsp to searchform.jsp, the error looks like this:


(...)

SCHWERWIEGEND: Servlet.service() for servlet jsp threw exception
java.lang.NullPointerException
at org.apache.jsp.search.searchform_jsp._jspInit(searchform_jsp.java:22)

(...)


Deleting the body-content in search_form.jsp doesn't make any difference. (I checked, that it is redeployed correctly, i.e the file on the server also has no body-content)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: tomcat6 and eclipse - NullPointer Exception in _jspInit-method