Question

I have Oracle GlassFish 3.1.2.2 (build 5) server plugged with my own javaagent.

The javaagent instruments specific classes(say servlets) by injecting a piece of bytecode which referes to classes available in javaagent.jar. When the injected fragment is getting executed, glassfish throws NoClassDefError.

I wonder the expected class is already loaded by base classloader and should be visible to the child loaders. Tried OSGi boot delegation, but no use. Where I'm going worng ?

Was it helpful?

Solution

Keeping the javaagent.jar in domains/domain1/lib/ext solves this issue. Hope the solution helps someone in future ..

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top