cancel
Showing results for 
Search instead for 
Did you mean: 

WCM 2.0 data model not compatible with JCR

gr1zz_lee
Champ in-the-making
Champ in-the-making
I just installed the WCM 2.0 Preview and configured the JCR-RMI extension. I have a node browser application that connects over RMI to the alfresco repository. This application worked fine with the WCM 1.4 preview.

I have the following problem when I try to get the string value of the cm:description or cm:title properties of a node. All other properties do not have this problem.

javax.jcr.RepositoryException: Cannot map Alfresco data type {http://www.alfresco.org/model/dictionary/1.0}mltext to JCR property type.
   at org.apache.jackrabbit.rmi.server.ServerObject.getRepositoryException(ServerObject.java:136)
   at org.apache.jackrabbit.rmi.server.ServerProperty.getValue(ServerProperty.java:63)
   at sun.reflect.GeneratedMethodAccessor148.invoke(Unknown Source)
   …..

Is something changed in the WCM 2.0 data model that can cause this?
The error tells me that Alfresco data types are mapped to JCR property types. Can somebody explain?
3 REPLIES 3

gr1zz_lee
Champ in-the-making
Champ in-the-making
I found the following workaround by changing the types of the cm:titled aspect in in contentModel.xml from d:mltext to d:text.
      <aspect name="cm:titled">
         <title>Titled</title>
         <properties>
            <property name="cm:title">
               <title>Title</title>
               <type>d:text</type>
            </property>
            <property name="cm:description">
               <title>Description</title>
               <type>d:text</type>
            </property>
         </properties>
      </aspect>
But the contentModel.xml normally should not be edited.
What is the difference between d:mltext and d:text?

davidc
Star Contributor
Star Contributor
d:mltext is a new data type for supporting multi-lingual text i.e. storage and retrieval of locale specific values for a given property.

So, it's not anything to do with WCM.

It looks like a bug in the JCR layer which is not yet sensitive to d:mltext.

The workaround for now is as you have it.

davidc
Star Contributor
Star Contributor
This has been fixed for 2.0 final.