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: Windows XP / JDK5u5 / NetBeans IDE 5.5 Beta2 / NetBeans Profiler 5.5 Beta2 / JBoss 4.0.4 w/EJB3 support. I right-click the entry for JBoss in the Runtime window and choose Start in Profiling mode. I get a message dialog that says an error occurred starting JBoss in profiling mode. No message is displayed in the Output window. Message log file is attached. Note: 1. JBoss can be started in "normal" mode without any problems. 2. The bundled Tomcat server can be started in profiling mode without any problems.
Created attachment 32066 [details] Log file
Used to work correctly in Beta 1 and no changes were done in Profiler code, so assigning to serverplugins. Seems like the plugin incorrectly passes provided JVM arguments and/or doesn't check Profiler agents state properly.
I tried on Windows XP/Linux, JDK5u7, NB55beta2/NB daily build, NB profiler 55beta2/ NB profiler 55 daily build (also from installer and archive, it shouldn't be difference I guess), JBoss default profile (installed from ZIP archive) and JBoss EJB3 profile (Windows only). I usually started with a clean userdir. No problems, no exceptions -> closing. BTW, the code in JBoss plugin inside NB regarding profiling was not changed since it was released for the first time. Reopen if you can reproduce the bug on the latest NB build using a clean userdir. Please provide reproducing steps starting from the main window opening.
FWIW, in an email I recall Jiri said he was able to reproduce this problem. Regardless of that, starting with a clean user dir I can reproduce it with these steps (using the same env. reported initially): 1. Delete the IDE's userdir 2. Right-click the Beta2 icon on the desktop 3. After the window opens, click the Runtime window 4. Expand the list of Servers - only Tomcat is listed 5. Tools > Server Manager. Register installation of JBoss 4.0.4, take all the defaults. 6. Right-click the entry for JBoss in the Runtime window and choose Start in Profile mode. Works fine. 7. Choose Profile > Attach Profiler. For project choose <Global attach>. Click the Monitor Appplication button (make sure threads monitoring is turned on) and then the Attach button. Attaches with no problem. 8. Choose Profile > Detach. Do *not* stop the profiled JVM. 9. In the Runtime window, right-click the entry for JBoss and select Stop. 10. Create a new web application, using the JSTLExample application that is included with the IDE. 11. Change the JSTLExample project's runtime from Tomcat to JBoss. 12. Run the JSTLExample application. It builds, JBoss gets started, the app. is deployed and then the browser displays the app without any problems. 13. Right-click the JSTLExample application and choose Profile Project. JBoss gets stopped and the output window has these lines: Stopping server JBoss Application Server 4.0.4 Stopping JBoss Application Server 4.0.4 Stopping JBoss Application Server 4.0.4 Stopping JBoss Application Server 4.0.4 Stopping JBoss Application Server 4.0.4 Stopping JBoss Application Server 4.0.4 Stopping JBoss Application Server 4.0.4 JBoss Application Server 4.0.4 Stopped Starting server JBoss Application Server 4.0.4 in profile mode Starting JBoss Application Server 4.0.4 But it never starts - there is no CPU or disk activity. The Runtime window shows an hour-glass cursor next to the entry for JBoss. 14. Shutdown the IDE. Click OK when prompted to end the two processes (JSTLExample and the attempt to start JBoss). 15. Restart the IDE. 16. In the Runtime window, right-click the entry for JBoss and choose Start in Profiling mode. The originally reported error dialog is displayed: JBoss Application server 4.0.4 start for profiling failed. 17. Shutdown the IDE. New message log attached.
Created attachment 32242 [details] message log file
For quick evaluation, I've installed NB 55b1 & Profiler 55b1 and NB 55b2 & Profiler 55b2. In b1 JBoss profiling works without problems, in b2 bugs reported in this issue occured. To be sure that the bug isn't at Profiler side, I've tried NB 55b1 & Profiler 55b2 and NB 55b2 & Profiler 55b1 configurations, problems are still occuring in NB 55b2 release whereas NB 55b1 works fine.
Steps to reproduce, v1: 0/ Windows XP Eng, JDK 1.5.0_06, JBoss 4.0.3sp1 1/ Downloaded NetBeans 5.5 Beta 2 and Profiler 5.5 Beta 2 from netbeans.org 2/ Downloaded JBoss 4.0.3sp from jboss.com 3/ Installed NetBeans & Profiler to default locations 4/ Registered JBoss in Server Manager 5/ Runtime tab - Servers - JBoss - Start in Profile Mode [JDK 1.5 (Default)] 6/ !!! Starting JBoss in Profile Mode (endless progress) JBoss 4.0.3sp1 console: =============================================================================== . JBoss Bootstrap Environment . JBOSS_HOME: D:\Software\JBoss\jboss-4.0.3SP1\bin\\.. . JAVA: D:\Software\Java\jdk1.5.0\bin\java . JAVA_OPTS: -Dhttp.proxyHost=webcache.holland.sun.com -Dhttp.proxyPort=8080 - Dhttp.nonProxyHosts="localhost|127.0.0.1|jis-nb-profiler|jis-nb- profiler.czech.sun.com" -Dhttps.proxyHost=webcache.holland.sun.com - Dhttps.proxyPort=8080 -agentpath:"C:\Program Files\netbeans-5.5beta2\profiler1 \lib\deployed\jdk15\windows\profilerinterface.dll=\"C:\Program Files\netbeans- 5.5beta2\profiler1\lib\"",5140 -Dnbprofiler.agentid=1487065568 - Dprogram.name=run.bat -Xms128m -Xmx512m . CLASSPATH: D:\Software\Java\jdk1.5.0\lib\tools.jar;D:\Software\JBoss\jboss- 4.0.3SP1\bin\\run.jar . =============================================================================== . Profiler Agent: Waiting for connection on port 5140 (Protocol version: 2) IDE console: >>> Generated settings for server startup - direct attach (blocking): ProfilerServerSettings [ javaPlatform: JDK 1.5 (Default) jvmarg: -agentpath:"C:\Program Files\netbeans-5.5beta2\profiler1 \lib\deployed\jdk15\windows\profilerinterface.dll=\"C:\Program Files\netbeans- 5.5b eta2\profiler1\lib\"",5140 -Dnbprofiler.agentid=1825723249 env: ] >>> Profiler agent [port=5140, id=1825723249]: STATE_STARTING Buggy behavior: JBoss detects only STATE_STARTING agent state, does not ask for other profiler states and waits forever. Correct behavior: JBoss should test profiler states till STATE_BLOCKED and then finish as started for profiling with appropriate icon in Runtime tab (see Tomcat which works correctly).
Steps to reproduce, v2: 0/ Windows XP Eng, JDK 1.5.0_06, JBoss 4.0.3sp1 1/ Downloaded NetBeans 5.5 Beta 2 and Profiler 5.5 Beta 2 from netbeans.org 2/ Downloaded JBoss 4.0.3sp from jboss.com 3/ Installed NetBeans & Profiler to default locations 4/ Registered JBoss in Server Manager 5/ New Project JSP Example, run on JBoss 6/ !!!Start profiling, Monitoring - (endless progress): JBoss 4.0.3sp1 console: =============================================================================== . JBoss Bootstrap Environment . JBOSS_HOME: D:\Software\JBoss\jboss-4.0.3SP1\bin\\.. . JAVA: D:\Software\Java\jdk1.5.0\bin\java . JAVA_OPTS: -Dhttp.proxyHost=webcache.holland.sun.com -Dhttp.proxyPort=8080 - Dhttp.nonProxyHosts="localhost|127.0.0.1|jis-nb-profiler|jis-nb- profiler.czech.sun.com" -Dhttps.proxyHost=webcache.holland.sun.com - Dhttps.proxyPort=8080 -agentpath:"C:\Program Files\netbeans-5.5beta2\profiler1 \lib\deployed\jdk15\windows\profilerinterface.dll=\"C:\Program Files\netbeans- 5.5beta2\profiler1\lib\"",5140 -Dnbprofiler.agentid=2084593926 - Dprogram.name=run.bat -Xms128m -Xmx512m . CLASSPATH: D:\Software\Java\jdk1.5.0\lib\tools.jar;D:\Software\JBoss\jboss- 4.0.3SP1\bin\\run.jar . =============================================================================== . Profiler Agent: Waiting for connection on port 5140 (Protocol version: 2) JSPExample (profile-j2ee) console: profile-j2ee: Duplicated project name in import. Project JSPExample-impl defined first in C:\Temp\JSPExample\nbproject\ant-deploy.xml and again in C:\Temp\JSPExample\nbproject\build-impl.xml start-profiled-server-noenv: Starting server JBoss 4.0.3sp1 in profile mode Starting JBoss 4.0.3sp1 IDE console: >>> Profiler agent [port=5140, id=2084593926]: STATE_STARTING JBoss seems to hang on STATE_STARTING state and never detect STATE_BLOCKING. This blocks application deployment and further processing the Profile Project action. Again, see Tomcat which works correctly.
I've just reproduced exactly the same problems using latest daily build of NB 55 (netbeans-5_5-daily-bin-200608100000-10_Aug_2006_0000) and latest daily build of Profiler 55.
Fixed in release55 branch. Checking in JBLogWriter.java; /cvs/serverplugins/jboss4/src/org/netbeans/modules/j2ee/jboss4/ide/JBLogWriter.java,v <-- JBLogWriter.java new revision: 1.3.42.9; previous revision: 1.3.42.8 done Checking in JBStartRunnable.java; /cvs/serverplugins/jboss4/src/org/netbeans/modules/j2ee/jboss4/ide/Attic/JBStartRunnable.java,v <-- JBStartRunnable.java new revision: 1.1.2.9; previous revision: 1.1.2.8 done
Verified
Fixed in release55_beta2_jboss branch along with addional logging (issue 82717). Checking in JBLogWriter.java; /cvs/serverplugins/jboss4/src/org/netbeans/modules/j2ee/jboss4/ide/JBLogWriter.java,v <-- JBLogWriter.java new revision: 1.3.42.7.6.2; previous revision: 1.3.42.7.6.1 done Checking in JBStartRunnable.java; /cvs/serverplugins/jboss4/src/org/netbeans/modules/j2ee/jboss4/ide/Attic/JBStartRunnable.java,v <-- JBStartRunnable.java new revision: 1.1.2.7.6.1; previous revision: 1.1.2.7 done Checking in JBStopRunnable.java; /cvs/serverplugins/jboss4/src/org/netbeans/modules/j2ee/jboss4/ide/Attic/JBStopRunnable.java,v <-- JBStopRunnable.java new revision: 1.1.2.4.6.1; previous revision: 1.1.2.4 done
Forgotten commit log. Checking in Bundle.properties; /cvs/serverplugins/jboss4/src/org/netbeans/modules/j2ee/jboss4/ide/Bundle.properties,v <-- Bundle.properties new revision: 1.5.8.3.2.3.6.1; previous revision: 1.5.8.3.2.3 done