javaspace error - transaction

SUBSCRIBE JAVASPACES-USERS Anonymous <[email protected]> Tue, 17 Mar 2009 07:21:27 -0600
Newsgroups gmane.comp.java.sun.javaspaces
Message-ID <LISTSERV%[email protected]>
Hi all,

I have the following exception in my program...

java.rmi.ServerException: RemoteException in server thread; nested except=
ion is:
java.rmi.UnmarshalException: unmarshalling method/arguments; nested
exception is:
java.lang.ClassNotFoundException:
com.sun.jini.mahalo.TxnMgrProxy$ConstrainableTxnMgrProxy
at
net.jini.jeri.BasicInvocationDispatcher.dispatch(BasicInvocationDispatche=
r.java:644)
at com.sun.jini.jeri.internal.runtime.ObjectTable$6.run(ObjectTable.java:=
597)
at net.jini.export.ServerContext.doWithServerContext(ServerContext.java:1=
03)
at
com.sun.jini.jeri.internal.runtime.ObjectTable$Target.dispatch0(ObjectTab=
le.java:595)
at
com.sun.jini.jeri.internal.runtime.ObjectTable$Target.access$700(ObjectTa=
ble.java:212)
at com.sun.jini.jeri.internal.runtime.ObjectTable$5.run(ObjectTable.java:=
568)
at
com.sun.jini.start.AggregatePolicyProvider$6.run(AggregatePolicyProvider.=
java:527)
at java.security.AccessController.doPrivileged(Native Method)
at
com.sun.jini.jeri.internal.runtime.ObjectTable$Target.dispatch(ObjectTabl=
e.java:565)
at
com.sun.jini.jeri.internal.runtime.ObjectTable$Target.dispatch(ObjectTabl=
e.java:540)
at
com.sun.jini.jeri.internal.runtime.ObjectTable$RD.dispatch(ObjectTable.ja=
va:778)
at
net.jini.jeri.connection.ServerConnectionManager$Dispatcher.dispatch(Serv=
erConnectionManager.java:148)
at com.sun.jini.jeri.internal.mux.MuxServer$2.run(MuxServer.java:244)
at
com.sun.jini.start.AggregatePolicyProvider$5.run(AggregatePolicyProvider.=
java:513)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.jini.jeri.internal.mux.MuxServer$1.run(MuxServer.java:241)
at com.sun.jini.thread.ThreadPool$Worker.run(ThreadPool.java:136)
at java.lang.Thread.run(Thread.java:619)
at
com.sun.jini.jeri.internal.runtime.Util.__________EXCEPTION_RECEIVED_FROM=
_SERVER__________(Util.java:108)
at
com.sun.jini.jeri.internal.runtime.Util.exceptionReceivedFromServer(Util.=
java:101)
at
net.jini.jeri.BasicInvocationHandler.unmarshalThrow(BasicInvocationHandle=
r.java:1303)
at
net.jini.jeri.BasicInvocationHandler.invokeRemoteMethodOnce(BasicInvocati=
onHandler.java:832)
at
net.jini.jeri.BasicInvocationHandler.invokeRemoteMethod(BasicInvocationHa=
ndler.java:659)
at net.jini.jeri.BasicInvocationHandler.invoke(BasicInvocationHandler.jav=
a:528)
at com.sun.jini.outrigger.$Proxy2.write(Unknown Source)
at com.sun.jini.outrigger.SpaceProxy2.write(SpaceProxy2.java:296)
at myxml.main(myxml.java:48)
Caused by: java.rmi.UnmarshalException: unmarshalling method/arguments;
nested exception is:
java.lang.ClassNotFoundException:
com.sun.jini.mahalo.TxnMgrProxy$ConstrainableTxnMgrProxy
at
net.jini.jeri.BasicInvocationDispatcher.dispatch(BasicInvocationDispatche=
r.java:619)
at com.sun.jini.jeri.internal.runtime.ObjectTable$6.run(ObjectTable.java:=
597)
at net.jini.export.ServerContext.doWithServerContext(ServerContext.java:1=
03)
at
com.sun.jini.jeri.internal.runtime.ObjectTable$Target.dispatch0(ObjectTab=
le.java:595)
at
com.sun.jini.jeri.internal.runtime.ObjectTable$Target.access$700(ObjectTa=
ble.java:212)
at com.sun.jini.jeri.internal.runtime.ObjectTable$5.run(ObjectTable.java:=
568)
at
com.sun.jini.start.AggregatePolicyProvider$6.run(AggregatePolicyProvider.=
java:527)
at java.security.AccessController.doPrivileged(Native Method)
at
com.sun.jini.jeri.internal.runtime.ObjectTable$Target.dispatch(ObjectTabl=
e.java:565)
at
com.sun.jini.jeri.internal.runtime.ObjectTable$Target.dispatch(ObjectTabl=
e.java:540)
at
com.sun.jini.jeri.internal.runtime.ObjectTable$RD.dispatch(ObjectTable.ja=
va:778)
at
net.jini.jeri.connection.ServerConnectionManager$Dispatcher.dispatch(Serv=
erConnectionManager.java:148)
at com.sun.jini.jeri.internal.mux.MuxServer$2.run(MuxServer.java:244)
at
com.sun.jini.start.AggregatePolicyProvider$5.run(AggregatePolicyProvider.=
java:513)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.jini.jeri.internal.mux.MuxServer$1.run(MuxServer.java:241)
at com.sun.jini.thread.ThreadPool$Worker.run(ThreadPool.java:136)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassNotFoundException:
com.sun.jini.mahalo.TxnMgrProxy$ConstrainableTxnMgrProxy
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at
net.jini.loader.pref.PreferredClassLoader.loadClass(PreferredClassLoader.=
java:922)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at
net.jini.loader.pref.PreferredClassProvider.loadClass(PreferredClassProvi=
der.java:613)
at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:247)
at net.jini.loader.ClassLoading.loadClass(ClassLoading.java:138)
at net.jini.io.MarshalInputStream.resolveClass(MarshalInputStream.java:29=
6)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1575=
)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:17=
32)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:194=
7)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:17=
53)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
at com.sun.jini.jeri.internal.runtime.Util.unmarshalValue(Util.java:221)
at
net.jini.jeri.BasicInvocationDispatcher.unmarshalArguments(BasicInvocatio=
nDispatcher.java:1049)
at
net.jini.jeri.BasicInvocationDispatcher.dispatch(BasicInvocationDispatche=
r.java:599)
... 17 more



I am using jini2_1 service and eclipse to run the javaspace program. I ha=
ve
already added the jar files like mahalo,reggie .. in Java Build path of m=
y
program. But still I am getting CLASS NOT FOUND EXCEPTION...
com.sun.jini.mahalo.TxnMgrProxy$ConstrainableTxnMgrProxy


I tried to debug the program, the thing which I felt suspicious is follow=
ing:

In my program the JAVASPACE service is running properly. I am using
lookupdiscovery mechanism in jini. The lookup discovery mechanism is havi=
ng
a class Listener that implements DiscoveryListener and proxy generated by=

lookup() method inside discovered() method

_proxy=3Dlus.lookup(_template);

template =3D >ServiceTemplate object
lus =3D >ServiceRegistrar object

After
JavaSpace space=3DSpaceLocator.getSpace();

JAVASPACE PROXY(space) =3D com.sun.jini.outrigger.ConstrainableSpaceProxy=
2 for
909c299b-f355-4aca-aa7d-dd61f76c75bf (through
Proxy[OutriggerServer,BasicInvocationHandler[BasicObjectEndpoint[12d482de=
-3914-4217-b607-6c67f796081b,TcpEndpoint[192.168.38.202:2257]]]])




After
Transaction txn=3DTxnManager.createTxn(60000);

txn has value(TRANSACTION
PROXY)=3Dnet.jini.core.transaction.server.ServerTransaction
[manager=3Dcom.sun.jini.mahalo.TxnMgrProxy$ConstrainableTxnMgrProxy@619db=
fcc,
id=3D-706526335749167748]

Here when I compared the returned values------ txn proxy does'nt have a
tcpendpoint specified, may be this is the reason why the class not found
EXCEPTION occuring..

How I can solve this problem...?

=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