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)
