jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <marcel.reuteg...@gmx.net>
Subject Re: Recognition of JCR nodetypes in a SPI implementation
Date Fri, 20 Jun 2008 13:59:00 GMT
Hi,

in jackrabbit-spi-commons trunk there's a nodetype package that allows you to 
easily turn a CND definition into QNodeTypeDefinitions.

regards
  marcel

Pierre Leman wrote:
> Hi,
> 
> 
> I am currently working on a custom SPI implementation, and especially on the
> nodetypes management methods.
> When I run my SPI implementation using the jcr2spi component I get the
> following stack trace. It seems that the cause is that the JCR nodetypes are
> missing. My question concerns the best way to get them working declaring
> them in the getQNodeTypeDefinitions method (as I think that's I have to do).
> Does anyone have an idea ?
> 
> In my getNodeInfo method I use the following call to get the nt:unstructured
> nodetype name (which I use for almost all my nodes) :
> Name ntUnstructuredNodeTypeName =
> resolver.getQName(JcrConstants.NT_UNSTRUCTURED);
> 
> java.lang.IllegalArgumentException: Unknown nodetype nt:unstructured
>     at org.apache.jackrabbit.jcr2spi.NodeImpl.<init>(NodeImpl.java:107)
>     at
> org.apache.jackrabbit.jcr2spi.ItemManagerImpl.createNodeInstance(ItemManagerImpl.java:357)
>     at
> org.apache.jackrabbit.jcr2spi.ItemManagerImpl.getItem(ItemManagerImpl.java:181)
>     at
> org.apache.jackrabbit.jcr2spi.ItemManagerImpl.getItem(ItemManagerImpl.java:158)
>     at
> org.apache.jackrabbit.jcr2spi.SessionImpl.getRootNode(SessionImpl.java:225)
>     at
> org.mdweb.spi2mdweb.ExternalJCRMDWebTest.testJCRAccess(ExternalJCRMDWebTest.java:51)
>     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)
> 
> Thank you in advance,
> Pierre
> 


Mime
View raw message