Looks like we both encountered the same problem. I ran into this when implementing the change requested in JBASM-12. Initially planned to look up the Context.PROVIDER_URL to determine the URL to use for shutdown but chose an alternative due to this error. I took the easy way out but am interested to know if it is possible.
I found http://java.sun.com/products/jndi/tutorial/beyond/misc/classloader.html.
I will try with Thread.setContextClassLoader() although that could have unexpected side effects if different tasks set it
I find somebody was in the same situation and resolved his problem that way
Actually seems like apache-ant's junit task in 1.7.x is using the same and there are plans for more tasks to support it.
I will need to dig deeper into it to see what would be the "correct" way for implementing it...[/url]
They don't seem to be doing too much magic. Just set as a loader what loaded the JUnitTask and add additional path as specified by the user.
But I have another problem in jboss-test... Anyways things are now pretty clear. I'll start another thread in the internal testing forum once I do some testing.