jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <aklim...@day.com>
Subject Re: ClientNodeTypeManager cannot be cast to JackrabbitNodeTypeManager
Date Mon, 16 Aug 2010 11:25:44 GMT
On Mon, Aug 16, 2010 at 13:11, Thomas Lustig <thomas@futuredesign.at> wrote:
> hi alex,
>
> If i am not able to register new nodes via RMI and also not via DavEx,
> whatelse could i do
> to register my new nodetypes directly on server?
>
> I also tried it with the XML file alternative:
> ----------------- my custom_nodetypes.xml in folder \repository\nodetypes
> -------------
> <nodeTypes xmlns:myns="my-namespace"
>         xmlns:nt="http://www.jcp.org/jcr/nt/1.0">
>
> <nodeType name="myns:javaobject"
>          isMixin="true" hasOrderableChildNodes="false" primaryItemName=""
>          isAbstract="false">
>  <supertypes>
>    <supertype>nt:base</supertype>
>  </supertypes>
>
>   <propertyDefinition name="myns:hibernateid"
>                      requiredType="String"
>                      autoCreated="false"
>                      mandatory="false"
>                      onParentVersion="COPY"
>                      protected="false"
>                      multiple="false"/>
>
>   <propertyDefinition name="myns:javaclass"
>                      requiredType="String"
>                      autoCreated="false"
>                      mandatory="false"
>                      onParentVersion="COPY"
>                      protected="false"
>                      multiple="false"/>
>
> </nodeType>
> </nodeTypes>
> -------------------------------------------------------------------------------------
> in Java i used it this way:
> ..........
> filenode.addMixin("myns:javaobject");
>           filenode.setProperty("myns:javaclass", myclass);
>           filenode.setProperty("myns:hibernateid", myuuid);
> .........
>
> Here everthing works fine until i restart the jackrabbit server. After this
> my new nodetypes are not
> accessible on old nodes, only on new created nodes.
>
> Is there any working alternative for me to register my nodetypes?
> Maybe programmatically or via Configuration files?

Programmatically on the server side. From an architectural point of
view I would do all repository administration related things
(including installation of node types) on the server itself.

If you have a lot of new node types for changing content structures
(ie. depending on usage of the system, not development), I'd consider
to become more (nt:)unstructured ;-)

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com

Mime
View raw message