Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 195919 - Don't work Profile when Maven NetBeans Application project
Don't work Profile when Maven NetBeans Application project
Status: RESOLVED DUPLICATE of bug 199922
Product: apisupport
Classification: Unclassified
Component: Maven
All All
: P3 (vote)
: 7.0
Assigned To: Jesse Glick
Depends on:
  Show dependency treegraph
Reported: 2011-02-24 00:54 UTC by shuji
Modified: 2011-07-13 15:21 UTC (History)
0 users

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
Description shuji 2011-02-24 00:54:27 UTC
1. create a new Maven NetBeans Application project.
2. run Profile
3. Don't work

Error Log:
NetBeans: Executing 'C:\Application\apache-maven-2.2.1\bin\mvn.bat -Dnetbeans.execution=true -Dprofiler.action=profile -XX:HeapDumpPath=\"C:\Documents and Settings\shuji\.netbeans\6.9\var\cache\mavencachedirs\578233024\org-netbeans-modules-profiler\"  \"-agentpath:C:/Program Files/NetBeans 6.9.1/profiler/lib/deployed/jdk16/windows/profilerinterface.dll=C:/Program Files/NetBeans 6.9.1/profiler/lib,5140,10\" -classpath %classpath ${packageClassName} -Dexec.executable=C:\Program Files\Java\jdk1.6.0_22\bin\java.exe -Dnetbeans.execution=true nbm:cluster nbm:run-ide'
NetBeans:      JAVA_HOME=C:\Program Files\Java\jdk1.6.0_22
Scanning for projects...
Building Sample - application
   task-segment: [nbm:cluster, nbm:run-ide] (aggregator-style)
Created NetBeans module cluster(s) at C:\Projects\sample\application\target\netbeans_clusters
One or more required plugin parameters are invalid/missing for 'nbm:run-ide'

[0] Inside the definition for plugin 'nbm-maven-plugin' specify the following:



on the command line, specify: '-Dnetbeans.installation=VALUE'

For more information, run Maven with the -e switch
Total time: 1 second
Finished at: Thu Feb 24 09:51:48 JST 2011
Final Memory: 9M/22M
Comment 1 Jesse Glick 2011-02-28 15:15:51 UTC
Ought to be run-platform, not run-ide. Even with that the profiler does not succeed in attaching for some reason.
Comment 2 sworisbreathing 2011-07-13 15:01:48 UTC
I see the same issue in NetBeans 7.0.  I got around the error message by adding the following property to the nbm-application's pom:


That's the path for Mac OS X.  I'm not sure what it is for Windows, but it's whatever folder contains the NetBeans bin folder.

Doing that, I ran into the issues that Jesse lists.  By default, the 'Profile' action in the project's pop-up menu runs the 'run:ide' goal, which loads up an empty NetBeans IDE instead of my application, and the profiler won't attach.
Comment 3 sworisbreathing 2011-07-13 15:18:43 UTC
As a workaround, you can run the application normally and then attach the profiler to the running application.  For the attachment settings, you want target type 'Application', attach method 'Local', and Attach Invocation 'Dynamic (Java SE 6.0/7.0)'.  Attach to '<External Application>', and when prompted to select a process to attach, choose the 'org.netbeans.Main' process whose arguments match your application.
Comment 4 Jesse Glick 2011-07-13 15:21:39 UTC
It does not work at all in NB 7.0. For 7.1 (so far) it works so long as you do not use spaces in critical paths.

*** This bug has been marked as a duplicate of bug 199922 ***

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo