cancel
Showing results for 
Search instead for 
Did you mean: 

Failed to compile model

subash
Champ in-the-making
Champ in-the-making
Hi,
I am using alfresco 3.3 version.
I am doing the custom workflow using the tutorial 'Packt publishing' alfresco development tutorial.
While creating the model  by enabling 'Model active option '   i am getting the following error.
————————————————————————————————————
Please correct the errors below then click OK.

    * A system error happened during the operation: 05160037 Failed to compile model global:model
—————————————————————————————————————-
My workflow xm l file is given below.
<?xml version="1.0" encoding="UTF-8"?>
<!– Definition of new Model –>
<model name="global:model"
xmlns="http://www.alfresco.org/model/dictionary/1.0">
<!– Optional meta-data about the model –>
<description>Someco Workflow Model</description>
<author>Optaros</author>
<version>1.0</version>
<!– Imports are required to allow references to
definitions in other models –>
<imports>
<import uri=
"http://www.alfresco.org/model/dictionary/1.0"
prefix="dz" />
<import uri="http://www.alfresco.org/model/bpm/1.0"
prefix="bpm" />
</imports>
<!– Introduction of new namespaces defined by this model –>
<namespaces>
<namespace uri="my.new.model"
prefix="global" />
</namespaces>
<types>
<type name="global:reviewTask">
<parent>bpm:startTask</parent>
<properties>
<property name="global:nurse_id">
<title>Nurse No.</title>
<type>d:int</type>
</property>
</properties>
</type>
</types>
</model>


Please tell me where the problem is.

Thanks in Advance
Subash
27 REPLIES 27

rajanigupta
Champ in-the-making
Champ in-the-making
hiii

I think you should go to  ur Alfresco folder;there you will get alfresco.log file.

open this file and you can view your error related to this exception .

Then share ur error….It will be helpful to you

Smiley Happy

subash
Champ in-the-making
Champ in-the-making
Hi,
  I am able to resolve that issue.
But after uploading model ,while deploying  using   the url http://localhost:8080/alfresco/faces/jsp/admin/repoadmin-console.jsp  by using the command
deploy model alfresco/extension/GlobalWorkflowModel.xml
i am getting the following exception ,Please let me know  how we can map the namespace.
Is it mandatory that we have to deploly the model like this ?
org.alfresco.service.cmr.dictionary.DictionaryException: 05170003 Failed to compile model my:mynewmodel
   at org.alfresco.repo.dictionary.CompiledModel.<init>(CompiledModel.java:106)
   at org.alfresco.repo.dictionary.M2Model.compile(M2Model.java:128)
   at org.alfresco.repo.dictionary.DictionaryModelType$DictionaryModelTypeTransactionListener$2.doWork(DictionaryModelType.java:608)
   at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:508)
   at org.alfresco.repo.dictionary.DictionaryModelType$DictionaryModelTypeTransactionListener.beforeCommit(DictionaryModelType.java:575)
   at org.alfresco.repo.transaction.AlfrescoTransactionSupport$TransactionSynchronizationImpl.doBeforeCommit(AlfrescoTransactionSupport.java:738)
   at org.alfresco.repo.transaction.AlfrescoTransactionSupport$TransactionSynchronizationImpl.doBeforeCommit(AlfrescoTransactionSupport.java:718)
   at org.alfresco.repo.transaction.AlfrescoTransactionSupport$TransactionSynchronizationImpl.beforeCommit(AlfrescoTransactionSupport.java:674)
   at org.springframework.transaction.support.TransactionSynchronizationUtils.triggerBeforeCommit(TransactionSynchronizationUtils.java:95)
   at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerBeforeCommit(AbstractPlatformTransactionManager.java:927)
   at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:737)
   at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723)
   at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:394)
   at org.alfresco.util.transaction.SpringAwareUserTransaction.commit(SpringAwareUserTransaction.java:472)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:343)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:228)
   at org.alfresco.repo.admin.BaseInterpreter$1.doWork(BaseInterpreter.java:158)
   at org.alfresco.repo.admin.BaseInterpreter$1.doWork(BaseInterpreter.java:149)
   at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:508)
   at org.alfresco.repo.admin.BaseInterpreter.interpretCommand(BaseInterpreter.java:147)
   at org.alfresco.web.bean.repository.admin.RepoAdminConsoleBean.interpretCommand(RepoAdminConsoleBean.java:184)
   at org.alfresco.web.bean.repository.admin.RepoAdminConsoleBean.submitCommand(RepoAdminConsoleBean.java:160)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
   at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:61)
   at javax.faces.component.UICommand.broadcast(UICommand.java:109)
   at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
   at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171)
   at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
   at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
   at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
   at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.alfresco.web.app.servlet.AdminAuthenticationFilter.doFilter(AdminAuthenticationFilter.java:76)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:104)
   at sun.reflect.GeneratedMethodAccessor451.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory$1.invoke(ChainingSubsystemProxyFactory.java:116)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at $Proxy205.doFilter(Unknown Source)
   at org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:82)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.alfresco.repo.web.filter.beans.NullFilter.doFilter(NullFilter.java:68)
   at sun.reflect.GeneratedMethodAccessor451.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory$1.invoke(ChainingSubsystemProxyFactory.java:116)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at $Proxy205.doFilter(Unknown Source)
   at org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:82)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
   at java.lang.Thread.run(Thread.java:619)
Caused by: org.alfresco.service.namespace.NamespaceException: Namespace prefix my is not mapped to a namespace URI
   at org.alfresco.service.namespace.QName.createQName(QName.java:101)
   at org.alfresco.service.namespace.QName.createQName(QName.java:123)
   at org.alfresco.repo.dictionary.M2ModelDefinition.<init>(M2ModelDefinition.java:41)
   at org.alfresco.repo.dictionary.CompiledModel.constructDefinitions(CompiledModel.java:131)
   at org.alfresco.repo.dictionary.CompiledModel.<init>(CompiledModel.java:88)
   … 71 more

subash
Champ in-the-making
Champ in-the-making
Hi,
I am able to deploy the workflowmodel file using the jsp/admin/repoadmin-console.jsp console.
   I am not able to view my newly deployed work flow in the choose workflow page.
It should come as 'Review , Approval of content & send email'.
In the Alfresco log file i am getting the following warnings.

11:08:10,114 WARN  [org.alfresco.repo.dictionary.DictionaryDAO] Type not found: {}submitReviewTask
11:08:10,114 WARN  [org.alfresco.repo.dictionary.DictionaryDAO] Type not found: {}submitReviewTask
11:08:10,130 WARN  [org.alfresco.repo.dictionary.DictionaryDAO] Type not found: {}reviewTask

Please help how we can debug this.

Thanks
Subash

rajanigupta
Champ in-the-making
Champ in-the-making
hii
I am not any expert…I am also new .well I think in ur workflow definition there is no
description about the action "submitReview" ?????

subash
Champ in-the-making
Champ in-the-making
Hi,

  This is my workflow xml file.I have already added the submitReview Task
———————–
<?xml version="1.0" encoding="UTF-8"?>
<!– Definition of new Model –>
<model name="global:model"
xmlns="http://www.alfresco.org/model/dictionary/1.0">
<!– Optional meta-data about the model –>
<description>Someco Workflow Model</description>
<author>Optaros</author>
<version>1.0</version>
<!– Imports are required to allow references to
definitions in other models –>
<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>
<!– Introduction of new namespaces defined by this model –>
<namespaces>
<namespace uri="my.new.model" prefix="global" />
</namespaces>
<types>
<type name="global:reviewTask">
<parent>bpm:startTask</parent>
<properties>
<property name="global:nurse_id">
<title>Nurse No.</title>
<type>d:int</type>
</property>
<property name="global:assignment_id">
<title>Assignment No</title>
<type>d:int</type>
</property>
<property name="global:nurse_name">
<title>Nurse Name</title>
<type>d:text</type>
</property>
<property name="global:is_birthcert">
<title>Birth Certification</title>
<type>d:boolean</type>
</property>
<property name="global:license_expiration_date">
<title>License Expiration Date</title>
<type>d:date</type>
</property>
<property name="global:is_driver_licence">
<title>Driver license</title>
<type>d:boolean</type>
</property>
<property name="global:wfDescription">
<type>d:text</type>
</property>
</properties>

</type>
<type name="global:submitReviewTask">
<parent>global:reviewTask</parent>
<overrides>
<property name="global:nurse_id">
</property>
<property name="global:assignment_id">
</property>
<property name="global:nurse_name">
</property>
<property name="global:is_birthcert">
</property>
<property name="global:license_expiration_date">
</property>
<property name="global:is_driver_licence">
</property>
<property name="global:wfDescription">
</property>
</overrides>
</type>
</types>
</model>
——————————————–
my process definiton file is
————
<?xml version="1.0" encoding="UTF-8"?>
<process-definition xmlns="urn:jbpm.org:jpdl-3.2" name="documentReview">
<swimlane name="initiator"></swimlane>
<swimlane name="assignee">
<assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
<actor>#{bpm_assignee}</actor>
</assignment>
</swimlane>
<start-state name="start">
<task name="reviewTask" swimlane="initiator" />
<transition name="" to="startreview"/>
</start-state>
<node name="startreview" >
<transition name="review" to="review" >
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
</script>
</action>
</transition>
</node>
<task-node name="review">
<task name="submitReviewTask" swimlane="assignee">
</task>
<transition name="Reject" to="end" >
</transition>
</task-node>
<end-state name="end"/> </process-definition>
———————————————

rajanigupta
Champ in-the-making
Champ in-the-making
hiiii
Let me know have you deployed ur workflow definition?

Because it must be done to use any customized workflow.

for deployment login as admin then go to the " http://<server-name>:<port>/alfresco/faces/jsp/admin/workflow-console.jsp"

then enter the command deploy

subash
Champ in-the-making
Champ in-the-making
hi,

I have deployed and activate'd the work flow model using following console.
/alfresco/faces/jsp/admin/repoadmin-console.jsp.

Do we  need to deploy the process defintion using the console?

Thanks for your reply till nw.

Subash

rajanigupta
Champ in-the-making
Champ in-the-making
hii

yes we have to deploy both
1–workflow model—that u have done
2–processdefinition —-that u have to do

U can refer chapter8 if u r using ALFRESCO -3-Enterprise

try this…and share ur outcome

hope this would help you Smiley Happy

subash
Champ in-the-making
Champ in-the-making
Hi,

I have did that .
But in the work flow options the outcome is not as expected.
In the Alfresco.lg i have few warnings as below.
14:06:15,760 DEBUG [org.alfresco.repo.jscript.RhinoScriptProcessor] Imports resolved, adding resource '_root
14:06:15,886 DEBUG [org.alfresco.repo.jscript.RhinoScriptProcessor] Time to execute script: 45.369534ms
14:08:55,016 WARN  [org.alfresco.repo.dictionary.DictionaryDAO] Type not found: {}reviewTask
14:08:55,173 WARN  [org.alfresco.repo.dictionary.DictionaryDAO] Type not found: {}reviewTask
14:10:07,120 WARN  [org.alfresco.repo.dictionary.DictionaryDAO] Type not found: {}reviewTask
14:10:07,120 WARN  [org.alfresco.repo.dictionary.DictionaryDAO] Type not found: {}reviewTask
14:10:15,207 WARN  [org.alfresco.repo.dictionary.DictionaryDAO] Type not found: {}reviewTask
14:10:15,207 WARN  [org.alfresco.repo.dictionary.DictionaryDAO] Type not found: {}reviewTask
14:10:15,207 WARN  [org.alfresco.repo.dictionary.DictionaryDAO] Type not found: {}reviewTask
14:10:15,207 WARN  [org.alfresco.repo.dictionary.DictionaryDAO] Type not found: {}reviewTask
14:10:15,207 WARN  [org.alfresco.repo.dictionary.DictionaryDAO] Type not found: {}reviewTask
14:10:15,207 WARN  [org.alfresco.repo.dictionary.DictionaryDAO] Type not found: {}reviewTask
14:10:15,239 WARN  [org.alfresco.repo.dictionary.DictionaryDAO] Type not found: {}reviewTask
14:10:15,286 WARN  [org.alfresco.repo.dictionary.DictionaryDAO] Type not found: {}reviewTask
14:10:15,286 WARN  [org.alfresco.repo.dictionary.DictionaryDAO] Type not found: {}reviewTask
14:10:15,301 WARN  [org.alfresco.repo.dictionary.DictionaryDAO] Type not found: {}reviewTask
14:10:15,301 WARN  [org.alfresco.repo.dictionary.DictionaryDAO] Type not found: {}reviewTask
14:10:15,301 WARN  [org.alfresco.repo.dictionary.DictionaryDAO] Type not found: {}reviewTask
14:10:51,762 WARN  [org.alfresco.repo.dictionary.DictionaryDAO] Type not found: {}submitReviewTask
14:10:51,762 WARN  [org.alfresco.repo.dictionary.DictionaryDAO] Type not found: {}submitReviewTask
14:10:51,778 WARN  [org.alfresco.repo.dictionary.DictionaryDAO] Type not found: {}reviewTask
14:11:07,496 WARN  [org.alfresco.web.ui.repo.component.property.UIAssociation] Failed to find association definition for association 'bpm:assignee'
14:11:17,357 WARN  [org.alfresco.web.ui.repo.component.property.UIAssociation] Failed to find association definition for association 'bpm:assignee'