java.rmi.UnmarshalException

liang li <[email protected]> Tue, 13 May 2008 20:26:10 +0800
Newsgroups gmane.comp.java.sun.jini
Message-ID <[email protected]>
hi, all

    when i developed a jini program, i met i big problem, like this:
java.rmi.UnmarshalException: error unmarshalling return; nested exception
is:
 java.lang.ClassNotFoundException:
com.wri.hy.onecgs.jini.service.logging.Log4JiniImpl
 at com.sun.jini.reggie.RegistrarProxy.lookup(RegistrarProxy.java:120)
 at
com.wri.hy.onecgs.jini.test.TestLogService.searchServiceItem(TestLogService.java:55)
 at
com.wri.hy.onecgs.jini.test.TestLogService.<init>(TestLogService.java:73)
 at com.wri.hy.onecgs.jini.test.TestLogService.main(TestLogService.java:109)
Caused by: java.lang.ClassNotFoundException:
com.wri.hy.onecgs.jini.service.logging.Log4JiniImpl
 at java.net.URLClassLoader$1.run(Unknown Source)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(Unknown Source)
 at java.lang.ClassLoader.loadClass(Unknown Source)
 at java.lang.ClassLoader.loadClass(Unknown Source)
 at java.lang.ClassLoader.loadClassInternal(Unknown Source)
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Unknown Source)
 at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
 at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
 at java.rmi.server.RMIClassLoader$2.loadClass(Unknown Source)
 at java.rmi.server.RMIClassLoader.loadClass(Unknown Source)
 at net.jini.loader.ClassLoading.loadClass(ClassLoading.java:138)
 at net.jini.io.MarshalInputStream.resolveClass(MarshalInputStream.java:296)
 at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
 at java.io.ObjectInputStream.readClassDesc(Unknown Source)
 at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
 at java.io.ObjectInputStream.readObject0(Unknown Source)
 at java.io.ObjectInputStream.readObject(Unknown Source)
 at net.jini.io.MarshalledInstance.get(MarshalledInstance.java:358)
 at net.jini.io.MarshalledInstance.get(MarshalledInstance.java:287)
 at com.sun.jini.proxy.MarshalledWrapper.get(MarshalledWrapper.java:127)
 at com.sun.jini.reggie.RegistrarProxy.lookup(RegistrarProxy.java:116)
 ... 3 more


what i did is:
1  design a interface class
2  implement the interface class
3  coding  a jini service
4  build these java file
5  run rmic to produce a stub
6  rmiregistry(is needed?),launch all jini service and the new service(using
jini browser i can saw this service)
7  run client on another pc
8  exception above is throwed.
(my service and client run on the same pc, everything is OK)

could you tell me what is wrong?

best regards

byron lee

--------------------------------------------------------------------------
Getting Started:     http://www.jini.org/wiki/Category:Getting_Started
Community Web Site:  http://jini.org
jini-users Archive:  http://archives.java.sun.com/archives/jini-users.html
Unsubscribing:       email "signoff JINI-USERS"  to [email protected]