eclipse - Java RMI server probleme -
i'm doing tutorial : http://www.youtube.com/watch?v=vkw275pti3e it's java rmi tutorial (client, server) try on local , dosen't work on computer
when try activate server in local got message :
java.rmi.serverexception: remoteexception occurred in server thread; nested exception is: java.rmi.unmarshalexception: error unmarshalling arguments; nested exception is: java.lang.classnotfoundexception: simple.rmi.server.myserver_stub @ sun.rmi.server.unicastserverref.olddispatch(unicastserverref.java:400) @ sun.rmi.server.unicastserverref.dispatch(unicastserverref.java:248) @ sun.rmi.transport.transport$1.run(transport.java:159) @ java.security.accesscontroller.doprivileged(native method) @ sun.rmi.transport.transport.servicecall(transport.java:155) @ sun.rmi.transport.tcp.tcptransport.handlemessages(tcptransport.java:535) @ sun.rmi.transport.tcp.tcptransport$connectionhandler.run0(tcptransport.java:790) @ sun.rmi.transport.tcp.tcptransport$connectionhandler.run(tcptransport.java:649) @ java.util.concurrent.threadpoolexecutor$worker.runtask(threadpoolexecutor.java:895) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:918) @ java.lang.thread.run(thread.java:680) @ sun.rmi.transport.streamremotecall.exceptionreceivedfromserver(streamremotecall.java:255) @ sun.rmi.transport.streamremotecall.executecall(streamremotecall.java:233) @ sun.rmi.server.unicastref.invoke(unicastref.java:359) @ sun.rmi.registry.registryimpl_stub.bind(unknown source) @ simple.rmi.server.myserver.main(myserver.java:33) caused by: java.rmi.unmarshalexception: error unmarshalling arguments; nested exception is: java.lang.classnotfoundexception: simple.rmi.server.myserver_stub @ sun.rmi.registry.registryimpl_skel.dispatch(unknown source) @ sun.rmi.server.unicastserverref.olddispatch(unicastserverref.java:390) @ sun.rmi.server.unicastserverref.dispatch(unicastserverref.java:248) @ sun.rmi.transport.transport$1.run(transport.java:159) @ java.security.accesscontroller.doprivileged(native method) @ sun.rmi.transport.transport.servicecall(transport.java:155) @ sun.rmi.transport.tcp.tcptransport.handlemessages(tcptransport.java:535) @ sun.rmi.transport.tcp.tcptransport$connectionhandler.run0(tcptransport.java:790) @ sun.rmi.transport.tcp.tcptransport$connectionhandler.run(tcptransport.java:649) @ java.util.concurrent.threadpoolexecutor$worker.runtask(threadpoolexecutor.java:895) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:918) @ java.lang.thread.run(thread.java:680) caused by: java.lang.classnotfoundexception: simple.rmi.server.myserver_stub @ java.net.urlclassloader$1.run(urlclassloader.java:202) @ java.security.accesscontroller.doprivileged(native method) @ java.net.urlclassloader.findclass(urlclassloader.java:190) @ java.lang.classloader.loadclass(classloader.java:306) @ sun.rmi.server.loaderhandler$loader.loadclass(loaderhandler.java:1185) @ java.lang.classloader.loadclass(classloader.java:247) @ java.lang.class.forname0(native method) @ java.lang.class.forname(class.java:249) @ sun.rmi.server.loaderhandler.loadclassforname(loaderhandler.java:1198) @ sun.rmi.server.loaderhandler.loadclass(loaderhandler.java:433) @ sun.rmi.server.loaderhandler.loadclass(loaderhandler.java:164) @ java.rmi.server.rmiclassloader$2.loadclass(rmiclassloader.java:620) @ java.rmi.server.rmiclassloader.loadclass(rmiclassloader.java:247) @ sun.rmi.server.marshalinputstream.resolveclass(marshalinputstream.java:201) @ java.io.objectinputstream.readnonproxydesc(objectinputstream.java:1589) @ java.io.objectinputstream.readclassdesc(objectinputstream.java:1494) @ java.io.objectinputstream.readordinaryobject(objectinputstream.java:1748) @ java.io.objectinputstream.readobject0(objectinputstream.java:1327) @ java.io.objectinputstream.readobject(objectinputstream.java:349) ... 12 more
what can ?
some incompatible changes have been made in recent jdk versions cause old rmi tutorials not work. in particular, jdk 7u21 requires set codebase property on client , registry on server. screencast shows setting on server.
the screencast (or perhaps eclipse plugin) out of date in shows generation of stubs. it's not necessary use tool such rmic
or eclipse plugin generate stubs, since stubs have been generated automatically rmi since java se 5 (which released in 2002).
Comments
Post a Comment