Categories
java

Not Bound in this Context Error…

Anybody have any idea why I’d get a “not bound in this context” error on a dev Tomcat server but not on my local box?

Everything is the same: web.xml, jsp file, and my Resource/ResourceParam definitions. The jsp runs on my local Tomcat, but not on the dev server. Same version of Java and Tomcat.

It’s one of those problems where a guy I work with has given up on the problem and my boss has asked me to look at it. It’s a project/client I’m not even working with/for but the jsp is very basic. Bad design, but basic.

The point is that it works on one machine and on the other the same code generates a “not bound in this context error”. I’ll paste the exception below the jsp. Again, I’m just trying to figure out why this will run on one instance of Tomcat and not on another.

// code to output html
“);
out.println(“”);
out.println(” -1\n”);
out.println(” ” + ex.getMessage() + “\n”);
out.println(“”);

} finally {
try {
conn.close();
stmt.close();
rs.close();
}
catch(Exception ex)
{
ex.printStackTrace();
}
}
%>

exception:
java.lang.NullPointerException
at org.apache.jsp.VndNcknNm_jsp._jspService(VndNcknNm_jsp.java:153)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:257)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:700)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Unknown Source)

And here are the Resource/ResourceParams definitions:

factory
org.apache.commons.dbcp.BasicDataSourceFactory

maxWait
5000

maxActive
30

password

url
jdbc:oracle:thin:@dev:1522:prdev

driverClassName
oracle.jdbc.driver.OracleDriver

maxIdle
20

username
prload

Leave a Reply

Your email address will not be published. Required fields are marked *