jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Meschberger <fmesc...@gmail.com>
Subject Re: InvalidPersistentClassException : Node type: nt:unstructured has no descriptor.
Date Tue, 20 Nov 2007 11:18:36 GMT
Hi,

If I read your mapping file correctly, you seem to have no mapping for
the "nt:unstructured" node type. So OCM tries to get a discriminator
property. If no such property exists, OCM has no way of finding out what
object class to use for mapping the node. Hence the failed mapping.

Regards
Felix

Am Donnerstag, den 15.11.2007, 10:50 -0800 schrieb joshna138:
> I am using jackrabbit-ocm to create ,store and retrieve folders and
> documents.It was working fine .
> 
> But with the recent Nov 12th jackrabbit 1.4 SNAPSHOT jars it is not working
> .It throws the following error
> 
> InvalidPersistentClassException :  Node type: nt:unstructured has no
> descriptor.
> 
> The AbstractMapperImpl class' getClassDescriptorByNodeType(String
> jcrNodeType) is called and the
> mappingDescriptor.getClassDescriptorByNodeType(jcrNodeType); returns null.
> 
> 
> This is my mapping xml.
> 
> <?xml version="1.0" encoding="UTF-8"?>
> 
> <!--
>     Document   : mapping.xml
>     Created on : September 4, 2006, 4:24 PM
>     Author     : Owner
>     Description:
>         Purpose of the document follows.
> 
> <!DOCTYPE jackrabbit-ocm PUBLIC "-//The Apache Software Foundation//DTD
> Repository//EN" "/test/poc/CMS/PortalCMS/config/jackrabbit-ocm.dtd">
> -->
> <jackrabbit-ocm>
>   <class-descriptor
> className="com.sun.portal.cms.mirage.model.core.CMSObject"
> jcrNodeType="ps:cmsobject" discriminator="false" >
> <!-- Field-descriptor is used to map simple attributes to jcr property -->
>     <field-descriptor fieldName="path" path="true" />
>     <field-descriptor fieldName="creationDate" jcrName="jcr:created" />
>     <field-descriptor fieldName="description" jcrName="ps:description" />
>     <field-descriptor fieldName="creator" jcrName="ps:creator" />
>     <field-descriptor fieldName="name" jcrName="ps:name" id="true" />         
                                                                   
> </class-descriptor>  
>     
> 
> <class-descriptor className="com.sun.portal.cms.mirage.model.core.Content"
> jcrNodeType="ps:content"
> extend="com.sun.portal.cms.mirage.model.core.CMSObject"
> discriminator="false">                                                           
              
> </class-descriptor> 
> 
> 
> <class-descriptor className="com.sun.portal.cms.mirage.model.core.Folder"
> jcrNodeType="ps:folder"
> extend="com.sun.portal.cms.mirage.model.core.CMSObject"
> discriminator="false" >
> <!-- Field-descriptor is used to map simple attributes to jcr property -->
>     <field-descriptor fieldName="path" path="true" />
>     <collection-descriptor fieldName="readPermissions"
> jcrName="ps:readPermissions" 
> 		                       elementClassName="java.lang.String" 
> 		                      
> collectionConverter="org.apache.jackrabbit.ocm.manager.collectionconverter.impl.MultiValueCollectionConverterImpl"
> />
> 
>     <collection-descriptor fieldName="writePermissions"
> jcrName="ps:writePermissions" proxy="false" 
> 		                       elementClassName="java.lang.String" 
> 		                      
> collectionConverter="org.apache.jackrabbit.ocm.manager.collectionconverter.impl.MultiValueCollectionConverterImpl"
> />  
>     <collection-descriptor fieldName="children" 
> elementClassName="com.sun.portal.cms.mirage.model.core.CMSObject"
> autoUpdate="false" autoInsert="false"
> 		                      
> collectionConverter="org.apache.jackrabbit.ocm.manager.collectionconverter.impl.NTCollectionConverterImpl"
> />
> </class-descriptor>  
> 
> 
> <class-descriptor className="com.sun.portal.cms.dm.model.DocumentResource"
> jcrNodeType="ps:resource"  discriminator="false"> 
>     <field-descriptor fieldName="type" jcrName="jcr:mimeType"/>	
>     <field-descriptor fieldName="encoding" jcrName="jcr:encoding"/>	
>     <field-descriptor fieldName="data" jcrName="jcr:data"/>	
>     <field-descriptor fieldName="lastModified" jcrName="jcr:lastModified"/>
>  
> </class-descriptor> 
> 
> 
> <class-descriptor className="com.sun.portal.cms.dm.model.Document"
> jcrNodeType="ps:document"
> extend="com.sun.portal.cms.mirage.model.core.Content" discriminator="false">
> <!-- Field-descriptor is used to map simple attributes to jcr property -->
>     <field-descriptor fieldName="path" path="true" />
>     <field-descriptor fieldName="title" jcrName="ps:title" />
>     <field-descriptor fieldName="language" jcrName="ps:language" />
>     <field-descriptor fieldName="author" jcrName="ps:author" />
>     <field-descriptor fieldName="state" jcrName="ps:state" />
>     <field-descriptor fieldName="modifier" jcrName="ps:modifier" /> 
>     <field-descriptor fieldName="size" jcrName="ps:size" /> 
>     <field-descriptor fieldName="checkedOutBy" jcrName="ps:checkedOutBy" /> 
>     <field-descriptor fieldName="reviewComments" jcrName="ps:reviewComments"
> />
>     <field-descriptor fieldName="isCheckedOut" jcrName="jcr:isCheckedOut" />
>     <field-descriptor fieldName="lockOwner" jcrName="jcr:lockOwner" /> 
>     <field-descriptor fieldName="lockToken" jcrName="ps:lockToken" />
>     <bean-descriptor  fieldName="documentResource" 
> jcrName="ps:documentResource" jcrNodeType="ps:resource" />	 						  
>    <collection-descriptor fieldName="readPermissions"
> jcrName="ps:readPermissions" 
> 		                       elementClassName="java.lang.String" 
> 		                      
> collectionConverter="org.apache.jackrabbit.ocm.manager.collectionconverter.impl.MultiValueCollectionConverterImpl"
> />
> 
>     <collection-descriptor fieldName="writePermissions"
> jcrName="ps:writePermissions" proxy="false" 
> 		                       elementClassName="java.lang.String" 
> 		                      
> collectionConverter="org.apache.jackrabbit.ocm.manager.collectionconverter.impl.MultiValueCollectionConverterImpl"
> />
>     <collection-descriptor fieldName="keywords" jcrName="ps:keywords" 
> 		                       elementClassName="java.lang.String" 
> 		                      
> collectionConverter="org.apache.jackrabbit.ocm.manager.collectionconverter.impl.MultiValueCollectionConverterImpl"
> />
> 
>     <collection-descriptor fieldName="resources" jcrName="ps:resources"
> proxy="false" 
> 		                       elementClassName="java.lang.String" 
> 		                      
> collectionConverter="org.apache.jackrabbit.ocm.manager.collectionconverter.impl.MultiValueCollectionConverterImpl"
> />
>   
> </class-descriptor>     
> 
> 
> <class-descriptor className="com.sun.portal.cms.mirage.model.core.Link"
> jcrNodeType="ps:link" discriminator="false" >
> <!-- Field-descriptor is used to map simple attributes to jcr property -->
>     <field-descriptor fieldName="path" jcrName="ps:path"  />
>     <field-descriptor fieldName="url" jcrName="ps:url" />
> </class-descriptor> 
> 
> 
> </jackrabbit-ocm>
> 
> Regards,
> K.Joshna
> 


Mime
View raw message