Community
Participate
Working Groups
3.2 M5 Debugger cannot connect to VM when combining IBM and Sun JRE. Running the application does work. 1. install 3.2 M5 2. start using IBM JRE 5.0 (build pwi32dev-20051104) java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build pwi32dev-20051104) IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Windows XP x86-32 j9vmwi3223-20051103 (JIT enabled) J9VM - 20051027_03723_lHdSMR JIT - 20051027_1437_r8 GC - 20051020_AA) JCL - 20051102 3. install Sun 1.4.2_10 4. create Java project 'P' 5. make sure that project uses 1.4 compiler level and JRE 6. create class Foo with main method 7. start debugger using Sun 1.4.2_10 ==> error dialog: Cannot connect to VM + .log entry in dev workspace log: In Console view: FATAL ERROR in native method: No transports initialized Transport dt_socket failed to initialize, rc = 509. Log in dev workspace log: !SESSION 2006-02-20 10:17:38.627 ----------------------------------------------- eclipse.buildId=I20060217-1115 java.fullversion=J2RE 1.5.0 IBM J9 2.3 Windows XP x86-32 j9vmwi3223-20051103 (JIT enabled) J9VM - 20051027_03723_lHdSMR JIT - 20051027_1437_r8 GC - 20051020_AA BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_CH Framework arguments: -update -keyring c:\eclipse\.keyring -application org.eclipse.ui.ide.workbench -showlocation Command-line arguments: -update -keyring c:\eclipse\.keyring -application org.eclipse.ui.ide.workbench -showlocation -data c:\eclipse\workspaces\tmp !ENTRY org.eclipse.jdt.launching 4 120 2006-02-20 10:19:14.925 !MESSAGE Cannot connect to VM !STACK 0 java.net.SocketException: socket closed at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:423) at java.net.ServerSocket.implAccept(ServerSocket.java:462) at java.net.ServerSocket.accept(ServerSocket.java:433) at org.eclipse.jdi.internal.connect.SocketTransportService.accept(SocketTransportService.java:93) at org.eclipse.jdi.internal.connect.SocketTransportImpl.accept(SocketTransportImpl.java:56) at org.eclipse.jdi.internal.connect.SocketListeningConnectorImpl.accept(SocketListeningConnectorImpl.java:128) at org.eclipse.jdt.internal.launching.StandardVMDebugger$ConnectRunnable.run(StandardVMDebugger.java:78) at java.lang.Thread.run(Thread.java:788)
Might be a VM bug since it works just fine if I start the dev workspace with: Sun 1.4: java version "1.4.2_10" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_10-b03) Java HotSpot(TM) Client VM (build 1.4.2_10-b03, mixed mode) Sun 5.0_06: java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode) IBM 1.4.2: java version "1.4.2" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2) Classic VM (build 1.4.2, J2RE 1.4.2 IBM Windows 32 build cn142-20050503 (JIT enabled: jitc)) IBM 1.4.2 J2SC: IBM J9SE VM (build 2.2, J2RE 1.4.2 IBM J9 2.2 Windows XP x86-32 j9n142-20050430 J9VM - 20050426_1634_lHdSMR JIT - r7_level20050420_1807)
This does appear to be a VM bug. The linux version of the same IBM 5.0 VM connects to a Sun target properly. Marking as WONTFIX.
>This does appear to be a VM bug. "appears" or "is"?
Reopening... The environment in the target has been changed by something. The bin directory of the 1.5 VM has been tacked on to the beginning of PATH. Editing the path on the Environments tab got it working again for me. Steps to work around: Open LCD to the launch config you want to debug on 1.4 Go to Environments Tab click Select..., then Select All and OK Find PATH and remove first entry Select "Replace native environment with specified environment" Debug. Still investigating proper fix.
This is a VM bug. It is the IBM VM that is prepending itself to the path, it is not eclipse.
*** Bug 140728 has been marked as a duplicate of this bug. ***
The same problem is reproducible even when using SUN VM 1.5. It is not just the IBM VMs causing the problem. In this case I was using Eclipse 3.2RC5 with a SUN VM on the SLES platform (SuSE Linux). Kevin, can you explain exactly what entry that I知 supposed to remove from the PATH string when you said the following <I>Find PATH and remove first entry</I>
This is not reproducible using only Sun VMs because the Sun VM's do not change the PATH environment variable. IBM VM's prepend their bin directory onto the PATH variable and as a result the debugger finds the IBM libraries when it's looking for the Sun libraries. The workaround is to edit the path on your environment tab so that the libraries associated with the JRE you are using to launch are found first.
I am also facing the same issue. But I am trying to use Jboss 3.2.3 & SUN JDK 1.4.6 --PSR
This is CMVC 103619. Should be fixed in Java5 SR3.
Srinivas, which JVM are you using to run the Eclipse SDK? Can you attach the stack trace you are seeing? What does the PATH variable look like on the Environment tab of a Java application launch configuration?
I am getting the same problem on Linux. Using IBM JDK 5.0 (May '06) and trying to debug an app with the same JVM. Eclipse 3.2RC7 IBM Open Client for Linux (RedHat) I also got Sun's JDK 1.5._0_07 Launched Eclipse with it, and tried to debug an eclipse app, and i get the same "Cannot connect to VM" error. Is there any workaround for wanting to run AND debug on 5.0/1.5?
My apologies. For the launch config, on the Arguments tab, VM arguments, I had "-vmargs -Xmx512m" instead of just "-Xmx512m" Running with Sun's JVM, debugging with same, seems to work now. Running with IBM's JVM, debugging with same, also works. Funny that it would manifest itself with same error.
(In reply to comment #13) > My apologies. For the launch config, on the Arguments tab, > VM arguments, I had "-vmargs -Xmx512m" instead of just "-Xmx512m" > > Running with Sun's JVM, debugging with same, seems to work now. > > Running with IBM's JVM, debugging with same, also works. > > Funny that it would manifest itself with same error. > I had the same problem using two different version of Java. I am using Eclipse 3.2. When I start the IDE with Java jre1.5.0_06 and I use internally in my project the version j2sdk1.4.2_07 I get this error. When I convert the project to the 1.5 version it works. Starting the IDE with 1.4 and debugging with the same version works. Don't know if it is an eclipse bug or a VM bug.
You should be able to run the SDK and debug programs on different VMs.
This has been fixed in 3.3, by bug 176471.
*** This bug has been marked as a duplicate of bug 176471 ***