M
Marzena
Hi
Im making aplication with Java RMI ... everything was working till
yesterday. Today i started to run server and i cant make it (once
per 20 times it works)
The way i registering serwer is (im doing this from the folder where i
have my server class and java files + stub ):
start rmiregistry
java -Djava.security.policy=test.policy serwer
Sometimes it works ,sometimes not,espescially when i m starting to run
second diffrent process(serwer)
i got this error:
D:\workspace\serwer2>rmiregistry
java.rmi.server.ExportException: Port already in use: 1099; nested
exception is:
java.net.BindException: Address already in use: JVM_Bind
at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:
310)
at
sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:218
)
at
sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:393)
at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:129)
at
sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:19
0)
at sun.rmi.registry.RegistryImpl.setup(RegistryImpl.java:92)
at sun.rmi.registry.RegistryImpl.<init>(RegistryImpl.java:78)
at sun.rmi.registry.RegistryImpl.main(RegistryImpl.java:322)
Caused by: java.net.BindException: Address already in use: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
at java.net.ServerSocket.bind(ServerSocket.java:319)
at java.net.ServerSocket.<init>(ServerSocket.java:185)
at java.net.ServerSocket.<init>(ServerSocket.java:97)
at
sun.rmi.transport.proxy.RMIDirectSocketFactory.createServerSocket(RMI
DirectSocketFactory.java:27)
at
sun.rmi.transport.proxy.RMIMasterSocketFactory.createServerSocket(RMI
MasterSocketFactory.java:333)
at
sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(TCPEndpoint.java:64
9)
at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:
299)
... 7 more
D:\workspace\serwer2>java -Djava.security.policy=test2.policy server
Liczba aktywnych watkow: 1
nazwa watku: main
Usluga druga niezarejestrowana: RemoteException occurred in server
thread; neste
d exception is:
java.rmi.UnmarshalException: error unmarshalling arguments;
nested excep
tion is:
java.lang.ClassNotFoundException: server_Stub
I didnt change anything in my source code...nothing...it just started
doing like this. Lately i was able to run two server process...and
everything was ok.... i was looking for a tip in google...but nothing
help...anybody knows how to fix it?
Tnx .
Im making aplication with Java RMI ... everything was working till
yesterday. Today i started to run server and i cant make it (once
per 20 times it works)
The way i registering serwer is (im doing this from the folder where i
have my server class and java files + stub ):
start rmiregistry
java -Djava.security.policy=test.policy serwer
Sometimes it works ,sometimes not,espescially when i m starting to run
second diffrent process(serwer)
i got this error:
D:\workspace\serwer2>rmiregistry
java.rmi.server.ExportException: Port already in use: 1099; nested
exception is:
java.net.BindException: Address already in use: JVM_Bind
at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:
310)
at
sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:218
)
at
sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:393)
at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:129)
at
sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:19
0)
at sun.rmi.registry.RegistryImpl.setup(RegistryImpl.java:92)
at sun.rmi.registry.RegistryImpl.<init>(RegistryImpl.java:78)
at sun.rmi.registry.RegistryImpl.main(RegistryImpl.java:322)
Caused by: java.net.BindException: Address already in use: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
at java.net.ServerSocket.bind(ServerSocket.java:319)
at java.net.ServerSocket.<init>(ServerSocket.java:185)
at java.net.ServerSocket.<init>(ServerSocket.java:97)
at
sun.rmi.transport.proxy.RMIDirectSocketFactory.createServerSocket(RMI
DirectSocketFactory.java:27)
at
sun.rmi.transport.proxy.RMIMasterSocketFactory.createServerSocket(RMI
MasterSocketFactory.java:333)
at
sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(TCPEndpoint.java:64
9)
at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:
299)
... 7 more
D:\workspace\serwer2>java -Djava.security.policy=test2.policy server
Liczba aktywnych watkow: 1
nazwa watku: main
Usluga druga niezarejestrowana: RemoteException occurred in server
thread; neste
d exception is:
java.rmi.UnmarshalException: error unmarshalling arguments;
nested excep
tion is:
java.lang.ClassNotFoundException: server_Stub
I didnt change anything in my source code...nothing...it just started
doing like this. Lately i was able to run two server process...and
everything was ok.... i was looking for a tip in google...but nothing
help...anybody knows how to fix it?
Tnx .