[
https://jira.jboss.org/jira/browse/JBAS-7775?page=com.atlassian.jira.plug...
]
Shelly McGowan updated JBAS-7775:
---------------------------------
Try this:
Check out embjopr/trunk:
svn co
https://svn.jboss.org/repos/embjopr/trunk/ embjopr
cd embjopr
mvn install -Dmaven.test.skip=true
cd jsfunit
mvn -Pjboss6x -Dtest=org.jboss.jopr.jsfunit.HelloJoprTest
The error shown above will be seen in the cargo.log. Note too that jsfunit/pom.xml was
just updated to 1.2.0.Final. The creation of the jboss6x profile is also new.
Default jsf 2.0 resource lookup fails if resources are present in jar
in WEB-INF/lib
------------------------------------------------------------------------------------
Key: JBAS-7775
URL:
https://jira.jboss.org/jira/browse/JBAS-7775
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: JBossAS-6.0.0.M2
Reporter: Johan Kustermans
Assignee: Stan Silvert
We have a JSF 2.0 composite component in WEBROOT/resources and at the same time a jar in
WEB-INF/lib that has resources under the META-INF/resources directory. Then a nullpointer
is thrown with the following stacktrace if the composite component is looked up for
rendering in another xhtml page
2010-02-28 19:21:32,839 SEVERE [javax.enterprise.resource.webcontainer.jsf.application]
(http-localhost%2F127.0.0.1-8080-1) Error Rendering View[/homeLucene.xhtml]:
java.lang.NullPointerException
at org.apache.naming.resources.ProxyDirContext.listBindings(ProxyDirContext.java:714)
at
org.apache.catalina.core.ApplicationContext.listCollectionPaths(ApplicationContext.java:1397)
at
org.apache.catalina.core.ApplicationContext.getResourcePathsInternal(ApplicationContext.java:645)
at
org.apache.catalina.core.ApplicationContext.getResourcePaths(ApplicationContext.java:628)
at
org.apache.catalina.core.ApplicationContextFacade.getResourcePaths(ApplicationContextFacade.java:199)
at
com.sun.faces.context.ExternalContextImpl.getResourcePaths(ExternalContextImpl.java:480)
at
com.sun.faces.application.resource.WebappResourceHelper.findResource(WebappResourceHelper.java:191)
at
com.sun.faces.application.resource.ResourceManager.findResource(ResourceManager.java:384)
at
com.sun.faces.application.resource.ResourceManager.doLookup(ResourceManager.java:234)
at
com.sun.faces.application.resource.ResourceManager.findResource(ResourceManager.java:181)
at
com.sun.faces.application.resource.ResourceHandlerImpl.createResource(ResourceHandlerImpl.java:140)
at
com.sun.faces.application.resource.ResourceHandlerImpl.createResource(ResourceHandlerImpl.java:120)
at
com.sun.faces.renderkit.html_basic.StylesheetRenderer.encodeEnd(StylesheetRenderer.java:91)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:878)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1620)
at org.primefaces.renderkit.HeadRenderer.encodeBegin(HeadRenderer.java:42)
at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:823)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1611)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1616)
at
com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:380)
at
com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:126)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:273)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:127)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313)
The error is thrown in the listbindings-method of the ProxyDirContext at the line
while (overlay.hasMore()) {
Binding pair = overlay.next();
...
}
because overlay = null. This part of the code is reached in this case because the
presence of the kind of jar mentioned in the beginning of this issue description implies
that the overlays member field of the ProxyDirContext is not-null (and not empty). The
composite component does, of course, not exist in the jar resulting in a null overlay.
A simple check on overlay != null before executing the while loop seems sufficient to
resolve the issue.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira