jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vincent Poupet <vincent.pou...@gmail.com>
Subject jackrabbit issus
Date Mon, 03 Jun 2013 13:57:22 GMT
Hi,

I try to use jackrabbit in a project, but I have some issues when I try to
add a node.

I'm pretty sur I miss something stupid, but I can't find what it is !

So, I can login to my repo and browse root node, but when I try to add a
Node, I get this error :

javax.jcr.InvalidItemStateException: Could not find child
deadbeef-cafe-babe-cafe-babecafebabe of node
cafebabe-cafe-babe-cafe-babecafebabe


I'm using version 2.6.1 with spring 3.2.2 with annotation.
I use this configuration :

<bean id="repository" class="org.apache.jackrabbit.core.RepositoryImpl">
        <constructor-arg index="0" ref="config" />
    </bean>
    <bean id="config"
class="org.apache.jackrabbit.core.config.RepositoryConfig"
factory-method="create">
        <constructor-arg index="0" value="${jcr.config.file}"/>
    <constructor-arg index="1" value="${jcr.home}" />
    </bean>

Where jcr.config.file and jcr.home are correcty filled.
I use the default repository.xml file (generated by Transient repository)


Here is my test code :


@Test
public void testSaveNew(){
Node n;
try {
session = repository.login(new SimpleCredentials(login,
password.toCharArray()));
n = session.getRootNode();
n.addNode("testNode"+Calendar.getInstance().getTimeInMillis());
session.save();
} catch (RepositoryException e) {
// TODO Auto-generated catch block
e.printStackTrace();
fail();
}
}




Any idea of what it going wrong ?

Thanks ! :-)

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