jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shanmugam Gopal" <haishanmu...@hotmail.com>
Subject FW: Custom Node Types XML
Date Thu, 24 Aug 2006 15:23:51 GMT
Hi,

Since I didn't get any response from users list, I am forwarding this mail 
to dev list. Pls execuse me.
Pls let me know what's the problem with the following code.

>I am trying to create a custom node by extending nt:resource so that I can 
>add some custom properties to that node.
>
>Following is the Custom_nodetypes.xml configuration.
>
><?xml version="1.0" encoding="UTF-8"?>
>
><nodeTypes xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
>xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:rep="internal"
>xmlns:sv="http://www.jcp.org/jcr/sv/1.0"
>xmlns:plateau="http://www.apache.org/jackrabbit/plateau"
>xmlns:mix="http://www.jcp.org/jcr/mix/1.0">
><nodeType name="plateau:resource" isMixin="false"
>hasOrderableChildNodes="false" primaryItemName="jcr:data">
>
>     <supertypes>
>
>             <supertype>nt:resource</supertype>
>
>     </supertypes>
>
>     <propertyDefinition name="plateau:username" requiredType="String"
>autoCreated="false" mandatory="false" onParentVersion="COPY"
>protected="false" multiple="false"/>
>
>     <propertyDefinition name="plateau:Author" requiredType="String"
>autoCreated="false" mandatory="false" onParentVersion="COPY"
>protected="false" multiple="false"/>
>
></nodeType>
></nodeTypes>
>
>But I am getting the Following ClassCastException while registering this 
>custom node.
>
>
>>java.lang.ClassCastException
>>
>>         at
>>org.apache.jackrabbit.core.util.DOMWalker.iterateElements(DOMWalker.java
>>:219)
>>
>>         at
>>org.apache.jackrabbit.core.nodetype.xml.NodeTypeReader.getNodeTypeDefs(N
>>odeTypeReader.java:118)
>>
>>         at
>>org.apache.jackrabbit.core.nodetype.xml.NodeTypeReader.read(NodeTypeRead
>>er.java:64)
>>
>>         at
>>org.apache.jackrabbit.core.nodetype.NodeTypeDefStore.load(NodeTypeDefSto
>>re.java:54)
>>
>>         at
>>org.apache.jackrabbit.core.nodetype.NodeTypeRegistry.loadCustomNodeTypeD
>>efs(NodeTypeRegistry.java:1681)
>>
>>         at
>>org.apache.jackrabbit.core.nodetype.NodeTypeRegistry.<init>(NodeTypeRegi
>>stry.java:210)
>>
>>         at
>>org.apache.jackrabbit.core.nodetype.NodeTypeRegistry.create(NodeTypeRegi
>>stry.java:123)
>>
>>         at
>>org.apache.jackrabbit.core.RepositoryImpl.createNodeTypeRegistry(Reposit
>>oryImpl.java:501)
>>
>>         at
>>org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:238
>>)
>>
>>         at
>>org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:514
>>)
>>
>>         at
>>org.apache.jackrabbit.j2ee.RepositoryStartupServlet.createRepository(Rep
>>ositoryStartupServlet.java:301)
>>
>>         at
>>org.apache.jackrabbit.j2ee.RepositoryStartupServlet.initRepository(Repos
>>itoryStartupServlet.java:272)
>>
>>         at
>>org.apache.jackrabbit.j2ee.RepositoryStartupServlet.init(RepositoryStart
>>upServlet.java:189)
>>
>>         at javax.servlet.GenericServlet.init(GenericServlet.java:211)
>
>
>
>Is there any wrong with the custom node definition ??
>
>Regards,
>Shanmugam G
>
>_________________________________________________________________
>Shah Rukh fan? Know all about the Baadshah of Bollywood. On MSN Search 
>http://server1.msn.co.in/profile/shahrukh.asp
>

_________________________________________________________________
Connect with your friends who use Yahoo! Messenger with Voice. Click! 
http://www.msnspecials.in/wlmyahoo/index.asp


Mime
View raw message