java.lang.NullPointerException at org.apache.jsp.mouseproduct_jsp._jspService(mouseproduct_jsp.java:145) -
i getting following exception while running application on tomcat8 using intellij idea14.
25-apr-2015 16:30:49.221 severe [http-nio-8443-exec-133] org.apache.catalina.core.standardwrappervalve.invoke servlet.service() servlet [jsp] in context path [] threw exception [an exception occurred processing jsp page /mouseproduct.jsp @ line 35 <% string ppic = oc.getppicture(); ppic = ut.findproductpicture(ppic, oc.getpcolor()); int [] wh = swutil.getpicwhbymin(application.getrealpath("images").replacefirst("newportal_admin","newportal")+"\\"+ppic); %> <img src="<%="../images/"+ppic%>" width="<%=wh[0]%>" height="<%=wh[1]%>" border="0"> </td> stacktrace:] root cause java.lang.nullpointerexception @ org.apache.jsp.mouseproduct_jsp._jspservice(mouseproduct_jsp.java:145) @ org.apache.jasper.runtime.httpjspbase.service(httpjspbase.java:70) @ javax.servlet.http.httpservlet.service(httpservlet.java:729) @ org.apache.jasper.servlet.jspservletwrapper.service(jspservletwrapper.java:431) @ org.apache.jasper.servlet.jspservlet.servicejspfile(jspservlet.java:396) @ org.apache.jasper.servlet.jspservlet.service(jspservlet.java:340) @ javax.servlet.http.httpservlet.service(httpservlet.java:729) @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:291) @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:206) @ org.apache.tomcat.websocket.server.wsfilter.dofilter(wsfilter.java:52) @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:239) @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:206) @ org.tuckey.web.filters.urlrewrite.urlrewritefilter.dofilter(urlrewritefilter.java:299) @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:239) @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:206) @ org.apache.catalina.core.standardwrappervalve.invoke(standardwrappervalve.java:219) @ org.apache.catalina.core.standardcontextvalve.invoke(standardcontextvalve.java:106) @ org.apache.catalina.authenticator.authenticatorbase.invoke(authenticatorbase.java:614) @ org.apache.catalina.core.standardhostvalve.invoke(standardhostvalve.java:142) @ org.apache.catalina.valves.errorreportvalve.invoke(errorreportvalve.java:79) @ org.apache.catalina.valves.abstractaccesslogvalve.invoke(abstractaccesslogvalve.java:610) @ org.apache.catalina.core.standardenginevalve.invoke(standardenginevalve.java:88) @ org.apache.catalina.connector.coyoteadapter.service(coyoteadapter.java:518) @ org.apache.coyote.http11.abstracthttp11processor.process(abstracthttp11processor.java:1091) @ org.apache.coyote.abstractprotocol$abstractconnectionhandler.process(abstractprotocol.java:668) @ org.apache.coyote.http11.http11nioprotocol$http11connectionhandler.process(http11nioprotocol.java:223) @ org.apache.tomcat.util.net.nioendpoint$socketprocessor.dorun(nioendpoint.java:1517) @ org.apache.tomcat.util.net.nioendpoint$socketprocessor.run(nioendpoint.java:1474) @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1142) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:617) @ org.apache.tomcat.util.threads.taskthread$wrappingrunnable.run(taskthread.java:61) @ java.lang.thread.run(thread.java:745)
- there
nullpointerexception
on line no 145 of code . - i think
application.getrealpath("images")
null . - to precise can find converted servlet code jsp see exact line number .
- from code above there more one places can through npe .
Comments
Post a Comment