cancel
Showing results for 
Search instead for 
Did you mean: 

Failed to parse model

knightrider
Champ on-the-rise
Champ on-the-rise
Hi!
I'm new to Alfresco and i'm facing a problem with content modeling and solr.
I'm using Alfresco 4.2.f.

We have set up an alfresco production environments, defined a custom model using an amp file to add some metadata (see below of the custom content model file). We started to successfully upload files with metadata using the REST API, and we were able to retrieve those file through a custom application using the REST API as well. Last weekend, we decided to use the bulkfsimport to import 390Go of files. Unfortunately, during the process, we encountered an hardware failure and our alfresco server was shut down.

We were able to restart it but we now have a problem with solr. We get the following log in catalina.out when we start the alfresco service:

INFO: Déploiement du descripteur de configuration /opt/alfresco-4.2.f/tomcat/conf/Catalina/localhost/solr.xml
2015-07-20 17:30:54,822  ERROR [util.plugin.AbstractPluginLoader] [localhost-startStop-1] org.alfresco.service.cmr.dictionary.DictionaryException: 06200000 Failed to parse model
        at org.alfresco.repo.dictionary.M2Model.createModel(M2Model.java:102)
        at org.alfresco.repo.dictionary.M2Model.createModel(M2Model.java:88)
        at org.alfresco.solr.AlfrescoDataType.init(AlfrescoDataType.java:140)
        at org.apache.solr.schema.FieldType.setArgs(FieldType.java:117)
        at org.apache.solr.schema.IndexSchema$1.init(IndexSchema.java:443)
        at org.apache.solr.schema.IndexSchema$1.init(IndexSchema.java:414)
        at org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:176)
        at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:456)
        at org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:95)
        at org.apache.solr.core.CoreContainer.create(CoreContainer.java:426)
        at org.apache.solr.core.CoreContainer.load(CoreContainer.java:278)
        at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:117)
        at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:83)
        at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
        at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
        at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
        at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4809)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5485)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:670)
        at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1839)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:724)
Caused by: org.jibx.runtime.JiBXException: Error parsing document (line 1, col 1)
        at org.jibx.runtime.impl.StAXReaderWrapper.next(StAXReaderWrapper.java:302)
        at org.jibx.runtime.impl.UnmarshallingContext.toStart(UnmarshallingContext.java:446)
        at org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(UnmarshallingContext.java:2750)
        at org.jibx.runtime.impl.UnmarshallingContext.unmarshalDocument(UnmarshallingContext.java:2900)
        at org.alfresco.repo.dictionary.M2Model.createModel(M2Model.java:97)


And in the solr.xml

ERROR [org.apache.solr.util.plugin.AbstractPluginLoader] org.alfresco.service.cmr.dictionary.DictionaryException: 06200000 Failed to parse model
        at org.alfresco.repo.dictionary.M2Model.createModel(M2Model.java:102)
        at org.alfresco.repo.dictionary.M2Model.createModel(M2Model.java:88)
        at org.alfresco.solr.AlfrescoDataType.init(AlfrescoDataType.java:140)
        at org.apache.solr.schema.FieldType.setArgs(FieldType.java:117)
        at org.apache.solr.schema.IndexSchema$1.init(IndexSchema.java:443)
        at org.apache.solr.schema.IndexSchema$1.init(IndexSchema.java:414)
        at org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:176)
        at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:456)
        at org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:95)
        at org.apache.solr.core.CoreContainer.create(CoreContainer.java:426)
        at org.apache.solr.core.CoreContainer.load(CoreContainer.java:278)
        at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:117)
        at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:83)
        at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
        at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
        at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
        at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4809)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5485)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:670)
        at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1839)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:724)


Here is the custom model file:

<?xml version="1.0" encoding="UTF-8"?>
<!– xsi:schemaLocation="http://www.alfresco.org/model/dictionary/1.0 modelSchema.xsd" –>

<model name="oda:contentmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
   <description>ODA Content Model</description>
   <author>Atef ZAYATI</author>
   <version>1.0</version>

   <imports>
      <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
      <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
   </imports>

   <namespaces>
           <namespace uri="http://www.avocatparis.org/model/content/1.0" prefix="oda"/>
   </namespaces>

   <types>
                <type name="oda:content">
                        <title>Document</title>
                        <parent>cm:content</parent>
                        <properties>
                                <property name="oda:application">
                                        <title>Application</title>
                                        <type>d:text</type>
                                        <mandatory>true</mandatory>
                                </property>
                        </properties>

                        <associations>
                        </associations>

                        <mandatory-aspects>
                                <aspect>oda:identifiable</aspect>
                        </mandatory-aspects>
                </type>

                <type name="oda:folder">
                        <title>Dossier</title>
                        <parent>cm:folder</parent>
                        <properties>
                        </properties>

                        <associations>
                        </associations>

                        <mandatory-aspects>
                                <aspect>oda:identifiable</aspect>
                        </mandatory-aspects>
                </type>

                <type name="oda:carpamouvement">
                        <title>Mouvement CARPA</title>
                        <parent>cm:content</parent>
                        <properties>
                                <property name="oda:numsouscompte">
                                        <title>Sous Compte</title>
                                        <type>d:text</type>
                                        <mandatory>true</mandatory>
                                </property>
                                <property name="oda:numaffaire">
                                        <title>Affaire</title>
                                        <type>d:text</type>
                                        <mandatory>true</mandatory>
                                </property>
                                <property name="oda:numbordereau">
                                        <title>Bordereau</title>
                                        <type>d:int</type>
                                        <mandatory>true</mandatory>
                                </property>
                                <property name="oda:datemouvement">
                                        <title>Date Mouvement</title>
                                        <type>d:date</type>
                                        <mandatory>false</mandatory>
                                </property>
                                <property name="oda:typedocument">
                                        <title>Type Document</title>
                                        <type>d:text</type>
                                        <mandatory>false</mandatory>
                                </property>
                        </properties>
                </type>

        </types>

        <aspects>
                <aspect name="oda:identifiable">
                        <title>Identifiable</title>
                        <properties>
                                <property name="oda:identifiant">
                                        <title>Identifiant</title>
                                        <type>d:text</type>
                                        <mandatory>true</mandatory>
                                </property>
                        </properties>
                </aspect>
        </aspects>
</model>


I tried to use the custom content model file from our test environment without success. Is there anything else that could cause this error ? I don't really know in which direction to look right now.


Thanks in advance
3 REPLIES 3

knightrider
Champ on-the-rise
Champ on-the-rise
I tried to rebuild the solr indexes (by deleting the index and spellchecker folder in both spacestores). I still get the same errors in the log files and the indexes doesn't get rebuilt.

rjohnson
Star Contributor
Star Contributor
You should also delete your model cache before an index rebuild… Given the error, it looks like a file in the models cache has become corrupted.

knightrider
Champ on-the-rise
Champ on-the-rise
In fact, the alfresco didn't try to rebuild the indexes. The directory index and spellchecker were not created. But i was a problem of modelscache. The files corresponding to my custome model contained in solr/workspace-SpaceStore/AlfrescoModels and solr/archive-SpaceStore/AlfrescoModels were empty. I updated the content of both files with the ones from my TEST environment and it worked. Thanks Bob