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.
When trying to profile glassfish v2U1 remotely the process dies with the following exception: SEVERE: CORE5071: An error occured during initialization java.lang.NullPointerException at org.netbeans.lib.profiler.server.ClassBytesLoader.getClassFileBytes(C lassBytesLoader.java:72) at org.netbeans.lib.profiler.server.ProfilerInterface.classLoadHook(Prof ilerInterface.java:860) at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) at java.lang.Class.getConstructor0(Class.java:2699) at java.lang.Class.getConstructor(Class.java:1657) at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:587) at com.sun.enterprise.admin.util.proxy.ProxyFactory.createProxy(ProxyFac tory.java:65) at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.<init>(Sun oneInterceptor.java:166) at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.createInst ance(SunoneInterceptor.java:185) at com.sun.enterprise.admin.server.core.AdminService.init(AdminService.j ava:310) at com.sun.enterprise.admin.server.core.AdminServiceLifeCycle.onInitiali zation(AdminServiceLifeCycle.java:116) at com.sun.enterprise.server.ApplicationServer.onInitialization(Applicat ionServer.java:262) at com.sun.enterprise.server.ondemand.OnDemandServer.onInitialization(On DemandServer.java:101) at com.sun.enterprise.server.PEMain.run(PEMain.java:401) at com.sun.enterprise.server.PEMain.main(PEMain.java:338) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.enterprise.server.PELaunch.main(PELaunch.java:414)
This is caused by a synthetic class being loaded by the system classloader. The profiler tries to load the bytecode from the file defining the class but there is none. Added a simple check for this cases. Checking in ClassBytesLoader.java; /cvs/profiler/libs/jfluid/src/org/netbeans/lib/profiler/server/ClassBytesLoader.java,v <-- ClassBytesLoader.java new revision: 1.2; previous revision: 1.1 done
changing milestone
*** Issue 122631 has been marked as a duplicate of this issue. ***
*** Issue 129874 has been marked as a duplicate of this issue. ***
*** Issue 133062 has been marked as a duplicate of this issue. ***
I'm using the 6.1 version of the profiler and the issue seems to be there, I'm trying to profile tomcat 5x remotely : Exception in thread "Thread-6" java.lang.NullPointerException at org.netbeans.lib.profiler.server.ClassBytesLoader.getClassFileBytes(ClassBytesLoader.java:72) at org.netbeans.lib.profiler.server.ProfilerInterface.classLoadHook(ProfilerInterface.java:860) at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2328) at java.lang.Class.getConstructor0(Class.java:2640) at java.lang.Class.getConstructor(Class.java:1629) at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:587) at sun.reflect.annotation.AnnotationParser.annotationForMap(AnnotationParser.java:239) at sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:229) at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:69) at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:52) at java.lang.Class.initAnnotationsIfNecessary(Class.java:2998) at java.lang.Class.getAnnotation(Class.java:2958) at sun.reflect.annotation.AnnotationType.<init>(AnnotationType.java:104) at sun.reflect.annotation.AnnotationType.getInstance(AnnotationType.java:64) at sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:202) at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:69) at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:52) at java.lang.Class.initAnnotationsIfNecessary(Class.java:2998) at java.lang.Class.getAnnotation(Class.java:2958) at sun.reflect.annotation.AnnotationType.<init>(AnnotationType.java:104) at sun.reflect.annotation.AnnotationType.getInstance(AnnotationType.java:64) at sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:202) ... Best regards, Anis
From the stacktrace it looks like you are running old version of the code. Note that for remote profiling the fix is in 6.1 remote pack. So it does not matter if you are using NetBeans 6.1, you have to have correct remote pack.
VERIFIED in build 200812180001