-
1. Re: Use of jcr:name seems to be ignored in initialContent configuration
hchiorean Oct 10, 2014 2:16 AM (in response to kyawzaw)What does your initial content file look like? This modeshape/carsInitialContent.xml at 3.x · ModeShape/modeshape · GitHub is an example of a file we're using in our tests and it works fine.
Did you declare the jcr namespace in your file ?
-
2. Re: Use of jcr:name seems to be ignored in initialContent configuration
kyawzaw Oct 11, 2014 1:28 AM (in response to hchiorean)I tried with following
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:car="http://www.modeshape.org/examples/cars/1.0">
<car:Car jcr:name="Toyota Prius" />
</jcr:root>
and a node with name "ns001:Car" was created under root.
Not to bring in namespace into this, I also tried with simpler following
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0">
<Car jcr:name="Toyota Prius" />
</jcr:root>
This time a node was created with name "Car", not "Toyota Prius" I was expecting.
Thanks in advance.
Regards,
Kyaw
I created a JIRA.
[MODE-2335] jcr:name is ignored in initialContent - JBoss Issue Tracker
[Problem solved]
There was a typo in a namespace in my project and caused the problem. With proper namespace declarations, the problem was fixed.
-
3. Re: Use of jcr:name seems to be ignored in initialContent configuration
hchiorean Oct 10, 2014 3:23 AM (in response to kyawzaw)does your repository configuration define the "cars" node types ? i.e. "node-types" : ["cnd/cars.cnd"]. If not, make sure you define it because the initial content in this example is asking Modeshape to create a node with the "Car" type.
Is this happening with ModeShape 4.0 ? If yes, please open a JIRA & attach your initial content file and repository configuration, since jcr:name should be used regardless.
If you're testing using ModeShape 3 make sure you're using 3.8.1.Final.