jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bruno coelho <bruno.coe...@gmail.com>
Subject rmi client RemoteRepositoryException - AbstractMethod
Date Tue, 21 Jul 2009 11:05:33 GMT
I sent this mail by my company's e-mail but I didn't receiv so I'm sending
it again by my personal mail. sorry it you got it twice.


Hi,

I have just checked out the last jackrabbit version 2.0 and I'm using it
with jcr rmi client 1.5.

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 {
                    repositorySession = repository.login(new
SimpleCredentials("admin", "admin".toCharArray()));
                    session.setAttribute("repositorySession",
repositorySession);
                 } catch (LoginException le) {
                     error = le.toString();
                 } catch (RepositoryException re) {
                     error = re.toString();
                 }
            }
            Node root = repositorySession.getRootNode();

            [...]

                  InputStream uploadedStream = item.getInputStream();
                   try {
                       Node fileNode = root.addNode(item.getName(),
"nt:file");
                           Node resNode = fileNode.addNode("jcr:content",
"nt:resource");
                            resNode.setProperty("jcr:mimeType",
item.getContentType());
                           resNode.setProperty("jcr:data", uploadedStream);
                           resNode.setProperty("jcr:lastModified",
Calendar.getInstance());
                    } 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.

is this correct?
if so what can I do to avoid the problem?

what am I doing wrong?

thanks in advance.


best regards,

bruno coelho


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)
     (...)

-- 
bruno coelho

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message