java.lang.NullPointerException

ICEsoft JIRA Issue Tracker | Mark Collette | 8 years ago
  1. 0

    Both of these exceptions are because we're trying to build paths, to initialise java.io.File objects, which rely on results from ServletContext.getRealPath(String), which always returns null from a WAR deployment on Weblogic 9. java.lang.NullPointerException at java.io.File.<init>(File.java:222) at com.icesoft.faces.webapp.http.core.UploadServer$2.upload(UploadServer.java:189) at com.icesoft.faces.webapp.http.core.UploadServer$2.servlet(UploadServer.java:112) at com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.detectEnvironment(ServletRequestResponse.java:228) at com.icesoft.faces.webapp.http.core.UploadServer.service(UploadServer.java:60) at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24) java.lang.NullPointerException at java.io.File.<init>(File.java:194) at com.icesoft.faces.component.dataexporter.DataExporterRenderer.createFile(DataExporterRenderer.java:137) at com.icesoft.faces.component.dataexporter.DataExporterRenderer.encodeBegin(DataExporterRenderer.java:42) at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:703) at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:350) at com.icesoft.faces.renderkit.dom_html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:96) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:721) at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:352) at com.icesoft.faces.renderkit.dom_html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:96) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:721) at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:352) at com.icesoft.faces.renderkit.dom_html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:96) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:721) at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:352) at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:359) at com.icesoft.faces.renderkit.dom_html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:96) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:721) at com.icesoft.faces.component.util.CustomComponentUtils.renderChild(CustomComponentUtils.java:339) at com.icesoft.faces.component.panelstack.PanelStackRenderer.encodeChildren(PanelStackRenderer.java:116) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:721) at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:552) at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:557) at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:557) at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:557) at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:557) at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:557) at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:557) at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:557) at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:557) at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:505) at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:154) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:107) at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:137) at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:17) at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.renderCycle(ReceiveSendUpdates.java:140) at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.service(ReceiveSendUpdates.java:68) at com.icesoft.faces.webapp.http.core.RequestVerifier.service(RequestVerifier.java:26) at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24) at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:160) at com.icesoft.faces.webapp.http.servlet.SessionDispatcher$1.service(SessionDispatcher.java:30) at com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet.service(ThreadBlockingAdaptingServlet.java:19) at com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:63) at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:50) at com.icesoft.faces.webapp.http.servlet.SessionVerifier.service(SessionVerifier.java:22) at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23) at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:95) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:56) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:225) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3214) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1983) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1890) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1344) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209) at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)

    ICEsoft JIRA Issue Tracker | 8 years ago | Mark Collette
    java.lang.NullPointerException
  2. 0

    Both of these exceptions are because we're trying to build paths, to initialise java.io.File objects, which rely on results from ServletContext.getRealPath(String), which always returns null from a WAR deployment on Weblogic 9. java.lang.NullPointerException at java.io.File.<init>(File.java:222) at com.icesoft.faces.webapp.http.core.UploadServer$2.upload(UploadServer.java:189) at com.icesoft.faces.webapp.http.core.UploadServer$2.servlet(UploadServer.java:112) at com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.detectEnvironment(ServletRequestResponse.java:228) at com.icesoft.faces.webapp.http.core.UploadServer.service(UploadServer.java:60) at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24) java.lang.NullPointerException at java.io.File.<init>(File.java:194) at com.icesoft.faces.component.dataexporter.DataExporterRenderer.createFile(DataExporterRenderer.java:137) at com.icesoft.faces.component.dataexporter.DataExporterRenderer.encodeBegin(DataExporterRenderer.java:42) at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:703) at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:350) at com.icesoft.faces.renderkit.dom_html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:96) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:721) at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:352) at com.icesoft.faces.renderkit.dom_html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:96) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:721) at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:352) at com.icesoft.faces.renderkit.dom_html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:96) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:721) at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:352) at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:359) at com.icesoft.faces.renderkit.dom_html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:96) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:721) at com.icesoft.faces.component.util.CustomComponentUtils.renderChild(CustomComponentUtils.java:339) at com.icesoft.faces.component.panelstack.PanelStackRenderer.encodeChildren(PanelStackRenderer.java:116) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:721) at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:552) at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:557) at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:557) at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:557) at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:557) at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:557) at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:557) at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:557) at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:557) at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:505) at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:154) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:107) at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:137) at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:17) at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.renderCycle(ReceiveSendUpdates.java:140) at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.service(ReceiveSendUpdates.java:68) at com.icesoft.faces.webapp.http.core.RequestVerifier.service(RequestVerifier.java:26) at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24) at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:160) at com.icesoft.faces.webapp.http.servlet.SessionDispatcher$1.service(SessionDispatcher.java:30) at com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet.service(ThreadBlockingAdaptingServlet.java:19) at com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:63) at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:50) at com.icesoft.faces.webapp.http.servlet.SessionVerifier.service(SessionVerifier.java:22) at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23) at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:95) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:56) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:225) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3214) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1983) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1890) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1344) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209) at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)

    ICEsoft JIRA Issue Tracker | 8 years ago | Mark Collette
    java.lang.NullPointerException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  1. ajinkya_w 1 times, last 2 months ago
  2. emmanuelstroem 1 times, last 4 months ago
  3. adawolfs 31 times, last 2 months ago
  4. Diogo Jaym 6 times, last 5 months ago
  5. Bardh 7 times, last 6 months ago
6 more registered users
20 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.NullPointerException

    No message provided

    at java.io.File.<init>()
  2. Java RT
    File.<init>
    1. java.io.File.<init>(File.java:222)
    1 frame
  3. com.icesoft.faces
    PathDispatcherServer.service
    1. com.icesoft.faces.webapp.http.core.UploadServer$2.upload(UploadServer.java:189)
    2. com.icesoft.faces.webapp.http.core.UploadServer$2.servlet(UploadServer.java:112)
    3. com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.detectEnvironment(ServletRequestResponse.java:228)
    4. com.icesoft.faces.webapp.http.core.UploadServer.service(UploadServer.java:60)
    5. com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24)
    5 frames