Hi,

I've been playing with the classloader issues. Apparently I've broken Texen with the new "feature" of using the Thread context classloader to load user-supplied classes. [1] The issue is that the way ant handles classloaders. A standard "ant test" works, but when GUMP calls ant with the "build.sysclasspath" [2] option it breaks. Here's how to replicate the problem with ant 1.6:

cd build
set CLASSPATH=lib\oro.jar;lib\logkit-1.0.1.jar;lib\commons-collections.jar;lib\jdom-1.0.jar;lib\log4j-1.2.8.jar;..\bin\classes;..\test\texen-classpath\test.jar
ant -debug -Dbuild.sysclasspath=only -f testcases.xml test-texen-classpath


This fails due to a problem loading the class ResourceManagerImpl. I think it's loading ResourceManagerImpl class from one classloader but ResourceManager from another. The specific error message:

java.lang.Exception: The specified class for ResourceManager (org.apache.velocity.runtime.resource.ResourceManagerImpl) does not implement org.apache.runtime.resourcee.ResourceManager.

Here's a fix (which I don't really understand). If you edit "testcases.xml" and remove the reverseloader="true" attribute, it works both from the command line and from the call above.

Question - is this an acceptable fix? I can't find any docs on reverseloader attribute. There's a print statement that says it's deprecated, but it's totally undocumented. Can anyone explain it - is it safe to remove? I suspect we might break compatibility with earlier versions of ant. Our docs claim ant 1.3 is the minimum (that's 4 1/2 years old).

Best,

WILL

[1] http://issues.apache.org/bugzilla/show_bug.cgi?id=31721
[2] http://ant.apache.org/manual/sysclasspath.html



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to