Bad version number in .class file - NoSQL Database

oracle#phoenix /backup/oracle/kv-1.1.100/bin> ./run-kvlite.sh
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) 

This message probably means that an older version of the java runtime is being used. NoSQL Database requires Java SE 6. Which java are you using?
Edited by: Guy Hillyer, Oracle on Oct 18, 2011 9:18 PM 

root#dragon /shareplex/oracle/kv-1.1.100/bin> kvctl runadmin -port 5001
Exception in thread "main" java.rmi.ConnectException: Connection refused to host: dragon; nested exception is:
java.net.ConnectException: Connection refused
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 oracle.kv.impl.util.registry.RegistryUtils.getAdmin(RegistryUtils.java:197)
at oracle.kv.impl.admin.client.KVAdmin.connect(KVAdmin.java:876)
at oracle.kv.impl.admin.client.KVAdmin.main(KVAdmin.java:2107)
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at java.net.Socket.connect(Socket.java:478)
at java.net.Socket.<init>(Socket.java:375)
at java.net.Socket.<init>(Socket.java:189)
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) 

Fixed already, thanks anyway. 

Just to be clear, does this mean you fixed the Bad Version in .class file exception or you figured out the problem with starting an admin and port 5001?
Charles Lamb 

Both fixed, thanks Guy & Charles. 

Hi may i know how to fix this?
i am getting this exception when executing this command : java -jar lib/kvstore-1.2.123.jar ping -port 5000 -host testhost
Could not connect to registry at BLRKIET0052PC:5000: Connection refused to host: testhost; nested exception is:
java.net.ConnectException: Connection refused: connect
? 

912086 wrote:
Hi may i know how to fix this?
i am getting this exception when executing this command : java -jar lib/kvstore-1.2.123.jar ping -port 5000 -host testhost
Could not connect to registry at BLRKIET0052PC:5000: Connection refused to host: testhost; nested exception is:
java.net.ConnectException: Connection refused: connectIs there an alias for testhost and BLRKIET0052PC? Do they point to the same machine on the same interface?
Charles Lamb 

Hi thanks for da quick reply....
both are same only.
i am getting this exception when executing this command : java -jar lib/kvstore-1.2.123.jar ping -port 5000 -host testhost
Could not connect to registry at testhost:5000: Connection refused to host: testhost; nested exception is:
java.net.ConnectException: Connection refused: connect
? 

912086 wrote:
Hi thanks for da quick reply....
both are same only.
i am getting this exception when executing this command : java -jar lib/kvstore-1.2.123.jar ping -port 5000 -host testhost
Could not connect to registry at testhost:5000: Connection refused to host: testhost; nested exception is:
java.net.ConnectException: Connection refused: connectIs there any NoSQL Database process running on testhost? What does jps -m show? 

jps -m is givng me the following information...........
4812
3460 Jps -m
4408 Bootstrap start
5488 

912086 wrote:
jps -m is givng me the following information...........
4812
3460 Jps -m
4408 Bootstrap start
5488Are there any clues in the kvroot/.../*.log files on that host?
Charles Lamb

Related

OpenSSO Enteprise Configuration Parameters For the Command-Line Configurato

Hi,
As said in the title, i want to configure OpenSSO Enteprise via command lines, but after doing the command: "java -jar configurator.jar -f ../../configuration_file"
I have the following error:
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:310)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:176)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:163)
at java.net.Socket.connect(Socket.java:542)
at java.net.Socket.connect(Socket.java:492)
at sun.net.NetworkClient.doConnect(NetworkClient.java:174)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:409)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:530)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:240)
at sun.net.www.http.HttpClient.New(HttpClient.java:321)
at sun.net.www.http.HttpClient.New(HttpClient.java:338)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:814)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:755)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:680)
at com.sun.identity.setup.OpenSSOConfigurator.main(OpenSSOConfigurator.java:172)
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:310)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:176)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:163)
at java.net.Socket.connect(Socket.java:542)
at java.net.Socket.connect(Socket.java:492)
at sun.net.NetworkClient.doConnect(NetworkClient.java:174)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:409)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:530)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:240)
at sun.net.www.http.HttpClient.New(HttpClient.java:321)
at sun.net.www.http.HttpClient.New(HttpClient.java:338)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:814)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:755)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:680)
at com.sun.identity.setup.OpenSSOConfigurator$ReadProgress.run(OpenSSOConfigurator.java:237)
at java.lang.Thread.run(Thread.java:636)
thanks,
Ali

Connection refused to host

Hi,
i put the server in a windows machine and its works ok, but in a linux machine it doesnt work, throws this execption:
java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is:
     java.net.ConnectException: Connection refused
     at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:574)
     at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)
     at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
     at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:94)
     at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:179)
     at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:132)
     at $Proxy0.includeID3Job(Unknown Source)
(...)i using java 5, this is the server code:
Registry registry = LocateRegistry.createRegistry(serverPort);
UnicastRemoteObject.unexportObject(quartz,true);
QuartzRemote stub = (QuartzRemote) UnicastRemoteObject.exportObject(quartz, 0);
registry = LocateRegistry.getRegistry(serverPort);
registry.bind("quartz", stub);and this is the client code:
Registry registry = LocateRegistry.getRegistry(serverIp, serverPort);          
QuartzRemote server = (QuartzRemote)registry.lookup("quartz");   
server.includeID3Job(jobPrefix+taskId,new Integer(taskId),date,jobMetadata); //ERROR IS HEREthere is no firewall, and i dont use any policy file..
any help?
Tks,
Pedro Gon�alves de Oliveira 
Hi,
i put the server in a windows machine and its works
ok, but in a linux machine it doesnt work, throws
this execption:
java.rmi.ConnectException: Connection refused to
host: 127.0.0.1; nested exception is:
     java.net.ConnectException: Connection refused
at
t
sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoin
t.java:574)
at
t
sun.rmi.transport.tcp.TCPChannel.createConnection(TCPC
hannel.java:185)
at
t
sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChan
nel.java:171)
at
t
sun.rmi.server.UnicastRef.invoke(UnicastRef.java:94)
at
t
java.rmi.server.RemoteObjectInvocationHandler.invokeRe
moteMethod(RemoteObjectInvocationHandler.java:179)
at
t
java.rmi.server.RemoteObjectInvocationHandler.invoke(R
emoteObjectInvocationHandler.java:132)
     at $Proxy0.includeID3Job(Unknown Source)
(...)i using java 5, this is the server code:
Registry registry =
LocateRegistry.createRegistry(serverPort);
UnicastRemoteObject.unexportObject(quartz,true);
QuartzRemote stub = (QuartzRemote)
UnicastRemoteObject.exportObject(quartz, 0);
registry = LocateRegistry.getRegistry(serverPort);
registry.bind("quartz", stub);and this is the client code:
Registry registry =
LocateRegistry.getRegistry(serverIp, serverPort);          
QuartzRemote server =
(QuartzRemote)registry.lookup("quartz");   
server.includeID3Job(jobPrefix+taskId,new
Integer(taskId),date,jobMetadata); //ERROR IS HEREthere is no firewall, and i dont use any policy
file..
any help?
Tks,
Pedro Gon�alves de OliveiraTry making entries in the /etc/hosts for your machine's ip.
Pravin 
hi there...
i'm having the same problem, when trying to start the server, i get this exception below, but (i think, maybe wrongly) my /etc/hosts already has an entry for my machine's IP:
127.0.0.1 localhost.localdomain localhost kapverd
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
what should i do, any sugestions?
exception throwed:
Connection refused to host: 127.0.0.1; nested exception is:
java.net.ConnectException: Connection refused
java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is:
java.net.ConnectException: Connection refused
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:567)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:313)
at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
at java.rmi.Naming.rebind(Naming.java:160)
at inescID.revs.servers.ServerEngine.start(ServerEngine.java:100)
at inescID.revs.servers.StartServer.serverActions(StartServer.java:264)
at inescID.revs.servers.StartServer.startEngine(StartServer.java:186)
at inescID.revs.servers.StartServer.start(StartServer.java:138)
at inescID.revs.servers.StartServer.main(StartServer.java:390)
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:452)
at java.net.Socket.connect(Socket.java:402)
at java.net.Socket.<init>(Socket.java:309)
at java.net.Socket.<init>(Socket.java:124)
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:562)
... 10 more
Error: unable to start the service. 
I encountered the same problem on Linux. To resolve the problem, I assigned my Linux server a static IP address (as opposed to DHCP) and made sure the IP/Hostname entry was in the /etc/hosts file. Apparently, the RMI service was returning the loopback IP address instead of the network IP address. Thus, the error when the client tries to connect to 127.0.0.1 instead of the server hostname or network IP address. 
Specifiying the hostname for the RMI server on the command line will probably fix it too:
-Djava.rmi.server.hostname=192.168.0.xxx
or whatever you get assigned 
silly me!
i didn't (know that i had to) start the rmi registry!
after starting the rmi registry, when i try to start the server i get this error below:
i need some help here to understand what this means...anyone?
tanx
error message
Cannot bind server. Error unmarshaling return; nested exception is:
java.net.MalformedURLException: no protocol: ./revs_servers.jar
java.rmi.UnmarshalException: Error unmarshaling return; nested exception is:
java.net.MalformedURLException: no protocol: ./revs_servers.jar
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:217)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:350)
at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
at java.rmi.Naming.rebind(Naming.java:160)
at inescID.revs.servers.ServerEngine.start(ServerEngine.java:100)
at inescID.revs.servers.StartServer.serverActions(StartServer.java:264)
at inescID.revs.servers.StartServer.startEngine(StartServer.java:186)
at inescID.revs.servers.StartServer.start(StartServer.java:138)
at inescID.revs.servers.StartServer.main(StartServer.java:390)
Caused by: java.net.MalformedURLException: no protocol: ./revs_servers.jar
at java.net.URL.<init>(URL.java:537)
at java.net.URL.<init>(URL.java:434)
at java.net.URL.<init>(URL.java:383)
at sun.rmi.server.LoaderHandler.pathToURLs(LoaderHandler.java:747)
at sun.rmi.server.LoaderHandler.getDefaultCodebaseURLs(LoaderHandler.java:120)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:149)
at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:631)
at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:257)
at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:200)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1513)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1626)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:215)
... 8 more
Error: unable to start the service. 
problem solved!
before: -Djava.rmi.server.codebase=./revs_servers.jar
now: -Djava.rmi.server.codebase=file:///<full path>/revs_servers.jar 
I had the same problem. My /etc/hosts file contained:
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               xxx03.mydomain.com xxx03 localhost.localdomain localhostI changed it to the following to fix the problem.
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               localhost.localdomain localhost

OpenSSO Enteprise Configuration Parameters For the Command-Line Configurato

Hi,
As said in the title, i want to configure OpenSSO Enteprise via command lines, but after doing the command: "java -jar configurator.jar -f ../../configuration_file"
I have the following error:
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:310)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:176)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:163)
at java.net.Socket.connect(Socket.java:542)
at java.net.Socket.connect(Socket.java:492)
at sun.net.NetworkClient.doConnect(NetworkClient.java:174)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:409)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:530)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:240)
at sun.net.www.http.HttpClient.New(HttpClient.java:321)
at sun.net.www.http.HttpClient.New(HttpClient.java:338)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:814)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:755)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:680)
at com.sun.identity.setup.OpenSSOConfigurator.main(OpenSSOConfigurator.java:172)
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:310)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:176)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:163)
at java.net.Socket.connect(Socket.java:542)
at java.net.Socket.connect(Socket.java:492)
at sun.net.NetworkClient.doConnect(NetworkClient.java:174)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:409)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:530)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:240)
at sun.net.www.http.HttpClient.New(HttpClient.java:321)
at sun.net.www.http.HttpClient.New(HttpClient.java:338)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:814)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:755)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:680)
at com.sun.identity.setup.OpenSSOConfigurator$ReadProgress.run(OpenSSOConfigurator.java:237)
at java.lang.Thread.run(Thread.java:636)
thanks,
Ali 
1. Wrong forum. Try it here: [OpenSSO Enterprise formerly Access Manager|http://forums.sun.com/forum.jspa?forumID=760]
2. Give more information and/or google it
/T

Problem in jvmstat remote test

Hello,
I installed jvmstat 1.1 tool in my system and able to get the JVM stat information for the application deployed locally in Oracle10g Application server running on JDK1.4.1. I am using Window 2000 Service pack4 OS.
But I am facing the problem in getting the JVM Stat information for the application running on Oracle10g Application server running on JDK1.4.1 on some other machine running on Solaris 5.8 OS. Basically here I am trying to connect to remote server through jvmstat tool to get the JVM statistics.
I am getting following exception when I execute following command: jvmstat -gcutil 6694#talonuat 1000 3
Exception:
Could not attach to 6694#talonuat
RMI Registry not available at talonuat:1099
Connection refused to host: talonuat; nested exception is:
java.net.ConnectException: Connection refused: connect
com.sun.jvmstat.monitor.MonitorException: RMI Registry not available at talonuat:1099
Connection refused to host: talonuat; nested exception is:
java.net.ConnectException: Connection refused: connect
at com.sun.jvmstat.perfdata.monitor.rmi.MonitoredHostProvider.<init>(MonitoredHostProvider.java:79)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at com.sun.jvmstat.monitor.MonitoredHost.getMonitoredHost(MonitoredHost.java:152)
at com.sun.jvmstat.monitor.MonitoredHost.getMonitoredHost(MonitoredHost.java:106)
at com.sun.jvmstat.tools.jvmstat.jvmstat.main(jvmstat.java:168)
Caused by: java.rmi.ConnectException: Connection refused to host: talonuat; nested exception is:
java.net.ConnectException: Connection refused: connect
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:567)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:313)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at java.rmi.Naming.lookup(Naming.java:84)
at com.sun.jvmstat.perfdata.monitor.rmi.MonitoredHostProvider.<init>(MonitoredHostProvider.java:61)
... 7 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:426)
at java.net.Socket.connect(Socket.java:376)
at java.net.Socket.<init>(Socket.java:291)
at java.net.Socket.<init>(Socket.java:119)
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:562)
... 13 more
What is the problem in connecting to remote machine ? Is it required to install jvmstat tool on remote machine also ? I have not installed on remote machine.
Pls advice to resolve this issue.
Thanks,
Ramakumar
Hello All,
Pls advice how can I resolve this issue ?
Thanks,
Ramakumar

RMI Exception

I copy hello word code from this site [http://java.sun.com/javase/6/docs/technotes/guides/rmi/hello/hello-world.html] .
I run this command on machine ip 10.80.26.31
$ rmiregistry&
$ java Server
Server readyand run Client program on machine ip 10.80.26.29 but there are many exception
$ java Client 10.80.26.31
Client exception: java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is:
        java.net.ConnectException: Connection refused
java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is:
        java.net.ConnectException: Connection refused
        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.invoke(UnicastRef.java:110)
        at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:178)
        at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:132)
        at $Proxy0.sayHello(Unknown Source)
        at Client.main(Client.java:52)
Caused by: java.net.ConnectException: Connection refused
        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)
        ... 7 moreI don't understand why it say : Connection refused to host: 127.0.0.1
although i put 10.80.26.31 as comand line argument
Can anyone tell me what happen.
thank. 
Are you running a firewall? 
See item A.1 of the [RMI FAQ|http://java.sun.com/j2se/1.5.0/docs/guide/rmi/faq.html]. 
More detail
10.80.26.31 ,10.80.26.29 is Ubuntu and Kubuntu box
I think it may mistake with configuration file,
so i try that code on Windows XP(10.80.26.17) by run as a Server
and run Client program from both linux box
output is right no exception occur
from 10.80.26.31
$ java Client  10.80.26.17
response: Hello, world!from 10.80.26.29$ java Client  10.80.26.17
response: Hello, world!i also reverse running Server on linux and run Client program on Windows but it alway throws exception
G:\data\implement\rmi>java Client 10.80.26.31
client exception : java.rmi.ConnectException: Connection refused to host: 127.0.
0.1; nested exception is:
        java.net.ConnectException: Connection refused: connect
G:\data\implement\rmi>i don't understand why can't run Server program on linux box 
See reply #2.
It is a common Linux problem. Your /etc/hosts file should map 127.0.0.1 to localhost and your external IP address to your real hostname. Check that. Or see reply #2 ... 
thank ejp
in that link i found
If the property java.rmi.server.hostname is set, Java RMI will use its value as the server hostname, and will not attempt to find a fully qualified domain name through any other method. This property takes precedence over all other means of finding a Java RMI server name.by setting java.rmi.server.hostname
it work well
$ java -Djava.rmi.server.hostname=10.80.26.31 Server
Server readyG:\data\implement\rmi>java Client 10.80.26.31
response: Hello, world!
G:\data\implement\rmi>

Categories

Resources