This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
java.lang.NullPointerException at com.sun.tools.profiler.classfile.ClassRepository.tryLoadRealClass (ClassRepository.java:171) at com.sun.tools.profiler.classfile.ClassRepository.lookupClass (ClassRepository.java:153) at com.sun.tools.profiler.classfile.ClassRepository.lookupClass (ClassRepository.java:109) at com.sun.tools.profiler.instrumentation.ClassManager.javaClassForName (ClassManager.java:43) at com.sun.tools.profiler.instrumentation.ClassManager.javaClassForName (ClassManager.java:57) at com.sun.tools.profiler.instrumentation.RecursiveMethodInstrumentor.addToSubclass List(RecursiveMethodInstrumentor.java:100) at com.sun.tools.profiler.instrumentation.RecursiveMethodInstrumentor3.getMethodsTo InstrumentUponClassLoad(RecursiveMethodInstrumentor3.java:124) at com.sun.tools.profiler.instrumentation.Instrumentor.createFollowUpInstrumentMeth odGroupResponseForCallGraph(Instrumentor.java:439) at com.sun.tools.profiler.instrumentation.Instrumentor.createFollowUpInstrumentMeth odGroupResponse(Instrumentor.java:135) at com.sun.tools.profiler.ProfilerClient.instrumentMethodGroupFollowUp (ProfilerClient.java:881) at com.sun.tools.profiler.ProfilerClient.access$2800 (ProfilerClient.java:46) [catch] at com.sun.tools.profiler.ProfilerClient$SeparateCmdExecutionThread.run (ProfilerClient.java:1565)
This happened to Radim while profiling NetBeans IDE
Created attachment 27431 [details] IDE log
It happened to be when I was profiling the IDE. It froze, so the dialog popped up saying that the target app is frozen, I chose not to stop profiling. After a while I killed the profiled IDE => exception.
Appears when I modified profiling from object liveness to object allocation of a web application.
Profiler 5.5 log: *** Profiler error (Tue Jul 11 10:30:08 CEST 2006): in getMonitoredData(), caught exception: com.sun.tools.profiler.client.ClientUtils$TargetAppOrVMTerminated: Target JVM inactive *** Profiler warning (Tue Jul 11 10:30:08 CEST 2006): class org/apache/juli/ClassLoaderLogManager, ldr = 0 not found anywhere *********** Exception occurred ************ at 10:30 AM on Jul 11, 2006 java.lang.NullPointerException com.sun.tools.profiler.classfile.ClassRepository.tryLoadRealClass(ClassRepository.java:191) com.sun.tools.profiler.classfile.ClassRepository.lookupClass(ClassRepository.java:170) com.sun.tools.profiler.classfile.ClassRepository.lookupClass(ClassRepository.java:117) com.sun.tools.profiler.instrumentation.ClassManager.javaClassForName(ClassManager.java:43) com.sun.tools.profiler.instrumentation.MemoryProfMethodInstrumentor.findAndMarkMethodsToInstrumentInClass(MemoryProfMethodInstrumentor.java:90) com.sun.tools.profiler.instrumentation.MemoryProfMethodInstrumentor.getInitialMethodsToInstrument(MemoryProfMethodInstrumentor.java:63) com.sun.tools.profiler.instrumentation.Instrumentor.createInitialInstrumentMethodGroupResponseForMemoryProfiling(Instrumentor.java:430) com.sun.tools.profiler.instrumentation.Instrumentor.createInitialInstrumentMethodGroupResponse(Instrumentor.java:89) com.sun.tools.profiler.ProfilerClient.instrumentMethodGroupFromRoot(ProfilerClient.java:868) com.sun.tools.profiler.ProfilerClient.access$2800(ProfilerClient.java:46) com.sun.tools.profiler.ProfilerClient$SeparateCmdExecutionThread.run(ProfilerClient.java:1582)
Probably thanks to race conditions in the JFluid communication protocol the engine tries to load a class before ProfilerClient calls its setVMProperties, initializing the search classpath, thus accessing not initialized classPath property. The fix is only a workaround for the syndrom - NPE. Now the classpath is is checked before used by the engine.