rmiregistry must be started from within source path?
I'm experiencing pretty much the same problem that was described in this:
http://forum.java.sun.com/thread.jspa?forumID=58&threadID=174893
post, but I'm still confounded by it.
Here's my problem in a nutshell:
If I start rmiregistry from a point in my project classpath, I can then start my server with no problems. If I start rmiregistry from anywhere else, the server fails with:
EASSwitch exception:RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: EASClient.EASSwitchIface
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
...
I've tried all the stuff suggested, but I must be doing something wrong.
Here's what works:
I start rmiregistry from within my project location:
ed@falcon:~/src/workspace/EASServer/src$ rmiregistry &
[4] 2236
ed@falcon:~/src/workspace/EASServer/src$ java -jar ~ed/bin/EASServer2_fat.jar
server-> EASSwitch Server starting...
server-> EASSwitch is bound. Server Ready.
The server is started and running, ok.
But if I start rmiregistry from anywhere else I get:
ed@falcon:~/src/workspace$ rmiregistry &
[4] 2309
ed@falcon:~/src/workspace$ java -Djava.rmi.server.codebase=file:///home/ed/src/workspace/EASServer/src/EASRemote/ -classpath /home/ed/src/workspace/EASServer/src/ -jar ~ed/bin/EASServer2_fat.jar
server-> EASSwitch Server starting...
EASSwitch exception:RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: EASClient.EASSwitchIface
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: EASClient.EASSwitchIface
I've tried to change the codebase pointer to http and include the classpath on the command line also with no effect:
java -Djava.rmi.server.codebase=http://165.137.27.143/apache2-default/EASRemote_Stub.class -jar ~ed/bin/EASServer2_fat.jar
and
ed@falcon:~/src/workspace/EASServer/src$ java -Djava.rmi.server.codebase=http://165.137.27.143/apache2-default/ -classpath . -jar ~ed/bin/EASServer2_fat.jar
server-> EASSwitch Server starting...
EASSwitch exception:RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: EASClient.EASSwitchIface
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: EASClient.EASSwitchIface
The file EASRemote_Stub.class is in the apache2-default directory and in the filesystem location specified in the above examples.
Since I want to deploy this, i don't want to have to include the source code.
Thanks in advance,
Ed

