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.
Hello, I have following setup, osx running on apples jdk6, a maven multi project with a testcase in one of the subprojects. The setupt itself runs fine if I start it normally, so does the TestCase if I run it. However if I run it from the debugger with Debug Testfile I get following error: Error occurred during initialization of VM ERROR: Cannot load this JVM TI agent twice, check your java command line for duplicate jdwp options. agent library failed to init: jdwp Java Result: 134 This used to work on 6.5 and as far as I recall earlier 6.7 builds, the current release I use is 6.7 RC2 the all in one bundle!
have you modified the debug test action mapping? (easiest way to figure is to check the ${basedir}/nbactions.xml file - please attach it to the issue)
BTW: Milos, how do we turn on verbose output of Maven so that we see what it executes? I mean an equivalent of "Verbosity Level" in Ant.
Tools/Option/Misc/Maven has a Debug output checkbox, however I think it will *not* print the java -jar line it executes. I think it's filed as issue against the exec-maven-plugin. However the first few lines of maven build output that print out what params is the build executed with shall be sufficient
Actually the nbactions.xml file in my case is empty, the nbconfigurations file has following entries: <project-shared-configuration> <properties xmlns="http://www.netbeans.org/ns/maven-properties-data/1"> <netbeans.compile.on.save>all</netbeans.compile.on.save> <netbeans.hint.jdkPlatform>JDK_1.6</netbeans.hint.jdkPlatform> </properties> </project-shared-configuration>
I see. mentlicher: in this case the execution is probably performed by ant (via the JavaRunner/CompileOnSave execution)
Ok some additional info, in my command line MAVEN_OPTS I had a debugging port open. I changed that now by removing all MAVN_OPTS restarted Netbeans after veryfying the MAVEN_OPTS are blank now, from the command line, but that did not lead to any signifcant change, Netbeans still throws the error. I also had all Nebeans related files deleted from the filesystem and reimported the project. Same result! Did not help, what might be is that Netbeans has been importing the settings somewhere and triggering it although the command line itself does not show it anymore!
on mac the env vars for applications invoked from GUI are not exactly the same as env vars in console. you might need to restart the computer and make sure the gui invoked stuff doesn't have the MAVEN_OPTS var defined.
Ok I have restarted as well, the maven jwpd settings definitely are gone, the problem still persists.
In 6.8 dev build 200911160201 it works fine for me. On Mac (with JDK 1.5) I've created Maven project (Maven Quickstart Archetype) and verified that both "Debug File" and "Debug Test File" works correctly. Please verify in 6.8 build.
I am having the exact same issue under Windows XP. I have experienced the same issues with 6.7, I have done most of my recent work with 6.5 because it works there. While I haven't explored an exact recipe, it seems to occur when I have the following open. 1. Create a maven POM project. 2. Create another maven project using the initial project as the root folder. (In my case I am importing existing projects but this should be the same.)
Can you please try this in NetBeans 6.8? It worked fine for me there...
Sorry, I should have mentioned that I was using 6.8.
O.K. I'll check again in NB 6.8 under Windows.
I've got this problem too (6.8 FCS, Windows XP)
I'm running across the same issue. I'm running Netbeans 6.8 with JDK 1.6.18 on OSX. The exact error is : Have no FileObject for /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/jsfd.jar Have no FileObject for /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/sunrsasign.jar Error occurred during initialization of VM ERROR: Cannot load this JVM TI agent twice, check your java command line for duplicate jdwp options. agent library failed to init: jdwp Java Result: 1
By the way I'm working with the Spring-WS code base.
I have the same problem. I'm using Mac OS X 10.6.3 and Netbeans 6.8 and Java: java version "1.6.0_17" Java(TM) SE Runtime Environment (build 1.6.0_17-b04-248-10M3025) Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01-101, mixed mode) The error message when I try to debug a unit test (in a Maven project) is: Have no FileObject for /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/jsfd.jar Have no FileObject for /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/sunrsasign.jar ERROR: transport error 202: connect failed: Operation timed out FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197) ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [../../../src/share/back/debugInit.c:690] Java Result: 134 debug-test: BUILD SUCCESSFUL (total time: 1 minute 20 seconds)
This is happening in my environment too. Netbeans 6.8 Ubuntu 9.04 Java openjdk 1.6.0_0 Maven-based project without any subprojects. Putting a break point in a Junit 4.3.1 test and running "Debug --> Debug Test File" results in Output window errors: Have no FileObject for /usr/lib/jvm/java-6-openjdk/jre/lib/sunrsasign.jar Have no FileObject for /usr/lib/jvm/java-6-openjdk/jre/classes Error occurred during initialization of VM agent library failed to init: jdwp ERROR: Cannot load this JVM TI agent twice, check your java command line for duplicate jdwp options. Java Result: 1 debug-test: BUILD SUCCESSFUL (total time: 6 seconds)
This works fine for me in NetBeans 7.0, therefore it seems to be already fixed. Please verify.
Actually, I am experiencing the same issue. Additionally if I change forkMode property in Actions before every execution, debugging works. Flow: 1) Debug test -> crash ('Cannot load this JVM TI agent twice') 2) change in action mapping forkMode='never' 3) debug test -> whole test package is executed, but debugger is not attached 4) change in action mapping forkMode='once' 5) Debug test -> works ok, test are started, debugger is attached, I can debug test It is pain to change settings back and forth before each debugging. Additionally waiting for whole package to execute in step 3... :/ My Env: Product Version: NetBeans IDE Dev (Build 201106260600) Java: 1.6.0_23; Java HotSpot(TM) Client VM 19.0-b09 System: Windows 7 version 6.1 running on x86; Cp1252; en_US (nb) My Action Mapping: jpda.listen=true maven.failsafe.debug=-Xdebug -Xrunjdwp:transport=dt_socket,server=n,address=${jpda.address} forkMode=once test=${packageClassName}
*** Bug 200216 has been marked as a duplicate of this bug. ***
Thanks for your findings regarding forkMode.
I have the same problem with NB7.0 running on Ubuntu 10.10 and the following: $ java -version java version "1.6.0_26" Java(TM) SE Runtime Environment (build 1.6.0_26-b03) Java HotSpot(TM) Server VM (build 20.1-b02, mixed mode) $ mvn -version Apache Maven 2.2.1 (rdebian-4) Java version: 1.6.0_20 Java home: /usr/lib/jvm/java-6-openjdk/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux" version: "2.6.35-28-generic-pae" arch: "i386" Family: "unix
Confirmed on Linux (Ubuntu 10.10) JDK 1.6.0_26, attempting to debug with JBoss-5.1.0. Serverplugins seems the more appropriate component than debugger...
Just a quick fix for this for those who have stumbled upon this when looking for a solution to the issue. This appears to work for Win XP and 7, and for NetBeans 6.8 and 7.0.1: Open the Project Properties for the test. Go to 'Actions' Select the 'Debug test' entry. In the 'Set properties' you need to remove the -Xrunjdwp:transport=dt_socket,server=n,address=${jpda.address} option from the second line. This results in: jpda.listen=true maven.surefire.debug=-Xdebug forkMode=once test=${packageClassName} Click the OK button, save everything and restart Netbeans. The restart may or may not be necessary - might depend on OS or precise Netbeans version. Try again, should debug the maven project test OK.