4 Replies Latest reply on Jan 18, 2002 7:52 PM by 3004

    Error 500 Java.Lang.Null.Pointer Exception

      Please help me:
      I have problem with starting my portlet under portal.
      Provider is registred correctly ,portlet is added corectly on
      Portal Page ,but when I test my page I have :
      The Listener Returned the folowing message-
      Error 500 Java.Lang.Null.Pointer Exception
      Note:Portlet is compiled in JDeveloper 2.0 and there look Ok.
        • 1. re:Error 500 Java.Lang.Null.Pointer Exception

          Somewhere in your code you are using a variable or object
          without initialising it. That's why you are getting the
          Nullpointer Exception: you are trying to use something that does
          not exist at that time.

          The reason your program compiles perfectly is very simple: a
          compiler only checks the syntax of your program, never what it
          is supposed to do. Because of this, a Nullpointer exception will
          not be noticed by the compiler.

          Try looking over your code again, and look for objects that are
          not initialised. Try to set some breakpoints or comment out
          blocks that are safe, you'll find the error somewhere.

          Best of luck,

          • 2. re:re:Error 500 Java.Lang.Null.Pointer Exception
            we encountered the same error on aix4.3.3. in fact the error comes from a variable, that has not been initialized, jserv error log says the following:
            [07/11/2001 10:00:54:098 GMT+00:00] esvportal/init
            [07/11/2001 10:01:08:668 GMT+00:00] esvportal/Response status: 500 : java.lang.NullPointerException
                 at oracle.portal.provider.v1.http.ServletProviderRequest.getAcceptLanguage(ServletProviderRequest.java:162)
                 at oracle.portal.provider.v1.http.ServletProviderResponse.showPortlet(ServletProviderResponse.java:521)
                 at oracle.portal.provider.v1.http.HttpProvider.dispatchProviderAction(HttpProvider.java:662)
                 at oracle.portal.provider.v1.http.HttpProvider.service(HttpProvider.java:391)
                 at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
                 at org.apache.jserv.JServConnection.processRequest(JServConnection.java:402)
                 at org.apache.jserv.JServConnection.run(JServConnection.java:260)
                 at java.lang.Thread.run(Thread.java:481)

            i habe a public page with 4 jsp portlets and one pl/sql portlet. the plsql ist working, every one of the jsp portlets gets the "getAcceptLanguage" error
            • 3. Portlet Error - getAcceptLanguage

              I had the exact same problem for a while.

              I found I got the error when using the Opera browser. Using Netscape or Explorer did not cause the problem.

              I expect my browser was not communicating language to the portlet properly.

              I hope this helps. Hopefully the portlet authors will add a "catch" statement in the next release.

              • 4. re:Portlet Error - getAcceptLanguage
                Dejan, all,

                A lot of times you will get the NullPointerException because the classes it saw during compilation, it cannot find when it tries to contact the Adapter (the URL you call to get the testpage).

                If you compile it in JDeveloper or other tools/utilities, a lot of times it places additional classes in the code outisde of standard Java/Servlet and PDK-Java classes. Make sure that you include these in your classpath for JServ as well.