Skip to Content
0
Former Member
May 18, 2006 at 02:55 PM

NullPointerException in Servlet

22 Views

Hello,

I'm migrating another web-application from tomcat 5 to SAP WAS 6.40. This time the application uses the JSF Framework with the Oracle ADF Components. These Components uses an own servlet to dynamically create resources like images, css or javascript files.

While requesting a javascript file from this servlet, I get an NullPointerException. Heres the stack:

[code]

java.lang.NullPointerException

at com.sap.engine.services.servlets_jsp.server.runtime.client.HttpServletResponseFacade.setContentType(HttpServletResponseFacade.java:1130)

at oracle.adf.view.faces.webapp.ResourceServlet._setHeaders(ResourceServlet.java:393)

at oracle.adf.view.faces.webapp.ResourceServlet.doGet(ResourceServlet.java:178)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:748)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at oracle.adf.view.faces.webapp.ResourceServlet.service(ResourceServlet.java:135)

at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:391)

at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:265)

at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:345)

at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:323)

at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:865)

at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:240)

at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)

at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)

at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)

at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)

at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)

at java.security.AccessController.doPrivileged(Native Method)

at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)

at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)

[/code]

Requesting images or css files works fine. Only the javascript file produces the exception.

I'm not sure if the WAS or the framework triggers the exception.

Has anybody an idea why the method setContentType throws the exception?

thanks a lot, Daniel