Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 816 invoked from network); 17 Jun 2008 20:47:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Jun 2008 20:47:05 -0000 Received: (qmail 23328 invoked by uid 500); 17 Jun 2008 20:47:06 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 23082 invoked by uid 500); 17 Jun 2008 20:47:05 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 23071 invoked by uid 99); 17 Jun 2008 20:47:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Jun 2008 13:47:05 -0700 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=SPF_SOFTFAIL X-Spam-Check-By: apache.org Received-SPF: softfail (athena.apache.org: transitioning domain of michael.duerig@day.com does not designate 91.199.146.30 as permitted sender) Received: from [91.199.146.30] (HELO merkur.eye.ch) (91.199.146.30) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Jun 2008 20:46:15 +0000 Received: from [192.168.10.242] [62.192.10.243] by merkur.eye.ch with ESMTP (SMTPD-9.20) id A2AA0210; Tue, 17 Jun 2008 22:46:34 +0200 Message-ID: <4858229E.4090500@day.com> Date: Tue, 17 Jun 2008 22:46:22 +0200 From: =?ISO-8859-1?Q?Michael_D=FCrig?= User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: users@jackrabbit.apache.org Subject: Re: SPI implementation and calls from the jcr2spi component References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-mxGuard-Info: Processed by merkur.eye.ch using mxGuard v3.2 X-mxGuard-SpoolID: 22aa01c700000ad1 X-mxGuard-Sender: michael.duerig@day.com X-mxGuard-Trusted: SMTP-AUTH [mduerig@merkur.eye.ch] X-mxGuard-Spam-Score: 0 X-mxGuard-Spam-Probability: CLEAN X-Note: This message has been scanned for spam and viruses by mxGuard for IMail (www.mxguard.com). Now Available in Switzerland (www.merlinconsulting.ch) X-Virus-Checked: Checked by ClamAV on apache.org Pierre, That's strange. The jcr2spi implementation used the factories you supply with your SPI implementation to create paths and ids. It never creates ids on its own. One thing to check is the NodeId of your ItemInfos. jcr2spi uses these in calls to your RepositoryService implementation. Michael Pierre Leman wrote: > Hi, > > > The SPI javadoc indicate three basic forms for an ItemId ( > http://jackrabbit.apache.org/api/1.4/org/apache/jackrabbit/spi/ItemId.html) > : > - The ItemId identified by a UUID > - The ItemId identified by a Path > - The ItemId identified by a UUID and a Path > > In my SPI implementation I have only used Path identified ItemId. However I > get a problem when I run my SPI implementation with the jcr2spi component. > A call to the getItemInfos method of my RepositoryService implementation is > made using a ItemId with a UUID and no Path. As my implementation doesn't > support this call type (by UUID), it crashes with a NullPointerException (In > fact, not this method but the getJCRPath method called with a null Path). > I am currently exploring some way to resolve this bug like looking at the > node definition and nodetype definition methods but without success. Does > anyone have an idea on this bug ? Do I have to implement UUID based ItemInfo > search ? > > Thank you in advance, > Pierre > > Below, the full stack trace : > java.lang.NullPointerException > at > org.apache.jackrabbit.spi.commons.conversion.ParsingPathResolver.getJCRPath(ParsingPathResolver.java:74) > at > org.apache.jackrabbit.spi.commons.conversion.DefaultNamePathResolver.getJCRPath(DefaultNamePathResolver.java:73) > at > org.mdweb.spi2mdweb.RepositoryServiceImpl.getItemInfos(RepositoryServiceImpl.java:390) > at > org.apache.jackrabbit.jcr2spi.state.WorkspaceItemStateFactory.createNodeState(WorkspaceItemStateFactory.java:88) > at > org.apache.jackrabbit.jcr2spi.state.TransientISFactory.createNodeState(TransientISFactory.java:99) > at > org.apache.jackrabbit.jcr2spi.hierarchy.NodeEntryImpl.doResolve(NodeEntryImpl.java:959) > at > org.apache.jackrabbit.jcr2spi.hierarchy.HierarchyEntryImpl.resolve(HierarchyEntryImpl.java:95) > at > org.apache.jackrabbit.jcr2spi.hierarchy.HierarchyEntryImpl.getItemState(HierarchyEntryImpl.java:212) > at > org.apache.jackrabbit.jcr2spi.ItemManagerImpl.getItem(ItemManagerImpl.java:157) > at org.apache.jackrabbit.jcr2spi.NodeImpl.getNode(NodeImpl.java:406) > at > org.mdweb.spi2mdweb.ExternalJCRMDWebTest.testJCRAccess(ExternalJCRMDWebTest.java:53) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99) > at > org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81) > at > org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34) > at > org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75) > at > org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45) > at > org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66) > at > org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35) > at > org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42) > at > org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34) > at > org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52) > at > org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38) > at > org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) >