Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 99181 invoked from network); 21 Jul 2009 19:25:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Jul 2009 19:25:32 -0000 Received: (qmail 93733 invoked by uid 500); 21 Jul 2009 19:26:37 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 93656 invoked by uid 500); 21 Jul 2009 19:26:37 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 93648 invoked by uid 99); 21 Jul 2009 19:26:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Jul 2009 19:26:37 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Jul 2009 19:26:35 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id DD49B234C044 for ; Tue, 21 Jul 2009 12:26:14 -0700 (PDT) Message-ID: <1068506164.1248204374891.JavaMail.jira@brutus> Date: Tue, 21 Jul 2009 12:26:14 -0700 (PDT) From: "Alexander Klimetschek (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Updated: (JCRRMI-25) JSR-283: Support for javax.jcr.Binary In-Reply-To: <1534987671.1248197534957.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/JCRRMI-25?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alexander Klimetschek updated JCRRMI-25: ---------------------------------------- Issue Type: Sub-task (was: New Feature) Parent: JCRRMI-26 > JSR-283: Support for javax.jcr.Binary > ------------------------------------- > > Key: JCRRMI-25 > URL: https://issues.apache.org/jira/browse/JCRRMI-25 > Project: Jackrabbit JCR-RMI > Issue Type: Sub-task > Environment: tomcat 6.0.20 > jackrabbit 2.0 sanpshot > Reporter: bruno miguel cruz coelho > Fix For: 2.0.0 > > > 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 { > 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. > 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) > (...) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.