This discussion is archived
2 Replies Latest reply: Mar 14, 2010 10:19 PM by 843849 RSS

Fatal Error with Java ME Device Manager and SDK Updates

843849 Newbie
Currently Being Moderated
I recently installed the Java ME 3 EA SDK Platform which looks promising. Everything seem to work fine. In the process of new updates and the desire to remove some older versions of Java, I installed a new Java versions (1.6.0_11) and removed some old ones (1.6_0_04 and 1.6_0_10).

Following this whenever I startup my machine, following the attempted start of the Java ME Device Manager, I get a "Fatal Error: Cannot start child. Error code: 0" dialog.

Following this I get an exception indicating:

java.net.ConnectException: Connection refused: connect
     at java.net.PlainSocketImpl.socketConnect(Native Method)
     at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
     at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
     at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
     at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
     at java.net.Socket.connect(Socket.java:519)
     at java.net.Socket.connect(Socket.java:469)
     at java.net.Socket.<init>(Socket.java:366)
     at java.net.Socket.<init>(Socket.java:180)
     at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
     at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
     at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:595)
Caused: java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
     java.net.ConnectException: Connection refused: connect
     at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:601)
     at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198)
     at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
     at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:322)
     at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
     at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:97)
Caused: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
     java.net.ConnectException: Connection refused: connect]
     at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:101)
     at com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:185)
     at javax.naming.InitialContext.lookup(InitialContext.java:392)
     at javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1871)
     at javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1841)
     at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:257)
Caused: java.io.IOException: Failed to retrieve RMIServer stub
     at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:323)
     at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:248)
     at com.sun.jme.toolkit.remoting.client.rmiimpl.ObjectServerConnectionImpl.connect(Unknown Source)
     at com.sun.jme.toolkit.remoting.client.rmiimpl.ObjectServerConnectionImpl.start(Unknown Source)
     at com.sun.jme.toolkit.remoting.client.rmiimpl.ObjectServerConnectionImpl.lookupMBean(Unknown Source)
     at com.sun.jme.toolkit.remoting.client.rmiimpl.ObjectServerConnectionImpl.findObject(Unknown Source)
     at org.netbeans.modules.javame.common.container.devicemanager.DevicemanagerHelper.openConnection(DevicemanagerHelper.java:56)
     at org.netbeans.modules.javame.common.container.devicemanager.DevicemanagerHelper.getDeviceManager(DevicemanagerHelper.java:73)
     at org.netbeans.modules.j2me.cdc.platform.jme_sdk.autoinstaller.AutoInstaller.ensureDMStarted(AutoInstaller.java:228)
     at org.netbeans.modules.j2me.cdc.platform.jme_sdk.autoinstaller.AutoInstaller.restored(AutoInstaller.java:65)
     at org.netbeans.core.startup.NbInstaller.loadCode(NbInstaller.java:419)
     at org.netbeans.core.startup.NbInstaller.load(NbInstaller.java:340)
     at org.netbeans.ModuleManager.enable(ModuleManager.java:888)
     at org.netbeans.core.startup.ModuleList.installNew(ModuleList.java:428)
     at org.netbeans.core.startup.ModuleList.trigger(ModuleList.java:364)
     at org.netbeans.core.startup.ModuleSystem.restore(ModuleSystem.java:276)
     at org.netbeans.core.startup.Main.getModuleSystem(Main.java:163)
     at org.netbeans.core.startup.Main.start(Main.java:315)
     at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:110)
[catch] at java.lang.Thread.run(Thread.java:619)

When I try to start the SDK itself, I also get "Cannot find java.exe in specified jdkhome. Neither E:\java\jdk1.6.0_10\jre\bin\java.exe or E:\java\jdk11.6.0.0_10\bin\java.exe exists. Do you want to try to use default version?". This also happens with I try starting Netbeans as well.

When I say No, it appears to not start at all. When I say Yes, it appears to try to start but I continually get errors as listed above for the Java ME Device Manager startup error.

After reinstalling the _10 version, things started to work again, so I suspect this is due to my removal of the an older version of the JDK.

How is the proper way to "update" without causing similar errors? Are the environment variable JAVA_HOME, JAVA2_HOME, or some other variable used to specify the JDK/JRE in use? I would rather not be forced to change my startup each time to specify a -jdkhome related parameter.

Should I install the new version, find install the "Java Platform" in the SDK/Netbeans, set it as

Also...

How do you set the default version from within the SDK/Netbeans?

And is there a way to prevent the Device Manager from starting?

Eric