Re: problem with distribuited events

Bulzan Stefan <[email protected]> Sun, 13 Apr 2008 04:47:37 -0600
Newsgroups gmane.comp.java.sun.javaspaces
Message-ID <LISTSERV%[email protected]>
Hello,

I'm using Java 1.6.
I'm using a locale JavaSpaces space.

If I don't export the object using UnicastRemoteObject.exportObject() fro=
m
the constructor or from the caller the next exception is thrown:


java.rmi.MarshalException: error marshalling arguments; nested exception =
is:=20
=09java.io.NotSerializableException: main.Listener
=09at
net.jini.jeri.BasicInvocationHandler.invokeRemoteMethodOnce(BasicInvocati=
onHandler.java:785)
=09at
net.jini.jeri.BasicInvocationHandler.invokeRemoteMethod(BasicInvocationHa=
ndler.java:659)
=09at net.jini.jeri.BasicInvocationHandler.invoke(BasicInvocationHandler.=
java:528)
=09at com.sun.jini.outrigger.$Proxy1.notify(Unknown Source)
=09at com.sun.jini.outrigger.SpaceProxy2.notify(SpaceProxy2.java:507)
=09at main.HelloWorldNotify.main(HelloWorldNotify.java:18)

I've tried implementing Serializable in Listener class, still not exporti=
ng
the listener. In this case the following exception is thrown:

java.rmi.ServerException: RemoteException in server thread; nested except=
ion
is:=20
=09java.rmi.UnmarshalException: unmarshalling method/arguments; nested
exception is:=20
=09java.lang.ClassNotFoundException: main.Listener
=09at
net.jini.jeri.BasicInvocationDispatcher.dispatch(BasicInvocationDispatche=
r.java:644)
=09at com.sun.jini.jeri.internal.runtime.ObjectTable$6.run(ObjectTable.ja=
va:597)
=09at net.jini.export.ServerContext.doWithServerContext(ServerContext.jav=
a:103)
=09at
com.sun.jini.jeri.internal.runtime.ObjectTable$Target.dispatch0(ObjectTab=
le.java:595)
=09at
com.sun.jini.jeri.internal.runtime.ObjectTable$Target.access$700(ObjectTa=
ble.java:212)
=09at com.sun.jini.jeri.internal.runtime.ObjectTable$5.run(ObjectTable.ja=
va:568)
=09at
com.sun.jini.start.AggregatePolicyProvider$6.run(AggregatePolicyProvider.=
java:527)
=09at java.security.AccessController.doPrivileged(Native Method)
=09at
com.sun.jini.jeri.internal.runtime.ObjectTable$Target.dispatch(ObjectTabl=
e.java:565)
...

I've attached the full src directory of the project. If you can , take a
look, or even try it, maybe it's a problem with my space.

Thank you very much for your answers.

Best regards,=20
Stefan.

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff JAVASPACES-USERS".  For general help, send email to
[email protected] and include in the body of the message "help".

To view past JAVASPACES-USERS postings, please see:
http://archives.java.sun.com/archives/javaspaces-users.html