cancel
Showing results for 
Search instead for 
Did you mean: 

Workflow deployment failed

shea
Champ in-the-making
Champ in-the-making
Hi,

Sorry I have to post this question again.  I don't seem to get anyone to answer my question about this error.
I am trying to run the command line import using Alfresco 3.2, and received the Workflow deployment failed error.
alfresco/workflow/workflowModel.xml looks good.
It seems that it is a bug in the system.
Is there a way to turn off the "workflow deployment"?

Below is the detailed error that I received.
Any idea that I can avoid this exception?

Thanks


01160003 Workflow deployment failed
org.alfresco.error.AlfrescoRuntimeException: 01160003 Workflow deployment failed
at org.alfresco.repo.workflow.WorkflowDeployer.init(WorkflowDeployer.java:336)
at org.alfresco.repo.workflow.WorkflowDeployer$1.doWork(WorkflowDeployer.java:443)
at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:514)
at org.alfresco.repo.workflow.WorkflowDeployer.onBootstrap(WorkflowDeployer.java:439)
at org.alfresco.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:62)
at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:77)
at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:75)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:246)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:617)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:355)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:122)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:76)
at org.alfresco.util.ApplicationContextHelper.getApplicationContext(ApplicationContextHelper.java:83)
at org.alfresco.util.ApplicationContextHelper.getApplicationContext(ApplicationContextHelper.java:57)
at org.alfresco.tools.Tool.initialiseRepository(Tool.java:246)
at org.alfresco.tools.Tool.start(Tool.java:212)
at org.alfresco.tools.Import.main(Import.java:66)
Caused by: org.alfresco.service.cmr.dictionary.DictionaryException: 01160002 Could not import bootstrap model alfresco/workflow/workflowModel.xml
at org.alfresco.repo.dictionary.DictionaryBootstrap.onDictionaryInit(DictionaryBootstrap.java:151)
at org.alfresco.repo.dictionary.DictionaryBootstrap.bootstrap(DictionaryBootstrap.java:108)
at org.alfresco.repo.workflow.WorkflowDeployer.init(WorkflowDeployer.java:266)
… 17 more
Caused by: org.alfresco.service.cmr.dictionary.DictionaryException: 01160001 Failed to compile model wf:workflowmodel
at org.alfresco.repo.dictionary.CompiledModel.<init>(CompiledModel.java:112)
at org.alfresco.repo.dictionary.M2Model.compile(M2Model.java:134)
at org.alfresco.repo.dictionary.DictionaryDAOImpl.putModel(DictionaryDAOImpl.java:274)
at org.alfresco.repo.dictionary.DictionaryBootstrap.onDictionaryInit(DictionaryBootstrap.java:147)
… 19 more
Caused by: org.alfresco.service.cmr.repository.ContentIOException: 01160000 Failed to open stream onto channel:
accessor: ContentAccessor[ contentUrl=store://2010/2/12/16/12/3364887b-7314-4edd-99ae-e466ca4850d7.bin, mimetype=text/xml, size=0, encoding=utf-8, locale=en_US]
at org.alfresco.repo.content.AbstractContentReader.getContentInputStream(AbstractContentReader.java:338)
at org.alfresco.repo.dictionary.DictionaryRepositoryBootstrap.createM2Model(DictionaryRepositoryBootstrap.java:422)
at org.alfresco.repo.dictionary.DictionaryRepositoryBootstrap.onDictionaryInit(DictionaryRepositoryBootstrap.java:248)
at org.alfresco.repo.dictionary.DictionaryDAOImpl.initDictionaryRegistry(DictionaryDAOImpl.java:254)
at org.alfresco.repo.dictionary.DictionaryDAOImpl.access$100(DictionaryDAOImpl.java:66)
at org.alfresco.repo.dictionary.DictionaryDAOImpl$1.doWork(DictionaryDAOImpl.java:196)
at org.alfresco.repo.dictionary.DictionaryDAOImpl$1.doWork(DictionaryDAOImpl.java:189)
at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:514)
at org.alfresco.repo.dictionary.DictionaryDAOImpl.initDictionary(DictionaryDAOImpl.java:187)
at org.alfresco.repo.dictionary.DictionaryDAOImpl.init(DictionaryDAOImpl.java:135)
at org.alfresco.repo.dictionary.NamespaceDAOImpl.reset(NamespaceDAOImpl.java:125)
at org.alfresco.repo.dictionary.NamespaceDAOImpl.getNamespaceRegistry(NamespaceDAOImpl.java:424)
at org.alfresco.repo.dictionary.NamespaceDAOImpl.getUrisCtx(NamespaceDAOImpl.java:530)
at org.alfresco.repo.dictionary.NamespaceDAOImpl.getUrisCtx(NamespaceDAOImpl.java:519)
at org.alfresco.repo.dictionary.NamespaceDAOImpl.getURIs(NamespaceDAOImpl.java:201)
at org.alfresco.repo.dictionary.CompiledModel.createLocalPrefixResolver(CompiledModel.java:199)
at org.alfresco.repo.dictionary.CompiledModel.constructDefinitions(CompiledModel.java:134)
at org.alfresco.repo.dictionary.CompiledModel.<init>(CompiledModel.java:94)
… 22 more
Caused by: java.lang.UnsupportedOperationException: The content never exists
at org.alfresco.repo.content.EmptyContentReader.getDirectReadableChannel(EmptyContentReader.java:59)
at org.alfresco.repo.content.AbstractContentReader.getReadableChannel(AbstractContentReader.java:227)
at org.alfresco.repo.content.AbstractContentReader.getContentInputStream(AbstractContentReader.java:331)
… 39 more
8 REPLIES 8

rudyanto
Champ in-the-making
Champ in-the-making
Could you show the Content Models and the Task Models?

It is obvious that you have an invalid Content Model or Task Model because the error show the following:
Failed to compile model wf:workflowmodel

Best Regards,
Rudyanto

shea
Champ in-the-making
Champ in-the-making
Hi,

Below is the content of the workflowModel.xml that came with Alfresco 3.2 software.  I did not change any of it.  Do you know a way to avoid this exception?  workflowModel.xml is referenced in the bootstrap-context.xml.

<?xml version="1.0" encoding="UTF-8"?>

<model name="wf:workflowmodel" 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/bpm/1.0" prefix="bpm"/>
   </imports>

   <namespaces>
      <namespace uri="http://www.alfresco.org/model/workflow/1.0" prefix="wf"/>
   </namespaces>
     
   <types>

      <!–                               –>
      <!–  Basic Review & Approve Tasks –>              
      <!–                               –>
     
      <type name="wf:submitReviewTask">
         <parent>bpm:startTask</parent>
         <mandatory-aspects>
            <aspect>bpm:assignee</aspect>
         </mandatory-aspects>
      </type>

      <type name="wf:submitConcurrentReviewTask">
         <parent>bpm:startTask</parent>
         <properties>
            <property name="wf:requiredApprovePercent">
                <type>d:int</type>
                <mandatory>true</mandatory>
                <default>50</default>
                <constraints>
                    <constraint type="MINMAX">
                        <parameter name="minValue"><value>1</value></parameter>
                        <parameter name="maxValue"><value>100</value></parameter>
                    </constraint>
                </constraints>
            </property>
         </properties>
      </type>

      <!–  Submit review to multiple people (explicit list) –>
      <type name="wf:submitParallelReviewTask">
         <parent>wf:submitConcurrentReviewTask</parent>
         <mandatory-aspects>
            <aspect>bpm:assignees</aspect>
         </mandatory-aspects>
      </type>

      <!–  Submit review to multiple people (as included in a group) –>
      <type name="wf:submitGroupReviewTask">
         <parent>wf:submitConcurrentReviewTask</parent>
         <mandatory-aspects>
            <aspect>bpm:groupAssignee</aspect>
         </mandatory-aspects>
      </type>

      <type name="wf:reviewTask">
         <parent>bpm:workflowTask</parent>
         <overrides>
            <property name="bpmSmiley TongueackageItemActionGroup">
               <default>edit_package_item_actions</default>
            </property>
         </overrides>
      </type>

      <type name="wf:approvedTask">
         <parent>bpm:workflowTask</parent>
         <mandatory-aspects>
            <aspect>bpm:assignee</aspect>
         </mandatory-aspects>
      </type>

      <type name="wf:rejectedTask">
         <parent>bpm:workflowTask</parent>
         <mandatory-aspects>
            <aspect>bpm:assignee</aspect>
         </mandatory-aspects>
      </type>

      <type name="wf:rejectedParallelTask">
         <parent>bpm:workflowTask</parent>
         <mandatory-aspects>
            <aspect>wfSmiley TonguearallelReviewStats</aspect>
         </mandatory-aspects>
      </type>

      <type name="wf:approvedParallelTask">
         <parent>bpm:workflowTask</parent>
         <mandatory-aspects>
            <aspect>wfSmiley TonguearallelReviewStats</aspect>
         </mandatory-aspects>
      </type>


      <!–                               –>
      <!–  Adhoc Tasks –>              
      <!–                               –>
     
      <type name="wf:submitAdhocTask">
         <parent>bpm:startTask</parent>
         <properties>
            <property name="wf:notifyMe">
               <type>d:boolean</type>
               <default>false</default>
            </property>
         </properties>
         <mandatory-aspects>
            <aspect>bpm:assignee</aspect>
         </mandatory-aspects>
      </type>

      <type name="wf:adhocTask">
         <parent>bpm:workflowTask</parent>
         <overrides>
            <property name="bpmSmiley TongueackageActionGroup">
               <default>add_package_item_actions</default>
            </property>
            <property name="bpmSmiley TongueackageItemActionGroup">
               <default>edit_package_item_actions</default>
            </property>
         </overrides>
      </type>

      <type name="wf:completedAdhocTask">
         <parent>bpm:workflowTask</parent>
         <mandatory-aspects>
            <aspect>bpm:assignee</aspect>
         </mandatory-aspects>
      </type>

   </types>
  
   <aspects>
  
      <aspect name="wfSmiley TonguearallelReviewStats">
         <properties>
            <property name="wf:reviewerCount">
               <type>d:int</type>
            </property>
            <property name="wf:requiredPercent">
               <type>d:int</type>
            </property>
            <property name="wf:approveCount">
               <type>d:int</type>
            </property>
            <property name="wf:actualPercent">
               <type>d:int</type>
            </property>
         </properties>
      </aspect>
  
   </aspects>

</model>

jdbrown
Champ in-the-making
Champ in-the-making
FYI - Also seeing this exact issue in the latest 3.2.0r2CE build as well.  Unchanged worklfowModel.  Looking into…

shea
Champ in-the-making
Champ in-the-making
Hi jdbrown,

Do you know how to get around this exception?
I was hoping to use command line import tool to upload thousands of documents/files into Alfresco Repository using ACP file(s).
Currently, I have no plan to use workflow while uploading these files.

Thanks

jdbrown
Champ in-the-making
Champ in-the-making
I was able to get import to run by temporarily modifying the offending file, doing the import, and then flipping the file back to the original provided once the import ran.

I copied the existing workflowModel.xml to workflowModel.xml.original and then edited workflowModel.xml to be as follows just to get it to work.

<model name="wf:workflowmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
   <imports>
      <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
   </imports>
   <namespaces>
      <namespace uri="http://www.alfresco.org/model/workflow/1.0" prefix="wf"/>
   </namespaces>
   <types>
      <type name="wf:submitReviewTask">
         <properties>
            <property name="wf:madeup">
               <type>d:text</type>
            </property>
            </properties>
      </type>
    </types>
</model>

shea
Champ in-the-making
Champ in-the-making
Hi Jdbrown,

Appreciated very much for all your help.  I have tried your suggestion, and did not get it to work, I've also removed the <d:type> from your example, and still received exceptions.  I've tried removing most of the content from this workflowModel.xml, and still got errors.  I have not given up playing with this xml file yet, and now wondering if there is a special character somewhere in the file that has caused the errors to occur.  

Could you please let me know which version of Alfresco that you have made it to work, and what OS?    I am using Alfersco 3.2.0 on Sun Solaris, and wondering whether I need to upgrade Alfresco to 3.2r2.   

Thanks and greatly appreciated!

The errors that I received are:

        at org.alfresco.util.ApplicationContextHelper.getApplicationContext(ApplicationContextHelper.java:57)
        at org.alfresco.tools.Tool.initialiseRepository(Tool.java:246)
        at org.alfresco.tools.Tool.start(Tool.java:212)
        at org.alfresco.tools.Import.main(Import.java:66)
Caused by: org.alfresco.service.cmr.dictionary.DictionaryException: 01180001 Could not import bootstrap model alfresco/workflow/workflowModel.xml
        at org.alfresco.repo.dictionary.DictionaryBootstrap.onDictionaryInit(DictionaryBootstrap.java:151)
        at org.alfresco.repo.dictionary.DictionaryBootstrap.bootstrap(DictionaryBootstrap.java:108)
        at org.alfresco.repo.workflow.WorkflowDeployer.init(WorkflowDeployer.java:266)
        … 17 more
Caused by: org.alfresco.service.cmr.dictionary.DictionaryException: 01180000 Failed to parse model
        at org.alfresco.repo.dictionary.M2Model.createModel(M2Model.java:99)
        at org.alfresco.repo.dictionary.DictionaryBootstrap.onDictionaryInit(DictionaryBootstrap.java:146)
        … 19 more
Caused by: org.jibx.runtime.JiBXException: Expected "{http://www.alfresco.org/model/dictionary/1.0}type" start tag, found "{http://www.alfresco.org/model/dictionary/1.0}property" end tag (line 12, col 12)
        at org.jibx.runtime.impl.UnmarshallingContext.matchStart(UnmarshallingContext.java:716)

or

       at org.alfresco.util.ApplicationContextHelper.getApplicationContext(ApplicationContextHelper.java:57)
       at org.alfresco.tools.Tool.initialiseRepository(Tool.java:246)
       at org.alfresco.tools.Tool.start(Tool.java:212)
       at org.alfresco.tools.Import.main(Import.java:66)
aused by: org.alfresco.service.cmr.dictionary.DictionaryException: 01180002 Could not import bootstrap model alfresco/workflow/workflowModel.xml
       at org.alfresco.repo.dictionary.DictionaryBootstrap.onDictionaryInit(DictionaryBootstrap.java:151)
       at org.alfresco.repo.dictionary.DictionaryBootstrap.bootstrap(DictionaryBootstrap.java:108)
       at org.alfresco.repo.workflow.WorkflowDeployer.init(WorkflowDeployer.java:266)
       … 17 more
aused by: org.alfresco.service.cmr.dictionary.DictionaryException: 01180001 Failed to compile model wf:workflowmodel
       at org.alfresco.repo.dictionary.CompiledModel.<init>(CompiledModel.java:112)
       at org.alfresco.repo.dictionary.M2Model.compile(M2Model.java:134)
       at org.alfresco.repo.dictionary.DictionaryDAOImpl.putModel(DictionaryDAOImpl.java:274)
       at org.alfresco.repo.dictionary.DictionaryBootstrap.onDictionaryInit(DictionaryBootstrap.java:147)
       … 19 more
aused by: org.alfresco.service.cmr.repository.ContentIOException: 01180000 Failed to open stream onto channel:
  accessor: ContentAccessor[ contentUrl=store://2010/2/12/16/12/3364887b-7314-4edd-99ae-e466ca4850d7.bin, mimetype=text/xml, size=0, encoding=utf-8, locale=en_US]
       at org.alfresco.repo.content.AbstractContentReader.getContentInputStream(AbstractContentReader.java:338)
       at org.alfresco.repo.dictionary.DictionaryRepositoryBootstrap.createM2Model(DictionaryRepositoryBootstrap.java:422)
       at org.alfresco.repo.dictionary.DictionaryRepositoryBootstrap.onDictionaryInit(DictionaryRepositoryBootstrap.java:248)
       at org.alfresco.repo.dictionary.DictionaryDAOImpl.initDictionaryRegistry(DictionaryDAOImpl.java:254)
       at org.alfresco.repo.dictionary.DictionaryDAOImpl.access$100(DictionaryDAOImpl.java:66)
       at org.alfresco.repo.dictionary.DictionaryDAOImpl$1.doWork(DictionaryDAOImpl.java:196)

jdbrown
Champ in-the-making
Champ in-the-making
I used the exact file posted above with Alf3.2r2 Community.

shea
Champ in-the-making
Champ in-the-making
Thanks again jdbrown!

I've checked out the source code yesterday, and hope it will help me to debug my issue.
My eclipse project has not been setup properly yet.

My last question is the usage of -s[store] and -path for the command line import.
I am new to Alfresco, and the documentation was not that clear to me.

If I have a space under "User Homes" named "testImport", could you please let me know whether the following is correct:
java -cp "someClassPath"  -user admin -pwd somePassword -s workspace://userhome /testImport xyz.acp

Could you please correct me if it is wrong?

Thanks