cancel
Showing results for 
Search instead for 
Did you mean: 

WorkflowService broken

vincent-kali
Star Contributor
Star Contributor

Hi,

After a not identified operation, I can't call any workflowService method that query workflow instances, I get the following exception:

Any idea where to search ? (activiti table have been cleaned up alr

 2020-05-18 16:25:11,742  ERROR [extensions.webscripts.AbstractRuntime] [http-apr-8080-exec-17] Exception from executeScript: java.lang.String cannot be cast to org.alfresco.repo.jscript.ScriptNode
 java.lang.ClassCastException: java.lang.String cannot be cast to org.alfresco.repo.jscript.ScriptNode
        at org.alfresco.repo.workflow.WorkflowObjectFactory.createInstance(WorkflowObjectFactory.java:161)
        at org.alfresco.repo.workflow.activiti.ActivitiTypeConverter.convertToInstanceAndSetVariables(ActivitiTypeConverter.java:812)
        at org.alfresco.repo.workflow.activiti.ActivitiTypeConverter.convert(ActivitiTypeConverter.java:888)
        at org.alfresco.repo.workflow.activiti.ActivitiTypeConverter.convert(ActivitiTypeConverter.java:434)
        at org.alfresco.repo.workflow.activiti.ActivitiTypeConverter.convert(ActivitiTypeConverter.java:376)
        at org.alfresco.repo.workflow.activiti.ActivitiTypeConverter.doSpecialTenantFilterAndSafeConvert(ActivitiTypeConverter.java:131)
        at org.alfresco.repo.workflow.activiti.ActivitiWorkflowEngine.getWorkflowsInternal(ActivitiWorkflowEngine.java:2417)
        at org.alfresco.repo.workflow.activiti.ActivitiWorkflowEngine.getWorkflows(ActivitiWorkflowEngine.java:2388)
        at org.alfresco.repo.workflow.WorkflowServiceImpl$1.apply(WorkflowServiceImpl.java:492)
        at org.alfresco.repo.workflow.WorkflowServiceImpl$1.apply(WorkflowServiceImpl.java:1)
        at org.alfresco.util.collections.CollectionUtils.transform(CollectionUtils.java:194)
        at org.alfresco.util.collections.CollectionUtils.transformFlat(CollectionUtils.java:357)
        at org.alfresco.repo.workflow.WorkflowServiceImpl.getWorkflows(WorkflowServiceImpl.java:487)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
        at org.alfresco.service.cmr.workflow.WorkflowPermissionInterceptor.invoke(WorkflowPermissionInterceptor.java:64)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:53)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:166)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
        at com.sun.proxy.$Proxy100.getWorkflows(Unknown Source)
        at fr.ks2.alfresco.api.utils.WorkflowTools.getWorkflowInstancesDojoRestful(WorkflowTools.java:2782)
        at fr.ks2.alfresco.api.webscript.workflow.GetWorkflowInstancesDojoRestful.buildModel(GetWorkflowInstancesDojoRestful.java:82)
        at fr.ks2.alfresco.api.webscript.workflow.AbstractWorkflowWebScriptDojoRestful.execute(AbstractWorkflowWebScriptDojoRestful.java:144)
        at org.alfresco.repo.web.scripts.RepositoryContainer$3.execute(RepositoryContainer.java:519)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:464)
        at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:587)
        at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:656)
        at org.alfresco.repo.web.scripts.RepositoryContainer.executeScriptInternal(RepositoryContainer.java:428)
        at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:308)
        at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:399)
        at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:210)
        at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:132)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.alfresco.module.aosmodule.service.ContextRootFilter.doFilter(ContextRootFilter.java:93)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:68)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1115)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
        at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2549)
        at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2538)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:748)
 
1 REPLY 1

sanjaybandhaniya
Elite Collaborator
Elite Collaborator

 2020-05-18 16:25:11,742  ERROR [extensions.webscripts.AbstractRuntime] [http-apr-8080-exec-17] Exception from executeScript: java.lang.String cannot be cast to org.alfresco.repo.jscript.ScriptNode
 java.lang.ClassCastException: java.lang.String cannot be cast to org.alfresco.repo.jscript.ScriptNode

This exception says that you are passing nodeRef as a string instead of Noderef.