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.
Created attachment 164717 [details] IDE Log This happens with the most basic Maven project: public class Main { public static void main(String[] args){ System.out.println("Hello"); } } Menu|Profile||Profile File Profiler prompt waiting: title "Progress..." Body: Connecting to target VM... Output: cd C:\bt\java\netbeans\bugs\_new\ProfilerCommandError\Profiler; "JAVA_HOME=C:\\Program Files\\Java\\jdk1.8.0_131" M2_HOME=C:\\prog\\apache-maven-3.5.0 cmd /c "\"\"C:\\prog\\apache-maven-3.5.0\\bin\\mvn.cmd\" -Dexec.args=\"-agentpath:\\\"C:/Program Files/NetBeans 8.2/profiler/lib/deployed/jdk16/windows-amd64/profilerinterface.dll\\\"=\\\"C:\\Program Files\\NetBeans 8.2\\profiler\\lib\\\",5140,10 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=C:\\Users\\user\\AppData\\Local\\NetBeans\\Cache\\8.2\\mavencachedirs\\694736397\\org-netbeans-modules-profiler -classpath %classpath test.profiler.Main\" -Dexec.executable=\"C:\\Program Files\\Java\\jdk1.8.0_131\\bin\\java.exe\" -Dexec.classpathScope=runtime -DskipTests=true -Dmaven.ext.class.path=\"C:\\Program Files\\NetBeans 8.2\\java\\maven-nblib\\netbeans-eventspy.jar\" -Dfile.encoding=UTF-8 --fail-fast process-classes org.codehaus.mojo:exec-maven-plugin:1.2.1:exec\"" The syntax of the command is incorrect. In messages.log: *** Profiler error (Fri Jul 07 22:08:57 NZST 2017): connection with server not open Product Version = NetBeans IDE 8.2 (Build 201609300101) (#5fd841261bf9) Operating System = Windows 7 version 6.1 running on amd64 Java; VM; Vendor = 1.8.0_131; Java HotSpot(TM) 64-Bit Server VM 25.131-b11; Oracle Corporation Runtime = Java(TM) SE Runtime Environment 1.8.0_131-b11 Java Home = C:\Program Files\Java\jdk1.8.0_131\jre
Created attachment 164722 [details] Maven project in zip file
I am not able to reproduce it. I used NB 8.2 (JavaSE) on Windows 10. I created simple maven project via New Project -> Maven -> Java project. Added code you mentioned. Both Profile Project and Profile File works fine.
Thomas, could you please paste your command line output so we can compare - perhaps we can get a clue from the differences, perhaps some quoting / escaping issue?
Output: cd C:\Users\IEUser\Documents\NetBeansProjects\mavenproject1; "JAVA_HOME=C:\\Program Files\\Java\\jdk1.8.0_112" cmd /c "\"\"C:\\Program Files\\NetBeans 8.2\\java\\maven\\bin\\mvn.bat\" -Dexec.args=\"-agentpath:\\\"C:/Program Files/NetBeans 8.2/profiler/lib/deployed/jdk16/windows-amd64/profilerinterface.dll\\\"=\\\"C:\\Program Files\\NetBeans 8.2\\profiler\\lib\\\",5140,10 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=C:\\Users\\IEUser\\AppData\\Local\\NetBeans\\Cache\\8.2\\mavencachedirs\\1339466924\\org-netbeans-modules-profiler -classpath %classpath com.mycompany.mavenproject1.Main\" -Dexec.executable=\"C:\\Program Files\\Java\\jdk1.8.0_112\\bin\\java.exe\" -Dexec.classpathScope=runtime -Dmaven.ext.class.path=\"C:\\Program Files\\NetBeans 8.2\\java\\maven-nblib\\netbeans-eventspy.jar\" -Dfile.encoding=UTF-8 org.codehaus.mojo:exec-maven-plugin:1.2.1:exec\""
Hi Tomas, I have two installations, Windows 7 where it breaks and Windows 8.1 where it fails. In addition, the Windows 8.1 installation has a NetBeans portable installation in a directory without spaces which might help. In the installation where it breaks with apache-maven-3.5.0, is succeeds with apache-maven-3.3.9. I found that mvn.cmd has changed substantially between apache-maven-3.5.0 and apache-maven-3.3.9. I spotted an error that the apache-maven-3.5.0 mvn.cmd produces with a simple logging modification of it: Change @echo off to REM @echo off ECHO %~2 (with an additional ECHO line added). In the broken installation, the ECHO displays a truncated command line as follows: -agentpath:\"C:/Program were compared with the Windows 8.1 installation , the same ECHO produces: -agentpath:C:/Users/username/AppData/Local/prog/netbeans-8.2/profiler/lib/deployed/jdk16/windows-amd64/profilerinterface.dll=C:\Users\username\AppData\Local\prog\netbeans-8.2\profiler\lib,5140,10 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=C:\Users\username\AppData\Local\NetBeans\Cache\8.2\mavencachedirs\1029074788\org-netbeans-modules-profiler -classpath %classpath test.profiler.Main Would you have an idea about how I can take this to the next step? Thanks
I wrote "and Windows 8.1 where it fails." which is wrong - it works on Windows 8.1" where NetBeans is installed in a directory without spaces.
Tomas, I am seeing the same bug using dev build 201707050001 and Maven 3.5.0. Can you please try reproducing using Maven 3.5.0?
(In reply to _ gtzabari from comment #7) > I am seeing the same bug using dev build 201707050001 and Maven 3.5.0. > > Can you please try reproducing using Maven 3.5.0? You are right, this is caused by Maven 3.5.0. NetBeans bundles Maven 3.3.9 and Maven 3.5.0 is to new. It looks like there are some incompatible changes between Maven 3.3.9 and Maven 3.5.0. Please use Maven 3.3.9, which is bundled and tested with NetBeans.