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.
Environment: 1. Ubuntu 7.10 2. JDK 6u3 3. NetBeans 6.0 4. JBoss 4.2.2 There is a very simple little JSF/EJB3 application that JBoss provides on their web site: http://labs.jboss.com/file-access/default/members/jbossas/freezone/docs/Getting_Started_Guide/beta422/html/Sample_JSF_EJB3_Application.html I created a free form web application for it, which I will attach to this IZ. Since it is free form, I use the "attach" technique for profiling it. The steps are: 1. From the Services tab in the IDE, start JBoss. Do *not* start in "Profile" mode - just do a regular Start. 2. After JBoss starts, use Profile > Attach Profiler 3. In the "Attach to" field choose the free form project ("jsfejb3") 4. Choose CPU profiling 5. Choose Part of Application 6. Choose the constructor of the TodoBean class as the root method 7. Set the filter to "Profile Only Project Classes" 8. Use the wizard to set the Attach Mode to "Local dynamic attach to JBoss 4+" 9. Click the Attach button There is about a 45 second delay (on my 2GHz machine) during which time the CPU is maxed out. Then the "performing instrumentation" dialog is displayed briefly. (As an aside, this seems odd to me - why the 45 seconds of computing at this point? That seems like a long time to calculate the call graph for that constructor, especially since I only requested "project classes" in the filter. But I digress.... :-) ) After the instrumentation is finished, go to the browser and put in http://localhost:8080/jsfejb3/index.faces. Then click the "Create new Todo" link. The browser displays a 500 error, with a stack trace that starts with: java.lang.NoClassDefFoundError: org/netbeans/lib/profiler/server/ProfilerRuntimeCPUFullInstr TodoBean.<init>(TodoBean.java:19) sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) java.lang.reflect.Constructor.newInstance(Constructor.java:513) java.lang.Class.newInstance0(Class.java:355) java.lang.Class.newInstance(Class.java:308) com.sun.faces.config.ManagedBeanFactoryImpl.newInstance(ManagedBeanFactoryImpl.java:277) com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManagedBeans(ApplicationAssociate.java:546) com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:82) javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
Created attachment 55261 [details] sample application
Unfortunately, this seems to be a problem in JBoss. The same result I get whenever I use the AttachAPI to instrument JBoss AS. I tried BTrace to confirm that the problem is not in the profiler code - and it fails the same. It seems that JBoss makes the classes loaded through AttachAPI somehow invisible to at least EL engine which is responsible for instantiating the TodoBean class. The only workaround is to use direct attach instead. This way the EL engine has access to all required classes.