I haven't found any Javassist documentation in this regard.
This issue is mentioned, however, in an apache mail list:
The given class loader must have both getResourceAsStream() and
I don't know of any other way to either verify the existence (well, potential loadability) of a class without loading it, or getting the actual class bytes, than using the getResource methods. I know that we (in the Remoting project) also use the getResource methods to get the class bytes to transmit when using remote classloading. I think it's reasonable to require the user to implement at least getResource(URL) in their custom classloader.
I agree with you. But, in this case, I think I'll add an observation to the JBoss AOP docs, to avoid this type of confusion. There is no way the final user could guess that s/he has to overwite those methods without knowing the innerworkings of bytecode instrumentation (unless I'm missing something here).