I tried to have my beahviour work… with no success. I googled it a lot and I think I have been precise about everything… So please help me!My content model is:
<namespaces>
<namespace uri="http://www.mycompany/model/rendition/1.0" prefix="rendition"/>
</namespaces>
<types>
<type name="rendition:rendition">
<title>Rendition Type</title>
<parent>mycompany:rendition</parent>
<mandatory-aspects>
<aspect>rendition:contentAndTemplate</aspect>
<aspect>system:identifier</aspect>
</mandatory-aspects>
</type>
and then I try to bind the behaviour using this:
this.policyComponent.bindClassBehaviour(NodeServicePolicies.OnCreateNodePolicy.QNAME,
QName.createQName(""http://www.mycompany/model/rendition/1.0"", "rendition"),
this.onCreateNode);
I get the following error:
Caused by: java.lang.IllegalArgumentException: Class http://www.mycompany/model/rendition/1.0}rendition:rendition has not been defined in the data dictionary
I tried various combinations like rendition instead of rendition:rendition… with no success. The content model fully works (it was already working before). I really don't know what's wrong.<strong>UPDATE:</strong>The above code and mapping are allright. The problem was that we were loading the content model dynamically after startup. Putting a depends-on="bootstrapbean"
in the context file that loads the policy manager will ensure that it is loaded after the content model.