3 Replies Latest reply on Oct 26, 2002 12:34 PM by jules

    New error in jb3.0.3 when shutting down server

    tbauer

      Just migrated from jb3.0.0 to jb3.0.3 and got everything working properly, but when I use /bin/shutdown.sh to bring down the server I now notice a NULLPOINTER exception being thrown by jbossweb...Any clues to what may be happening and how I can fix this??

      Here's the log:

      10:47:47,010 INFO [MainDeployer] not deleting localUrl, it is null or not a copy: null
      10:47:47,010 INFO [MainDeployer] Undeployed file:/Applications/jboss-3.0.3/server/default/deploy/http-invoker.sar/invoker.war/
      10:47:47,013 INFO [jbossweb] Stopping Acceptor ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=8080]
      10:47:47,018 INFO [jbossweb] Wait for SocketListener-0|0|Socket[addr=localhost/127.0.0.1,port=49237,localport=8080]
      10:47:47,318 WARN [jbossweb] WARNING: JspFactoryImpl: Exception initializing page context
      java.lang.NullPointerException
      at org.mortbay.jetty.servlet.ServletHttpRequest.getSession(ServletHttpRequest.java:516)
      at org.mortbay.jetty.servlet.ServletHttpRequest.getSession(ServletHttpRequest.java:552)
      at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:268)
      at org.apache.jasper.runtime.PageContextImpl._initialize(PageContextImpl.java:138)
      at org.apache.jasper.runtime.PageContextImpl.initialize(PageContextImpl.java:114)
      at org.apache.jasper.runtime.JspFactoryImpl.internalGetPageContext(JspFactoryImpl.java:175)
      at org.apache.jasper.runtime.JspFactoryImpl.getPageContext(JspFactoryImpl.java:154)
      at org.apache.jsp.displayOpResult$jsp._jspService(displayOpResult$jsp.java:48)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:366)
      at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:284)
      at org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.java:216)
      at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:151)
      at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.invokeOpByName(HtmlAdaptorServlet.java:199)
      at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.processRequest(HtmlAdaptorServlet.java:79)
      at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.doGet(HtmlAdaptorServlet.java:54)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:366)
      at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:284)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:577)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1674)
      at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:544)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1624)
      at org.mortbay.http.HttpServer.service(HttpServer.java:875)
      at org.jboss.jetty.Jetty.service(Jetty.java:541)
      at org.mortbay.http.HttpConnection.service(HttpConnection.java:785)
      at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:935)
      at org.mortbay.http.HttpConnection.handle(HttpConnection.java:802)
      at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:200)
      at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:294)
      at org.mortbay.util.ThreadPool$JobRunner.run(ThreadPool.java:743)
      at java.lang.Thread.run(Thread.java:491)

      10:47:47,328 INFO [jbossweb] JspFactoryImpl: Exception initializing page context: java.lang.NullPointerException
      10:47:47,340 INFO [jbossweb] Stopped SocketListener on 0.0.0.0:8080
      10:47:47,343 INFO [jbossweb] Stopping Acceptor ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=8009]

        • 1. Re: New error in jb3.0.3 when shutting down server

          It looks like someone is calling up a JSP page as Jetty is shutting down - definitely not a good idea.

          I didn't write the shutdown code. Could it be this that is calling up a page and then that page shutting down the whole server ? If it going through the JMX console, then this is probably what is happening.

          I would not consider this a problem with Jetty. It is a problem with the way this page is implemented. It should perhaps spawn a background thread which shuts everything down after the initial request has been handled.

          You should check all this out and if it turns out to be the case, register a bug report on the JBoss project at SourceForge.


          Jules

          • 2. Re: New error in jb3.0.3 when shutting down server
            tbauer

            I DON'T call JSP pages directly!! All jsp's are served from controller servlets like (context.getRequestDispatcher("/jsp/modifyFacUserForm.jsp").forward(req, res);)...

            Since I am still in development, I start/shutdown the server a lot and this is happening EVERY time I shutdown the server...and yes, I'm sure there are no clients available to be hitting the server...I'm the only person using the system...

            • 3. Re: New error in jb3.0.3 when shutting down server

              If the shutdown jar is using the JMX console to do the shutdown, then it is using a JSP, as this is what the jxm-console.war is built with.

              Jules