Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.0.0
-
None
-
tomcat 6.0.20
jackrabbit 2.0 sanpshot
Description
The RMI interface must support the new javax.jcr.Binary in JSR-283.
Below is the original bug report with the exception when using jcr-rmi 1.6 with a Jackrabbit 2.0 alpha repository.
==============================
I have deployed the jackrabbit web-app in a tomcat (6.0.20) and now I trying
to connect another web-app, in the same tomcat instance, to the repository
by RMI.
I can get the repository client, create nodes and browse the repository in
this other web-app, all by RMI.
the only thing I can't do is create a node (jcr:content) with a file
(jcr:data):
Repository repository;
Session repositorySession = (Session)
session.getAttribute("repositorySession");
if (repositorySession == null) {
repository =
RepositoryAccessServlet.getRepository(pageContext.getServletContext());
try
catch (LoginException le)
{ error = le.toString(); }catch (RepositoryException re)
{ error = re.toString(); } }
Node root = repositorySession.getRootNode();
[...]
InputStream uploadedStream = item.getInputStream();
try
catch (Exception e)
{ error = e.toString(); }finally
{ uploadedStream.close(); }I get an AbstractMethodError exception (check the complete stack trace at
the end).
from what I could dig in the code, looks like these is caused by the lack of
the method getBinary(Binary bin) in SerialValue.
org.apache.jackrabbit.rmi.client.RemoteRepositoryException:
java.rmi.ServerError: Error occurred in server thread; nested exception is:
java.lang.AbstractMethodError:
org.apache.jackrabbit.rmi.value.SerialValue.getBinary()Ljavax/jcr/Binary;
at
org.apache.jackrabbit.rmi.client.ClientNode.setProperty(ClientNode.java:131)
at
org.apache.jackrabbit.rmi.client.ClientNode.setProperty(ClientNode.java:182)
at repo.NodeHouseImpl.createNode(NodeHouseImpl.java:77)
at
org.apache.jsp.createNodesPost_jsp._jspService(createNodesPost_jsp.java:142)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
(...)
Caused by: java.rmi.ServerError: Error occurred in server thread; nested
exception is:
java.lang.AbstractMethodError:
org.apache.jackrabbit.rmi.value.SerialValue.getBinary()Ljavax/jcr/Binary;
at
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)
at sun.rmi.transport.Transport$1.run(Transport.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
at java.lang.Thread.run(Thread.java:595)
at
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
at
sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
at
org.apache.jackrabbit.rmi.server.ServerNode_Stub.setProperty(Unknown Source)
at
org.apache.jackrabbit.rmi.client.ClientNode.setProperty(ClientNode.java:126)
... 21 more
Caused by: java.lang.AbstractMethodError:
org.apache.jackrabbit.rmi.value.SerialValue.getBinary()Ljavax/jcr/Binary;
at
org.apache.jackrabbit.core.value.InternalValue.create(InternalValue.java:134)
at
org.apache.jackrabbit.core.PropertyImpl.setValue(PropertyImpl.java:660)
at
org.apache.jackrabbit.core.NodeImpl.setProperty(NodeImpl.java:2462)
at
org.apache.jackrabbit.rmi.server.ServerNode.setProperty(ServerNode.java:246)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
(...)