You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by dan z <da...@hotmail.com> on 2006/07/24 19:58:45 UTC
help please: no matching property definition found
Hi all,
I'm having problem with the following node type definition that is imported
into the repository with the compact reader. The purpose is to define a
keyword list collection that contains multilingual labels.
[cm:languageLabelNode] > nt:base,mix:referenceable,mix:lockable
-cm:language (string) = 'en' mandatory autocreated copy
-cm:label (string) mandatory copy
[cm:keywordEntryNode] > nt:base,mix:referenceable,mix:lockable
-cm:entryValue (string) mandatory copy
-cm:orderPosition (string) mandatory copy
-cm:default (boolean) mandatory copy
+* (cm:languageLabelNode) = cm:languageLabelNode
copy
[cm:keywordNode] > cm:entityNode
+* (cm:keywordEntryNode) = cm:keywordEntryNode
copy
[cm:keywordsNode] > nt:base
+* (cm:keywordNode) = cm:keywordNode
copy
When creating new "keywordEntryNode" and setting the "orderPosition"
property, I keep gettting error complaining that "no matching property
definition found" for the "orderPosition" property of nodeType
"cm:keywordEntryNode".
Then I used the following code to list all declared property definitions,
the result doesn't contain my property definition for "cm:orderPosition"
either.
PropertyDefinition[] pdf =
node.getPrimaryNodeType().getDeclaredPropertyDefinitions();
for (int i=0;i<pdf.length;i++){
logger.debug("** pdf " + i + " - " + pdf[i].getName() );
String[] ss = pdf[i].getValueConstraints();
for(int j=0;j<ss.length;j++){
logger.debug(" --- " + ss[j]);
}
}
Could anyone advise on what have I missed? Thanks in advance.
D.
_________________________________________________________________
Play Q6 for your chance to WIN great prizes.
http://q6trivia.imagine-live.com/enca/landing
Re: help please: no matching property definition found
Posted by Stefan Guggisberg <st...@gmail.com>.
hi dan,
i ran the following test code on svn head:
NamespaceRegistry nsReg = wsp.getNamespaceRegistry();
nsReg.registerNamespace("cm", "http://www.pointalliance.com/cm");
JackrabbitNodeTypeManager manager = (JackrabbitNodeTypeManager)
session.getWorkspace().getNodeTypeManager();
manager.registerNodeTypes(new FileInputStream("d:/temp/test.cnd"),
JackrabbitNodeTypeManager.TEXT_X_JCR_CND);
NodeType nt = manager.getNodeType("cm:keywordEntryNode");
Node n = root.addNode("foo", "cm:keywordEntryNode");
n.setProperty("cm:orderPosition", 99);
everything worked as expected.
btw: i had to comment a few lines in your cnd because of unresolved externals:
<test.cnd>
[cm:languageLabelNode] > nt:base,mix:referenceable,mix:lockable
-cm:language (string) = 'en' mandatory autocreated copy
-cm:label (string) mandatory copy
[cm:keywordEntryNode] > nt:base,mix:referenceable,mix:lockable
-cm:entryValue (string) mandatory copy
-cm:orderPosition (string) mandatory copy
-cm:default (boolean) mandatory copy
+* (cm:languageLabelNode) = cm:languageLabelNode copy
//[cm:keywordNode] > cm:entityNode
//+* (cm:keywordEntryNode) = cm:keywordEntryNode copy
//[cm:keywordsNode] > nt:base
//+* (cm:keywordNode) = cm:keywordNode copy
</test.cnd>
cheers
stefan
On 7/24/06, dan z <da...@hotmail.com> wrote:
> Hi all,
>
> I'm having problem with the following node type definition that is imported
> into the repository with the compact reader. The purpose is to define a
> keyword list collection that contains multilingual labels.
>
> [cm:languageLabelNode] > nt:base,mix:referenceable,mix:lockable
> -cm:language (string) = 'en' mandatory autocreated copy
> -cm:label (string) mandatory copy
>
> [cm:keywordEntryNode] > nt:base,mix:referenceable,mix:lockable
> -cm:entryValue (string) mandatory copy
> -cm:orderPosition (string) mandatory copy
> -cm:default (boolean) mandatory copy
> +* (cm:languageLabelNode) = cm:languageLabelNode
> copy
>
> [cm:keywordNode] > cm:entityNode
> +* (cm:keywordEntryNode) = cm:keywordEntryNode
> copy
>
> [cm:keywordsNode] > nt:base
> +* (cm:keywordNode) = cm:keywordNode
> copy
>
> When creating new "keywordEntryNode" and setting the "orderPosition"
> property, I keep gettting error complaining that "no matching property
> definition found" for the "orderPosition" property of nodeType
> "cm:keywordEntryNode".
>
> Then I used the following code to list all declared property definitions,
> the result doesn't contain my property definition for "cm:orderPosition"
> either.
>
> PropertyDefinition[] pdf =
> node.getPrimaryNodeType().getDeclaredPropertyDefinitions();
> for (int i=0;i<pdf.length;i++){
> logger.debug("** pdf " + i + " - " + pdf[i].getName() );
> String[] ss = pdf[i].getValueConstraints();
> for(int j=0;j<ss.length;j++){
> logger.debug(" --- " + ss[j]);
> }
> }
>
>
> Could anyone advise on what have I missed? Thanks in advance.
>
> D.
>
> _________________________________________________________________
> Play Q6 for your chance to WIN great prizes.
> http://q6trivia.imagine-live.com/enca/landing
>
>
Re: Jackrabbit Model 2 Deployment in Tomcat 5.5.17
Posted by Jukka Zitting <ju...@gmail.com>.
Hi,
On 7/25/06, Shanmugam Gopal <ha...@hotmail.com> wrote:
> I am trying for Model 2 deployment of Jackrabbit repository in Tomcat
> 5.5.17 I am getting java.lang.ClassCastException:
> org.apache.jackrabbit.core.jndi.BindableRepository
> exception when I try to cast the looked up repository to
> javax.jcr.Repository.
It's most likely caused by the Repository class not being shared
between the web applications. If each of them loads the class locally
from WEB-INF/lib/jcr-1.0.jar and not from shared/lib/jcr-1.0.jar or
some other shared location, then they won't be able to share a
Repository.
BR,
Jukka Zitting
--
Yukatan - http://yukatan.fi/ - info@yukatan.fi
Software craftsmanship, JCR consulting, and Java development
Jackrabbit Model 2 Deployment in Tomcat 5.5.17
Posted by Shanmugam Gopal <ha...@hotmail.com>.
Hi,
I am trying for Model 2 deployment of Jackrabbit repository in Tomcat
5.5.17
I am getting java.lang.ClassCastException:
org.apache.jackrabbit.core.jndi.BindableRepository
exception when I try to cast the looked up repository to
javax.jcr.Repository.
The object returned is a BindableRepository which is configured in the
server.xml as per model 2 deployment.
I have all the jars in WEB-INF/LIB folder and common/LIB folder as well.
Even I tried with the following tag in server.xml
<host ...>
<context crossContext="true" docBase="..." path="..."/>
</host>
It doesn't work at the same time this works fine in Tomcat 5.0.
Is there any problem with Tomcat 5.5.17 or any fix available for this ?
Regards,
Shanmugam G
_________________________________________________________________
Who will win Bollywoods most coveted IIFA awards? You decide! Cast your
vote! http://server1.msn.co.in/sp06/IIFA2006/static/weekend.asp
Re: help please: no matching property definition found
Posted by dan z <da...@hotmail.com>.
Hi Tobias,
Thanks for responding. I've verified the problem by 1) completely clearing
the repository database and file structure; 2) renaming the property. And
the result is same.
By the way, here is the exception thrown when attempting to set the
property:
javax.jcr.nodetype.ConstraintViolationException: no matching property
definition found for {http://www.pointalliance.com/cm}orderPosition
at
org.apache.jackrabbit.core.nodetype.EffectiveNodeType.getApplicablePropertyDef(EffectiveNodeType.java:797)
at
org.apache.jackrabbit.core.NodeImpl.getApplicablePropertyDefinition(NodeImpl.java:922)
at
org.apache.jackrabbit.core.NodeImpl.getOrCreateProperty(NodeImpl.java:455)
at
org.apache.jackrabbit.core.NodeImpl.getOrCreateProperty(NodeImpl.java:405)
at org.apache.jackrabbit.core.NodeImpl.setProperty(NodeImpl.java:2076)
Regards,
Dan.
>From: "Tobias Bocanegra" <to...@day.com>
>Reply-To: tobias.bocanegra@day.com
>To: users@jackrabbit.apache.org
>Subject: Re: help please: no matching property definition found
>Date: Mon, 24 Jul 2006 20:15:45 +0200
>
>hi dan,
>that sounds weird. you are sure, that your nodetypes were imported
>correctly? maybe you had some garbage from prior tests?
>
>i quickly imported your nodetypes and created a node in our test-env.
>check on: http://jcr.day.com/ , click explorer, and click on the
>dan_Z_test.
>
>btw: i would not name the nodetypes 'cm:...Node', since it's obvious
>that you create nodes with it. in java, you dont name your classes
>FooBarClass, do you?
>
>regards, toby
>
>
>On 7/24/06, dan z <da...@hotmail.com> wrote:
>>Hi all,
>>
>>I'm having problem with the following node type definition that is
>>imported
>>into the repository with the compact reader. The purpose is to define a
>>keyword list collection that contains multilingual labels.
>>
>>[cm:languageLabelNode] > nt:base,mix:referenceable,mix:lockable
>>-cm:language (string) = 'en' mandatory autocreated copy
>>-cm:label (string) mandatory copy
>>
>>[cm:keywordEntryNode] > nt:base,mix:referenceable,mix:lockable
>>-cm:entryValue (string) mandatory copy
>>-cm:orderPosition (string) mandatory copy
>>-cm:default (boolean) mandatory copy
>>+* (cm:languageLabelNode) = cm:languageLabelNode
>> copy
>>
>>[cm:keywordNode] > cm:entityNode
>>+* (cm:keywordEntryNode) = cm:keywordEntryNode
>> copy
>>
>>[cm:keywordsNode] > nt:base
>>+* (cm:keywordNode) = cm:keywordNode
>> copy
>>
>>When creating new "keywordEntryNode" and setting the "orderPosition"
>>property, I keep gettting error complaining that "no matching property
>>definition found" for the "orderPosition" property of nodeType
>>"cm:keywordEntryNode".
>>
>>Then I used the following code to list all declared property definitions,
>>the result doesn't contain my property definition for "cm:orderPosition"
>>either.
>>
>>PropertyDefinition[] pdf =
>>node.getPrimaryNodeType().getDeclaredPropertyDefinitions();
>> for (int i=0;i<pdf.length;i++){
>> logger.debug("** pdf " + i + " - " +
>>pdf[i].getName() );
>> String[] ss = pdf[i].getValueConstraints();
>> for(int j=0;j<ss.length;j++){
>> logger.debug(" --- " + ss[j]);
>> }
>> }
>>
>>
>>Could anyone advise on what have I missed? Thanks in advance.
>>
>>D.
>>
>>_________________________________________________________________
>>Play Q6 for your chance to WIN great prizes.
>>http://q6trivia.imagine-live.com/enca/landing
>>
>>
>
>
>--
>-----------------------------------------< tobias.bocanegra@day.com >---
>Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
>T +41 61 226 98 98, F +41 61 226 98 97
>-----------------------------------------------< http://www.day.com >---
_________________________________________________________________
Play Q6 for your chance to WIN great prizes.
http://q6trivia.imagine-live.com/enca/landing
Re: help please: no matching property definition found
Posted by Tobias Bocanegra <to...@day.com>.
hi dan,
that sounds weird. you are sure, that your nodetypes were imported
correctly? maybe you had some garbage from prior tests?
i quickly imported your nodetypes and created a node in our test-env.
check on: http://jcr.day.com/ , click explorer, and click on the dan_Z_test.
btw: i would not name the nodetypes 'cm:...Node', since it's obvious
that you create nodes with it. in java, you dont name your classes
FooBarClass, do you?
regards, toby
On 7/24/06, dan z <da...@hotmail.com> wrote:
> Hi all,
>
> I'm having problem with the following node type definition that is imported
> into the repository with the compact reader. The purpose is to define a
> keyword list collection that contains multilingual labels.
>
> [cm:languageLabelNode] > nt:base,mix:referenceable,mix:lockable
> -cm:language (string) = 'en' mandatory autocreated copy
> -cm:label (string) mandatory copy
>
> [cm:keywordEntryNode] > nt:base,mix:referenceable,mix:lockable
> -cm:entryValue (string) mandatory copy
> -cm:orderPosition (string) mandatory copy
> -cm:default (boolean) mandatory copy
> +* (cm:languageLabelNode) = cm:languageLabelNode
> copy
>
> [cm:keywordNode] > cm:entityNode
> +* (cm:keywordEntryNode) = cm:keywordEntryNode
> copy
>
> [cm:keywordsNode] > nt:base
> +* (cm:keywordNode) = cm:keywordNode
> copy
>
> When creating new "keywordEntryNode" and setting the "orderPosition"
> property, I keep gettting error complaining that "no matching property
> definition found" for the "orderPosition" property of nodeType
> "cm:keywordEntryNode".
>
> Then I used the following code to list all declared property definitions,
> the result doesn't contain my property definition for "cm:orderPosition"
> either.
>
> PropertyDefinition[] pdf =
> node.getPrimaryNodeType().getDeclaredPropertyDefinitions();
> for (int i=0;i<pdf.length;i++){
> logger.debug("** pdf " + i + " - " + pdf[i].getName() );
> String[] ss = pdf[i].getValueConstraints();
> for(int j=0;j<ss.length;j++){
> logger.debug(" --- " + ss[j]);
> }
> }
>
>
> Could anyone advise on what have I missed? Thanks in advance.
>
> D.
>
> _________________________________________________________________
> Play Q6 for your chance to WIN great prizes.
> http://q6trivia.imagine-live.com/enca/landing
>
>
--
-----------------------------------------< tobias.bocanegra@day.com >---
Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
T +41 61 226 98 98, F +41 61 226 98 97
-----------------------------------------------< http://www.day.com >---