Content model failled when dynamic deploying

cancel
Showing results for 
Search instead for 
Did you mean: 
nabil_malloul
Active Member

Content model failled when dynamic deploying

Jump to solution

Hello;

I have this contentModel file

<?xml version="1.0" encoding="UTF-8"?> <model name="swTl:TresCompletModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">     
<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"/>                  <import uri="http://www.alfresco.org/model/bpm/1.0" prefix="bpm"/>     </imports>          

<namespaces>                 
<namespace uri="starxpert.TresCompletModel.fr" prefix="swTl"/>       </namespaces>              

<types>            
   <type name="swTl:debut">                     <parent>bpm:activitiOutcomeTask</parent>                          <properties>                             
              <property name="swTl:dateDebut">                                                            <title>Date de debut de vaccances</title>                                               <type>d:date</type>                                                                                 <mandatory>true</mandatory>        
              </property>                             
              <property name="swTl:dateFin">                                                     <title>Date fin de vaccances</title>                                                      <type>d:date</type>                                                        <mandatory>true</mandatory>                              
              </property>
           </type>         
</types>

<model>

I tried to dynamically deploy this model, by moving this file into models repository, but when i set the model active property to true i still getting this error in logs:

2017-08-29 18:13:57,528  ERROR [extensions.webscripts.AbstractRuntime] [http-bio-8080-exec-29] Exception from executeScript: 07290005 Failed to parse model
 org.alfresco.service.cmr.dictionary.DictionaryException: 07290005 Failed to parse model
  
Caused by: org.jibx.runtime.JiBXException: Expected "{http://www.alfresco.org/model/dictionary/1.0}model" end tag, found "{http://www.alfresco.org/model/dictionary/1.0}model" start tag (line 80, col 61)
    at org.jibx.runtime.impl.UnmarshallingContext.parsePastCurrentEndTag(UnmarshallingContext.java:731)
    at org.alfresco.repo.dictionary.JiBX_defaultM2Model_access.unmarshal()
    at org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(UnmarshallingContext.java:2757)
    at org.jibx.runtime.impl.UnmarshallingContext.unmarshalDocument(UnmarshallingContext.java:2900)
    at org.alfresco.repo.dictionary.M2Model.createModel(M2Model.java:108)
    ... 44 more

Is there anybody who did this before ? Thanks for any hlep.

1 Solution

Accepted Solutions
douglascrp
Advanced II

Re: Content model failled when dynamic deploying

Jump to solution

Replace the last <model> tag with a </model>.

View solution in original post

4 Replies
afaust
Master

Re: Content model failled when dynamic deploying

Jump to solution

You seem to be missing the

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

attribute + value in the model XML element.

douglascrp
Advanced II

Re: Content model failled when dynamic deploying

Jump to solution

Replace the last <model> tag with a </model>.

nabil_malloul
Active Member

Re: Content model failled when dynamic deploying

Jump to solution

Yes, i just added </model> in the end of the file and it works fine

afaust
Master

Re: Content model failled when dynamic deploying

Jump to solution

Man, I was looking multiple times up and down that XML and did not spot that...