WebAppClassLoader.getResource() fails when the war is deployed as part of an ear
--------------------------------------------------------------------------------
Key: JBAS-4435
URL:
http://jira.jboss.com/jira/browse/JBAS-4435
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: ClassLoading
Reporter: Thomas Diesler
Assigned To: Scott M Stark
For some reason WebAppClassLoader.getResource("WEB-INF/wsdl/TestEndpoint.wsdl")
fails when the war is deployed as part of an ear deployment.
I use this workaround in
static class VirtualFileClassLoader extends ClassLoader
{
private UnifiedVirtualFile vFile;
public VirtualFileClassLoader(UnifiedVirtualFile file, ClassLoader parent)
{
super(parent);
vFile = file;
}
@Override
public URL getResource(String name)
{
URL url = super.getResource(name);
if (url == null)
{
try
{
url = vFile.findChild(name).toURL();
}
catch (IOException e)
{
// ignore
}
}
return url;
}
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira