I've been doing this:
- Enable remote debugging on jboss
- Connect a debugger (such as eclipse debugger) to JBoss instance
- Define a breakpoint to catch any ClassNotFoundExceptions
- Activate the code
- When the breakpoint is hit, examine the used classloader and see what the list of loaded classes look like, which should give clues as to why class loading is failing
Even if the compiler works, it might be that classloader has not the visibility to class(es) in question.