Details
Description
Noted in forum: http://www.icefaces.org/JForum/posts/list/0/2828.page#13738
Apparently, in a non-exploded war file, getResource("/") in an unexploded war
returns null, and web app startup fails:
Dear Icesoft.
We found and confirmed a bug concerning Icefaces component.
Environment: Weblogic 8.1sp3 on Solaris, J2se 1.4
If we deploy the timezone2.war exploded, it works.
If we deploy timezone2.war as a not exploded war, it deploy but loading webapp
brokes:
Stacktrace:
java.lang.NullPointerException
at com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:996)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
at
weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:312)
at weblogic.servlet.jsp.PageContextImpl.forward(PageContextImpl.java:150)
at jsp_servlet.__index._jspService(__index.java:124)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:996)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:463)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6452)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3661)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2630)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
Apparently, in a non-exploded war file, getResource("/") in an unexploded war
returns null, and web app startup fails:
Dear Icesoft.
We found and confirmed a bug concerning Icefaces component.
Environment: Weblogic 8.1sp3 on Solaris, J2se 1.4
If we deploy the timezone2.war exploded, it works.
If we deploy timezone2.war as a not exploded war, it deploy but loading webapp
brokes:
Stacktrace:
java.lang.NullPointerException
at com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:996)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
at
weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:312)
at weblogic.servlet.jsp.PageContextImpl.forward(PageContextImpl.java:150)
at jsp_servlet.__index._jspService(__index.java:124)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:996)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:463)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6452)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3661)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2630)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
Activity
Philip Breau
created issue -
Icefaces Administrator
made changes -
Field | Original Value | New Value |
---|---|---|
issue.field.bugzillaimportkey | 1004 | 12254 |
Ken Fyten
made changes -
Affects Version/s | 1.5 [ 10027 ] | |
Affects Version/s | 1.0.1 [ 10025 ] |
Ken Fyten
made changes -
Priority | Major [ 3 ] | Minor [ 4 ] |
Ken Fyten
made changes -
Assignee | Ted Goddard [ ted.goddard ] |
Deryk Sinotte
made changes -
Summary | WebLogic 8.1 sp3: getResource("/") in a not exploded war returns null | ServletContext.getResource("/") sometimes returns null |
Deryk Sinotte
made changes -
Assignee | Deryk Sinotte [ deryk.sinotte ] |
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #14089 | Fri Jun 08 08:37:11 MDT 2007 | deryk.sinotte | |
Files Changed | ||||
MODIFY
/icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/servlet/MainServlet.java
|
Deryk Sinotte
made changes -
Status | Open [ 1 ] | Resolved [ 5 ] |
Fix Version/s | 1.6 [ 10031 ] | |
Resolution | Fixed [ 1 ] |
Ken Fyten
made changes -
Fix Version/s | 1.6DR#6 [ 10090 ] | |
Fix Version/s | 1.6 [ 10031 ] |
Ken Fyten
made changes -
Fix Version/s | 1.6 [ 10031 ] |
Ken Fyten
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |
Assignee | Deryk Sinotte [ deryk.sinotte ] |
I'm changing the summary of this problem since it is not limited to WebLogic.
In getting ICEfaces to run on SAP's NetWeaver, it turns out that the ServletContext.getResource("/") call we use to seed the IdGenerator also returns "null" on that application server. In fact, any resource that is a directory appears to return null. For the call to return something useful, it needs to resolve to an actual physical file. For example, the following resources returned null:
/
/WEB-INF
/WEB-INF/
but by changing them to point at actual files the call returned valid URLs:
/index.jsp
/WEB-INF/web.xml
So I'd recommend two things:
1) Leave the current logic the way it is (since it works most of the time and won't dramatically impact our current code) but add some additional logic that tries to find a known resource (like /WEB-INF/web.xml).
2) Add some useful logging statements as this was particularly hard to track down on NetWeaver.