[jbossseam-issues] [JBoss JIRA] Updated: (JBSEAM-4316) Classloader cannot find XML files in multiple WARs

Stuart Douglas (JIRA) jira-events at lists.jboss.org
Tue Jul 21 18:45:29 EDT 2009


     [ https://jira.jboss.org/jira/browse/JBSEAM-4316?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stuart Douglas updated JBSEAM-4316:
-----------------------------------

    Attachment: pages-fix.diff


I have a theory on what is happening but I will probably not have time to test it for a few days. I think that you will only see this behavior when the hot deploy filter is being used. On startup there should not be a problem because seam apps start up sequentially, so the correct servlet context should be used each time (This is the reason I did not touch this file in my original patch, I though it would be ok).

I think the hot deploy filter is being called before the ContextFilter and that is why you are seeing the problem. I have attached a patch that makes the hot deploy filter run inside the ContextFilter, if you have time Reind would you be able to see if this fixes it? If not I will do some testing in the next couple of days.

> Classloader cannot find XML files in multiple WARs
> --------------------------------------------------
>
>                 Key: JBSEAM-4316
>                 URL: https://jira.jboss.org/jira/browse/JBSEAM-4316
>             Project: Seam
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.2.0.CR1
>         Environment: JBoss AS 5.0.0.GA. Seam 2.2 r11299
>            Reporter: Reind D
>         Attachments: pages-fix.diff
>
>
> I have an EAR that contains multiple WAR files. The first webapp to be accessed works fine. Any web request to the 2nd WAR to be accessed causes the following error:
> WARN [VFSScanner] Error handling item 'login/index.page.xml': java.lang.NullPointerException: Cannot find URL from classLoader for login/index.page.xml, loading from org.jboss.web.tomcat.service.WebCtxLoader$ENCLoader at 1ed964f 
> FileDescriptor.java calls:
>    Resources.getResource(name, ServletLifecycle.getServletContext());
> Which returns a static reference to the ServletContext which is overwritten by the last webapp to be initialized.
>    private static ServletContext servletContext;
>    public static ServletContext getServletContext()
>    {
>       //don't throw an exception if null, because of unit tests
>       return servletContext;
>    }
> The 2nd webapp to be initialized will have a reference to the first webapp's ServletContext.

-- 
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

        


More information about the seam-issues mailing list