SimpleDB setup java.rmi.NotBoundException:simpledb



我想在我的计算机上安装SimpleDB。我已经将CLASSPATH环境变量定义为

.;C:SimpleDB 

在用户变量和系统变量CLASSPATH中作为

C:Program FilesJavajdk1.7.0_45bin;C:Program FilesJavajdk1.7.0_45jrebin 

和PATH与CLASSPATH相同。我打开命令提示符并输入SimpleDB。然后键入start-rmigregistry。另一个窗口打开。之后,我键入了java simpledb.server.Startup studentdb。输出为:

new transaction: 1
recovering existing database
transaction 1 committed
database server ready

之后,我转到SimpleDB\studentClient\ssimpledb并键入java CreateStudentDB。它给了我以下错误。

C:SimpleDBstudentClientsimpledb>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窗口已经打开,我没有关闭它。为什么它会给我这样的错误?请给出一个想法。非常感谢。

创建数据库时,我刚键入"java simpledb.server.Startup studentdb"以"启动java simpledb.server.Startup tudentdb"。另一个窗口被打开。然后,我在上一个窗口中继续执行相同的操作。它对我有效。

相关内容

  • 没有找到相关文章

最新更新