cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Content Model type error

amcd
Champ in-the-making
Champ in-the-making
I'm working with the Kofax CMIS export connector (provided by Kofax) that's built on the dotCMIS library and have a few issues that I'm running into. The main issue being, a specific server exception is thrown when I try to import documents under a dynamic custom model of my devise (see attached):

Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/cmis/queries.post.cmisquery.js': 07140448 Invalid column for cmis:document.tcm:year


I'm not sure if it may be related but there is a warning prior in the alfresco.log, assumingly from when I last modified the custom content model:

WARN  [org.alfresco.repo.dictionary.DictionaryDAO] org.alfresco.service.cmr.dictionary.DictionaryException: 07140431 Model '{http://www.thecompanieswebsite.com/model/TheCustomModel/1.0}TheCustomModel' does not exist


Question:  Has anyone ran into these issues when importing custom content types with a dynamic custom model? I'm not sure if this is a problem related to my custom model or rooted in something else?
5 REPLIES 5

kaynezhang
World-Class Innovator
World-Class Innovator
It seems that your model is not correctly deployed,see this error
07140431 Model '{http://www.thecompanieswebsite.com/model/TheCustomModel/1.0}TheCustomModel' does not exist
,please try to redeploy your model.

amcd
Champ in-the-making
Champ in-the-making
Thank you kaynezhang.  My assumption is that since the Custom Model is dynamic it simply needs to be made active to be deployed.  Do you or anyone else know if that is the case or is there further configuration required for a dynamic deployment?

kaynezhang
World-Class Innovator
World-Class Innovator
If your content model is legal and mark it active after deployed ,there is no need  further configuration required.

amcd
Champ in-the-making
Champ in-the-making
Thank you for the clarification kaynezhang.  I was able to resolve this issue.  As reference for anyone who may encounter, here's the root cause:

I was using a legacy AtomPub URL with the Kofax-supplied CMIS Connector.  In order to get it to work with the AtomPub feed for Alfresco Community 4.2.e and on (http://{server}:{port}/alfresco/api/-default-/public/cmis/versions/1.0/atom), we had to apply patches to the dotCMIS code that would handle the null value for <cmis:repositoryID> and "-defualt-" value for xml element <cmis:repositoryName>.  Though this is a Kofax application, I believe that the issue lies in the dotCMIS library.

amcd
Champ in-the-making
Champ in-the-making
Here's some sample code for the patch:  (credit goes to dhartford though)  Nice work!

Modification to the DotCMIS.binding.Converter.cs

       public static IRepositoryInfo Convert(cmisRepositoryInfoType repositotyInfo)
        {
            if (repositotyInfo == null)
            {
                return null;
            }

            RepositoryInfo result = new RepositoryInfo();
            result.Id = repositotyInfo.repositoryId;

            //No name when using Alfresco 4.2.f and alfresco/api/-default-/public/cmis/versions/1.0/atom service
            if (String.IsNullOrEmpty(repositotyInfo.repositoryName))
            {
                result.Name = "Main Repository";
            }
            else
            {
                result.Name = repositotyInfo.repositoryName;
            }


            result.Description = repositotyInfo.repositoryDescription;
            result.VendorName = repositotyInfo.vendorName;
            result.ProductName = repositotyInfo.productName;
            result.ProductVersion = repositotyInfo.productVersion;


            //Alfresco 4.2.f and alfresco/api/-default-/public/cmis/versions/1.0/atom service, the current Kofax CMIS connector still expects the workspace prefix.
           //inspiration source: http://ecmarchitect.com/archives/2013/09/15/3554
            if (result.ProductName.Equals("alfresco community", StringComparison.InvariantCultureIgnoreCase)
                && result.ProductVersion.StartsWith("4.2"))
            {
                //need to also check if using alfresco/api/-default-/public/cmis/versions/1.0/atom versus legacy services, as this change is for new public api service only.
                result.RootFolderId = "workspace://SpacesStore/" + repositotyInfo.rootFolderId;
            }
            else
            {
                result.RootFolderId = repositotyInfo.rootFolderId;
            }