It appears that deployment of WAR files was broken when the new Unified
Classloader was implemented. The problem seems to be that a classloader for
the WEB-INF/classes directory within the WAR is not created, and instead a
classloader for some arbitrary subdirectory of WEB-INF/classes is created.
Here is a snippet of the broken code (from
AbstractWebContainer.parseWEBINFClasses):
File outFile = new File(localCopyDir,
di.shortName+".webinf"+File.separator+name);
outFile.getParentFile().mkdirs();
if (!uclCreated)
{
DeploymentInfo sub = new
DeploymentInfo(outFile.getParentFile().toURL(), di);
// There is no copying over, just use the url for the UCL
sub.localUrl = sub.url;
// Create a URL for the sub
sub.createClassLoaders();
uclCreated = true;
di.subDeployments.add(sub);
}
For example, if the first file under WEB-INF/classes it finds is
WEB-INF/classes/org/blah/foo.class, it will create a sub-deployment (and
hence a classloader) for WEB-INF/classes/org/blah/ when what we really
wanted was a sub-deployment for WEB-INF/classes/. Here is my fix:
File outFile = new File(localCopyDir,
di.shortName+".webinf"+File.separator+name);
outFile.getParentFile().mkdirs();
if (!uclCreated)
{
// ************** NEW CODE
File classesFile = new File(localCopyDir,
di.shortName+".webinf"+File.separator+"WEB-INF"+File.separator+"classes");
DeploymentInfo sub = new DeploymentInfo(classesFile.toURL(), di);
// ************** END NEW CODE
// There is no copying over, just use the url for the UCL
sub.localUrl = sub.url;
// Create a URL for the sub
sub.createClassLoaders();
uclCreated = true;
di.subDeployments.add(sub);
}
I apologize if I am not submitting this fix in the correct format; I am new
to open source development.
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development