0 Replies Latest reply on Nov 13, 2003 8:56 AM by Andrea Aime

    jboss 3.2.2, jetty, https and NPE!

    Andrea Aime Newbie

      Hi, I've just tried to move my application from 3.2.0 to 3.2.2 + Jetty
      and... it doesn't work anymore, when the first servlet is loaded I get the following exception:

      14:54:42,754 ERROR [STDERR] java.lang.NullPointerException
      14:54:42,755 ERROR [STDERR] at javax.servlet.GenericServlet.getServletContext(GenericServlet.java:204)
      14:54:42,755 ERROR [STDERR] at servlet.ServletLogin.doPost(ServletLogin.java:43)
      14:54:42,756 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
      14:54:42,756 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      14:54:42,756 ERROR [STDERR] at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:356)
      14:54:42,757 ERROR [STDERR] at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294)
      14:54:42,758 ERROR [STDERR] at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
      14:54:42,758 ERROR [STDERR] at org.mortbay.http.HttpContext.handle(HttpContext.java:1776)
      14:54:42,758 ERROR [STDERR] at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:514)
      14:54:42,758 ERROR [STDERR] at org.mortbay.http.HttpContext.handle(HttpContext.java:1726)
      14:54:42,758 ERROR [STDERR] at org.mortbay.http.HttpServer.service(HttpServer.java:879)
      14:54:42,758 ERROR [STDERR] at org.jboss.jetty.Jetty.service(Jetty.java:456)
      14:54:42,758 ERROR [STDERR] at org.mortbay.http.HttpConnection.service(HttpConnection.java:790)
      14:54:42,759 ERROR [STDERR] at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:952)
      14:54:42,759 ERROR [STDERR] at org.mortbay.http.HttpConnection.handle(HttpConnection.java:807)
      14:54:42,759 ERROR [STDERR] at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:196)
      14:54:42,759 ERROR [STDERR] at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
      14:54:42,759 ERROR [STDERR] at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:487)

      and adding a system out I discovered that the servlet is getting
      initialized with a null ServletConfig object, that triggers the above exception when the getServletContext() method is called.
      What's happening?