I'm getting the following exception involving transactions and a remote repository:
Note: The line numbers are off as I made some attempts to fix the problem (unsuccessfully).
I found the following related issues:Code:Caused by: javax.transaction.xa.XAException: Remote operation failed at org.apache.jackrabbit.rmi.client.ClientXAResource.getXAException(ClientXAResource.java:58) at org.apache.jackrabbit.rmi.client.ClientXAResource.start(ClientXAResource.java:131) at org.springframework.extensions.jcr.jackrabbit.support.JackRabbitUserTransaction.begin(JackRabbitUserTransaction.java:68) ... 29 more Caused by: java.rmi.MarshalException: error marshalling arguments; nested exception is: java.io.NotSerializableException: org.springframework.extensions.jcr.jackrabbit.support.JackRabbitUserTransaction$XidImpl at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:138) at org.apache.jackrabbit.rmi.server.ServerXAResource_Stub.start(Unknown Source) at org.apache.jackrabbit.rmi.client.ClientXAResource.start(ClientXAResource.java:129) ... 30 more Caused by: java.io.NotSerializableException: org.springframework.extensions.jcr.jackrabbit.support.JackRabbitUserTransaction$XidImpl at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1153) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326) at sun.rmi.server.UnicastRef.marshalValue(UnicastRef.java:274) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133) ... 32 more
http://issues.apache.org/jira/browse/JCR-1333 (says the problem's fixed in JCR-RMI 1.5--but that's the JAR version that I'm using)
http://forum.springsource.org/archiv...p/t-63915.html (user states he was able to workaround the problem; I was not)
I'm using SE-JCR 0.9 and Jackrabbit 1.6 over RMI. My config looks like this:
In general, do users of Jackrabbit use RMI or instead expose their own service layers remotely? Does the SE-JCR team test RMI regularly? Thanks for your help!Code:<bean id="rmiClientFactory" class="org.apache.jackrabbit.rmi.client.ClientRepositoryFactory"> <constructor-arg> <bean class="org.apache.jackrabbit.rmi.jackrabbit.JackrabbitClientAdapterFactory" /> </constructor-arg> </bean> <bean id="jcrRepository" factory-bean="rmiClientFactory" factory-method="getRepository"> <constructor-arg value="rmi://localhost:1099/jackrabbit"/> </bean>


Reply With Quote