I want to install SimpleDB to my computer.I have already defined the CLASSPATH environment variable as
.;C:\SimpleDB
in user variables and the system variables CLASSPATH as
C:\Program Files\Java\jdk1.7.0_45\bin;C:\Program Files\Java\jdk1.7.0_45\jre\bin
and PATH as the same with CLASSPATH.I have opened command prompt and entered SimpleDB.Then I typed start rmiregistry.Another window is opened.After that I typed java simpledb.server.Startup studentdb. The output is:
new transaction: 1
recovering existing database
transaction 1 committed
database server ready
After that I went to SimpleDB\studentClient\simpledb and type java CreateStudentDB.And it gave me the following error.
C:\SimpleDB\studentClient\simpledb>java CreateStudentDB
java.sql.SQLException: java.rmi.ConnectException: Connection refused to host: 10
.39.121.3; nested exception is:
java.net.ConnectException: Connection refused: connect
at simpledb.remote.SimpleDriver.connect(SimpleDriver.java:35)
at CreateStudentDB.main(CreateStudentDB.java:9)
Caused by: java.rmi.ConnectException: Connection refused to host: 10.39.121.3; n
ested exception is:
java.net.ConnectException: Connection refused: connect
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216
)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:129)
at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(Remo
teObjectInvocationHandler.java:194)
at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvo
cationHandler.java:148)
at com.sun.proxy.$Proxy0.connect(Unknown Source)
at simpledb.remote.SimpleDriver.connect(SimpleDriver.java:31)
... 1 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketI
mpl.java:79)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.ja
va:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocket
Impl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java
:182)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at java.net.Socket.connect(Socket.java:528)
at java.net.Socket.<init>(Socket.java:425)
at java.net.Socket.<init>(Socket.java:208)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirect
SocketFactory.java:40)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMaster
SocketFactory.java:147)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:613)
... 8 more
rmiregistry window is already open, i didn't close it.Why does it give me such an error? Please give an idea. Thank you.