I'm trying to instrument JBoss AS 7 using btrace but can't get it to work. I'm using visualvm 1.3.7 and the btrace workbench 0.6.7 (right click -> "Trace applicaiton..."). I'm always setting the following non-descriptive error.
!!! Error occured
!!! Error occured
What I tried is setting the following VM options
-Djboss.modules.system.pkgs=com.sun.btrace,com.sun.btrace.annotations
-Xbootclasspath/a:/path/to/btrace-boot-1.2.3.jar
but no avail. I am running on Java 8.
Even simple scripts like this don't work:
import static com.sun.btrace.BTraceUtils.println;
import com.sun.btrace.annotations.BTrace;
import com.sun.btrace.annotations.Kind;
import com.sun.btrace.annotations.Location;
import com.sun.btrace.annotations.OnMethod;
@BTrace
public class Simple {
@OnMethod(
clazz = "com.acme.Main",
method = "main",
location = @Location(Kind.ENTRY)
)
public static void mainEjbCall() {
println("enter");
}
}
* Update *
Yes, I assume it's a JBoss AS classloader issue but I don't know how to fix it.
I can profile normal Java 8 applications (even though I get an exception from the ASM ClassReader).