[
https://jira.jboss.org/jira/browse/JBSEAM-4316?page=com.atlassian.jira.pl...
]
Stuart Douglas commented on JBSEAM-4316:
----------------------------------------
I had a quick look at the test case. As I thought, it is the hot deploy filter that is
causing the problems, because the application context is not set up when the hot
deployment filter runs.
There are three possible solutions that I can see:
1) Start the application context earlier. I would not recommend this as I have no idea
what side effects this would have.
2) Pass the ServletContext down through the DeploymentHandlers and Scanners into
FileDescriptor. This is probably the most correct solution, but would involve changing
the signature of quite a few classes.
3) Use a quick n dirty ThreadLocal to hold the servlet context that is set by the
HotDeploymentFilter at some point. This seems kind of hackish, but would be the easiest to
implement.
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: jbseam-4316.tar.gz, 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@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