btraceio / btrace

BTrace - a safe, dynamic tracing tool for the Java platform
5.8k stars 956 forks source link

[BTRACE-80] XML probe mapping not found #100

Closed lhotari closed 9 years ago

lhotari commented 9 years ago

Issue https://kenai.com/jira/browse/BTRACE-80 copied here. It's a problem in using xml probe mappings.

I noticed that it doesn't work with Java 1.8.0_25, but works with 1.7.0_60 .

with Java 1.8.0_25 the probe mappings get loaded, but nothing is found. "no probe mappings for " message gets printed:

btrace DEBUG: debugMode is true
btrace DEBUG: unsafeMode is true
btrace DEBUG: dumpClasses is false
btrace DEBUG: stdout is true
btrace DEBUG: probe descriptor path is /Users/lari/workspace-grails3/NewSimple/btrace-probes
btrace DEBUG: found scriptdir: /Users/lari/workspace-grails3/NewSimple/build/btrace-scripts
btrace DEBUG: verifying BTrace class
btrace DEBUG: verified 'SimpleProfiler' successfully
btrace DEBUG: about to load probe descriptor for profiler-probes
btrace DEBUG: probe descriptor for profiler-probes is /Users/lari/workspace-grails3/NewSimple/btrace-probes/profiler-probes.xml
btrace DEBUG: reading /Users/lari/workspace-grails3/NewSimple/btrace-probes/profiler-probes.xml
btrace DEBUG: read probe descriptor for profiler-probes
btrace DEBUG: no probe mappings for profiler-entry
btrace DEBUG: about to load probe descriptor for profiler-probes
btrace DEBUG: probe descriptor cache hit for profiler-probes
btrace DEBUG: no probe mappings for profiler-exit
btrace DEBUG: created class filter
btrace DEBUG: preprocessing BTrace class SimpleProfiler
btrace DEBUG: preprocessed BTrace class SimpleProfiler
btrace DEBUG: creating BTraceRuntime instance for SimpleProfiler
btrace DEBUG: created BTraceRuntime instance for SimpleProfiler
btrace DEBUG: removing @OnMethod, @OnProbe methods
btrace DEBUG: removed @OnMethod, @OnProbe methods
btrace DEBUG: sending Okay command
btrace DEBUG: client SimpleProfiler: got com.sun.btrace.comm.OkayCommand@33e5ccce
btrace DEBUG: about to defineClass SimpleProfiler
btrace DEBUG: defineClass succeeded for SimpleProfiler
btrace DEBUG: parsed command line arguments
btrace DEBUG: noServer is true, server not started
btrace DEBUG: new Client created com.sun.btrace.agent.FileClient@39bd5f07
btrace DEBUG: client SimpleProfiler: got com.sun.btrace.comm.OkayCommand@15b5ca8d
btrace DEBUG: client SimpleProfiler: got com.sun.btrace.comm.GridDataCommand@1b72364b

Successful debug output in Java 1.7.0_60

btrace DEBUG: debugMode is true
btrace DEBUG: unsafeMode is true
btrace DEBUG: dumpClasses is false
btrace DEBUG: stdout is true
btrace DEBUG: probe descriptor path is /Users/lari/workspace-grails3/NewSimple/btrace-probes
btrace DEBUG: found scriptdir: /Users/lari/workspace-grails3/NewSimple/build/btrace-scripts
btrace DEBUG: verifying BTrace class
btrace DEBUG: verified 'SimpleProfiler' successfully
btrace DEBUG: about to load probe descriptor for profiler-probes
btrace DEBUG: probe descriptor for profiler-probes is /Users/lari/workspace-grails3/NewSimple/btrace-probes/profiler-probes.xml
btrace DEBUG: reading /Users/lari/workspace-grails3/NewSimple/btrace-probes/profiler-probes.xml
btrace DEBUG: read probe descriptor for profiler-probes
btrace DEBUG: found probe mappings for profiler-entry
btrace DEBUG: about to load probe descriptor for profiler-probes
btrace DEBUG: probe descriptor cache hit for profiler-probes
btrace DEBUG: found probe mappings for profiler-exit
btrace DEBUG: created class filter
btrace DEBUG: preprocessing BTrace class SimpleProfiler
btrace DEBUG: preprocessed BTrace class SimpleProfiler
btrace DEBUG: creating BTraceRuntime instance for SimpleProfiler
btrace DEBUG: created BTraceRuntime instance for SimpleProfiler
btrace DEBUG: removing @OnMethod, @OnProbe methods
btrace DEBUG: removed @OnMethod, @OnProbe methods
btrace DEBUG: sending Okay command
btrace DEBUG: client SimpleProfiler: got com.sun.btrace.comm.OkayCommand@156fb054
btrace DEBUG: about to defineClass SimpleProfiler
btrace DEBUG: defineClass succeeded for SimpleProfiler
btrace DEBUG: parsed command line arguments
btrace DEBUG: noServer is true, server not started
btrace DEBUG: new Client created com.sun.btrace.agent.FileClient@3e5052b9
btrace DEBUG: filtering loaded classes
btrace DEBUG: candidate class java.util.Hashtable added
lhotari commented 9 years ago

Might be related to http://stackoverflow.com/questions/2690206/jaxb-does-not-call-setter-when-unmarshalling-objects .

lhotari commented 9 years ago

PR #101 fixes this problem.