[jboss-jira] [JBoss JIRA] Updated: (JBAS-7775) Default jsf 2.0 resource lookup fails if resources are present in jar in WEB-INF/lib
Stan Silvert (JIRA)
jira-events at lists.jboss.org
Thu Jun 3 15:00:57 EDT 2010
[ https://jira.jboss.org/browse/JBAS-7775?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stan Silvert updated JBAS-7775:
-------------------------------
Attachment: stylesheet-1.0-SNAPSHOT.war
> 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/browse/JBAS-7775
> Project: JBoss Application Server
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 6.0.0.M2
> Reporter: Johan Kustermans
> Assignee: Stan Silvert
> Priority: Blocker
> Fix For: 6.0.0.M4
>
> Attachments: stylesheet-1.0-SNAPSHOT.war
>
>
> 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/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list