From: Hicks, J. <James.Hicks@LMBerry.com> - 2001-07-12 22:24:31
|
I am getting the following exception when I try to access a simple jsp page. I am running JBoss 2.2, Tomcat 3.2.1, and Apache 1.19. JBoss and Tomcat are running in the same VM and Apache is talking with Tomcat through mod-jk using ajp 12. I created a simple ear file containing 1 enterprise bean, 1 servlet and 1 jsp file. The jsp file just has a link to the servlet and the servlet calls a method on the EJB. When accessing the servlet directly, everything works fine, but when I call the jsp i get a NullPointerException. --- Here is the Exception --- [EmbeddedTomcatSX] java.lang.NullPointerException [EmbeddedTomcatSX] at org.apache.tomcat.session.StandardSessionInterceptor.newSessionRequest(Stand ardSessionInterceptor.java:177) [EmbeddedTomcatSX] at org.apache.tomcat.core.ContextManager.doNewSessionRequest(ContextManager.jav a:913) [EmbeddedTomcatSX] at org.apache.tomcat.core.RequestImpl.getSession(RequestImpl.java:478) [EmbeddedTomcatSX] at org.apache.tomcat.facade.HttpServletRequestFacade.getSession(HttpServletRequ estFacade.java:381) [EmbeddedTomcatSX] at org.apache.jasper.runtime.PageContextImpl._initialize(PageContextImpl.java:1 73) [EmbeddedTomcatSX] at org.apache.jasper.runtime.PageContextImpl.initialize(PageContextImpl.java:14 9) [EmbeddedTomcatSX] at org.apache.jasper.runtime.JspFactoryImpl.getPageContext(JspFactoryImpl.java: 99) [EmbeddedTomcatSX] at _0002findex_0002ejspindex_jsp_5._jspService(_0002findex_0002ejspindex_jsp_5. java:47) [EmbeddedTomcatSX] at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) [EmbeddedTomcatSX] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) [EmbeddedTomcatSX] at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:177) [EmbeddedTomcatSX] at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318) [EmbeddedTomcatSX] at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391) [EmbeddedTomcatSX] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) [EmbeddedTomcatSX] at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) [EmbeddedTomcatSX] at org.apache.tomcat.core.Handler.service(Handler.java:286) [EmbeddedTomcatSX] at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) [EmbeddedTomcatSX] at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79 7) [EmbeddedTomcatSX] at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) [EmbeddedTomcatSX] at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC onnectionHandler.java:210) [EmbeddedTomcatSX] at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) [EmbeddedTomcatSX] at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) [EmbeddedTomcatSX] at java.lang.Thread.run(Thread.java:498) 2001-07-12 04:10:06 - Ctx( /test ): Exception in: R( /test + /index.jsp + null) - java.lang.NullPointerException at _0002findex_0002ejspindex_jsp_5._jspService(_0002findex_0002ejspindex_jsp_5. java:61) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:177) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79 7) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC onnectionHandler.java:210) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:498) --- End Exception --- --- Here is the code for the jsp page --- <html> <head> <title>Index.jsp</title> </head> <body> <a href="jboss/JBossTest">Test JBoss Servlet</a> </body> </html> --- End JSP code --- Please post response on the web forum also. I will be checking it from my house. http://www.jboss.org/forums/thread.jsp?forum=33&thread=291 James Hicks |