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.
Summary: | Cannot profile main project (Maven - netbeans Platform) | ||
---|---|---|---|
Product: | apisupport | Reporter: | borre |
Component: | Maven | Assignee: | Jesse Glick <jglick> |
Status: | VERIFIED FIXED | ||
Severity: | normal | CC: | geertjan, jglick, magne_n, musilt2, sdrinovsky, shuji, yardus |
Priority: | P3 | ||
Version: | 7.0 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | 201132 | ||
Bug Blocks: | |||
Attachments: | messages.log - the file was cleared before reproducing the bug |
Description
borre
2011-07-06 14:09:38 UTC
I am able to confirm that profiling NB platform application is not working. However, the symptoms are a bit different on my side - the profiled application is started fine but with incorrect JVM arguments resulting in the profiler agent not being started. Could you attach your IDE messages.log file to provide more information about what is going on? Created attachment 109286 [details] messages.log - the file was cleared before reproducing the bug The profiling hangs at dialog box "Connectint to VM" This is the output: cd C:\OPUS\TRY-BORRE-SIMCON\opus-gen2\opus-g2-simcon\application; "JAVA_HOME=C:\\Program Files\\Java\\jdk1.6.0_25" "\"C:\\Program Files\\NetBeans 7.0\\java\\maven\\bin\\mvn.bat\"" -Dprofiler.action=profile "-Dnetbeans.run.params=-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=\\\"C:\\Documents and Settings\\osc\\.netbeans\\7.0\\var\\cache\\mavencachedirs\\97301660\\org-netbeans-modules-profiler\\\" \\\"-agentpath:C:/Program Files/NetBeans 7.0/profiler/lib/deployed/jdk16/windows/profilerinterface.dll=C:/Program Files/NetBeans 7.0/profiler/lib,5140,10\\\" -classpath %classpath ${packageClassName}" "-Dexec.executable=C:\\Program Files\\Java\\jdk1.6.0_25\\bin\\java.exe" nbm:cluster nbm:run-ide Scanning for projects... ------------------------------------------------------------------------ Building OPUS :: GEN2 :: SIMCON :: App 1.14-SNAPSHOT ------------------------------------------------------------------------ [nbm:cluster] Created NetBeans module cluster(s) at C:\OPUS\TRY-BORRE-SIMCON\opus-gen2\opus-g2-simcon\application\target\netbeans_clusters [nbm:run-ide] ------------------------------------------------------------------------ BUILD FAILURE ------------------------------------------------------------------------ Total time: 3.594s Finished at: Thu Jul 07 13:25:53 CEST 2011 Final Memory: 7M/247M ------------------------------------------------------------------------ Failed to execute goal org.codehaus.mojo:nbm-maven-plugin:3.4:run-ide (default-cli) on project application: The parameters 'netbeansInstallation' for goal org.codehaus.mojo:nbm-maven-plugin:3.4:run-ide are missing or invalid -> [Help 1] To see the full stack trace of the errors, re-run Maven with the -e switch. Re-run Maven using the -X switch to enable full debug logging. For more information about the errors and possible solutions, please read the following articles: [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginParameterException Ok, thanks. Now it's clear that there is a common root cause even though the profiled application doesn't even start on windows while, on linux, it does. The culprit is incorrect handling of extra JVM arguments - the maven goal "nbm:run-ide" requires them to be prefixed with "-J" in order to pass them to the platform correctly. OK, thanks for very swift reply. Is there anything I can do here to make it work? Can I for instance alter the JVM arguments (${profiler.args} - right?) in any way? Or do I have to wait for an update? There is no easy way to workaround this :( The only thing you could do would be to manually run your application with the correct JVM arguments and then attach to it from the IDE (Profile/Attach Profiler...) as local direct attach to a java application. NetBeans Platform profiling is important, many users are on Windows with Maven. What needs to be done to fix this problem? (In reply to comment #0) > Failed to execute goal org.codehaus.mojo:nbm-maven-plugin:3.4:run-ide > (default-cli) on project application: The parameters 'netbeansInstallation' for > goal org.codehaus.mojo:nbm-maven-plugin:3.4:run-ide are missing or invalid -> > [Help 1] See bug #199809 and either define this property or use a real application project, not a "suite". (In reply to comment #3) > The culprit is incorrect handling of extra JVM arguments - the maven goal > "nbm:run-ide" requires them to be prefixed with "-J" in order to pass them to > the platform correctly. It appears that maven.profiler/src/org/netbeans/modules/maven/profiler/ActionMappings.xml defines things which perhaps ought to be in maven.apisupport, and which are wrong. Ok, I've prepared a aquick fix in profiler maven support for providing JVM args prefixed by -J. Just reassign the issue back to me when the generic maven support fix is ready and rhere is still meed for adjustment in profiler. Thank you! I'm very impressed by the response and interest in bugs that are reported. How can I apply the quick fix? I have an out of memory exception that I really would like to have resolved before the holidays ;-) Maybe J Bachorik could provide a detailed "how to" regarding Comment #5? How do I manually run the application and where do I correct which arguments? (In reply to comment #8) > I've prepared a aquick fix in profiler maven support for providing JVM args > prefixed by -J. Already prepared that part myself, in testing now. core-main #fd2ce7834e6c Hi. I checked out the core-main branch, compiled it and installed the plugin. When profiling main project, this is the command Netbeans tried to run: cmd.exe /X /C "C:\OPUS\TRY-BORRE-SIMCON\opus-gen2\opus-g2-simcon\application\target\opus_g2_simcon\bin\opus_g2_simcon.exe --console suppress --userdir C:\OPUS\TRY-BORRE-SIMCON\opus-gen2\opus-g2-simcon\application\target\userdir -J-Dnetbeans.logger.console=true -J-ea --branding opus_g2_simcon --jdkhome "C:\Program Files\Java\jdk1.6.0_25" -J-XX:+HeapDumpOnOutOfMemoryError "-J-XX:HeapDumpPath=C:\Documents -Jand -JSettings\osc\.netbeans\7.0\var\cache\mavencachedirs\97301660\org-netbeans-modules-profiler" "-J-agentpath:C:/Program -JFiles/NetBeans -J7.0/profiler/lib/deployed/jdk16/windows/profilerinterface.dll=C:/Program -JFiles/NetBeans -J7.0/profiler/lib,5140,10" --jdkhome C:\Program Files\Java\jdk1.6.0_25" Some "s are missing and there are too many -Js Should work fine if you use file paths without spaces, which is a big improvement from the previous state that never worked. Someday when I have the time (patched welcome) I will fix it up to deal with quoted paths with spaces in them, which is mainly of interest to Windows users. Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/fd2ce7834e6c User: Jesse Glick <jglick@netbeans.org> Log: #199922: Cannot profile main project (Maven - netbeans Platform) *** Bug 195919 has been marked as a duplicate of this bug. *** Is the solution so far (as described in Comment #13) a part of Netbeans 7.0.1? I am trying to profile a NB platform application on Windows. Java is installed in C:\Java and Netbeans is installed in C:\Netbeans (no spaces). My NB Platform application is also in a path without spaces - but it fails... (In reply to comment #16) > Is the solution so far (as described in Comment #13) a part of Netbeans 7.0.1? No, 7.1. Reclosing as the primary bug was in fact fixed for 7.1 (and could perhaps be backported if VERIFIED). Will file a separate bug for the space in path issue. Borre, could you please download latest dev build (which contains fix) from http://bits.netbeans.org/trunk/nightly/latest/ and try if it works? If it does,please let us know ASAP and we will make it part of 7.0.1 patch. (In reply to comment #16) > Is the solution so far (as described in Comment #13) a part of Netbeans 7.0.1? > I am trying to profile a NB platform application on Windows. Java is installed > in C:\Java and Netbeans is installed in C:\Netbeans (no spaces). My NB Platform > application is also in a path without spaces - but it fails... (In reply to comment #19) I did this a couple of days ago and it works on Windows where both Netbeans and jdk are installed on paths without whitespace. Thanks, marking verified then and we can proceed in putting this fix into 7.0.1 patch 1. As mentioned, feel free to create new report for space in path issue. Thanks. (In reply to comment #21) > feel free to create new report for space in path issue. I already filed that: bug #201132 releases #a4b16c494a0e Integrated into 'releases' Changeset: http://hg.netbeans.org/releases/rev/a4b16c494a0e User: Jesse Glick <jglick@netbeans.org> Log: #199922: Cannot profile main project (Maven - netbeans Platform) (transplanted from fd2ce7834e6ca16754f93e9fadaa75d7f63959bb) verified on 7.0.1.patch1 Integrated into 'releases' Changeset: http://hg.netbeans.org/releases/rev/9dc63568d2fe User: Jesse Glick <jglick@netbeans.org> Log: #199922: Cannot profile main project (Maven - netbeans Platform) (transplanted from fd2ce7834e6ca16754f93e9fadaa75d7f63959bb) *** Bug 198401 has been marked as a duplicate of this bug. *** |