profile - JCR node type nt:file is not allowed as child's node type for parent node type -


i add 1 "soc:music" (nt:file) child node (same original "soc:avatar" node) exoplatform profile entity, fails when store jcr. google error, seems little mentions it. know how fix it? thanks. weird thing original "soc:avatar" node works well.

<nodetype name="soc:profiledefinition" ismixin="false" hasorderablechildnodes="false"> ...   <childnodedefinition name="soc:avatar" defaultprimarytype="nt:file" autocreated="false" mandatory="false" onparentversion="copy" protected="false" samenamesiblings="false">     <requiredprimarytypes>       <requiredprimarytype>nt:file</requiredprimarytype>     </requiredprimarytypes>   </childnodedefinition>  ..   <childnodedefinition name="soc:music" defaultprimarytype="nt:file" autocreated="false" mandatory="false" onparentversion="copy" protected="false" samenamesiblings="false">     <requiredprimarytypes>       <requiredprimarytype>nt:file</requiredprimarytype>     </requiredprimarytypes>   </childnodedefinition> </childnodedefinitions> 

-----error message--

2013-07-23 10:58:27,401 | error | error during processaction phase [portal:uiportalapplication<http-nio-0.0.0.0-8080-exec-1>] org.chromattic.api.undeclaredrepositoryexception: javax.jcr.nodetype.constraintviolationexception: can't add node soc:music /production/soc:provid rs/soc:organization/soc:test1/soc:profile node type nt:file not allowed child's node type parent node type         @ org.chromattic.core.domainsession.persist(domainsession.java:470) ~[chromattic.core-1.2.1.jar:na]         @ org.chromattic.core.objectcontext.addchild(objectcontext.java:236) ~[chromattic.core-1.2.1.jar:na]         @ org.chromattic.core.mapper.onetoone.hierarchical.jcrnamedchildparentpropertymapper.set(jcrnamedchildparentpropertymapper.java:90) ~[chroma tic.core-1.2.1.jar:na]         @ org.chromattic.core.mapper.propertymapper$2.invoke(propertymapper.java:88) ~[chromattic.core-1.2.1.jar:na]         @ org.chromattic.core.objectcontext.invoke(objectcontext.java:74) ~[chromattic.core-1.2.1.jar:na]         @ org.exoplatform.social.core.chromattic.entity.profileentity_chromattic.setmusic(profileentity_chromattic.java:102) ~[social-component-core 4.0.0-snapshot.jar:4.0.0-snapshot]         @ org.exoplatform.social.core.storage.impl.identitystorageimpl._saveprofile(identitystorageimpl.java:621) ~[social-component-core-4.0.0-snap hot.jar:4.0.0-snapshot] 

be careful when changing nodetype definition this, may effects existing data in system. have think "migration" modification. we're using chromattic, therefore nodetype's definition must mapped java class. have changed soc:profiledefinition, therefore have added soc:music definition in profileentity.java (at package org.exoplatform.social.core.chromattic.entity).

hope helps, minh


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -