cancel
Showing results for 
Search instead for 
Did you mean: 

Getting ActivitiIllegalArgumentException: unknown type after adding jars and running tomcat with activiti webapps.

heamaya
Champ in-the-making
Champ in-the-making
Hi everyone! I have created a simple project that has to user activities and two custom form types. I test the App with a JUnit Test and with an App class with a main on it and it works great, then when I create a jar file with my classes and I add them to WEB-INF/lib in both web-apps activiti-explorer and activiti-rest I get a:

Exception in thread "Thread-8" org.activiti.engine.ActivitiIllegalArgumentException: unknown type 'importance' importance
   at org.activiti.engine.impl.form.FormTypes.parseFormPropertyType(FormTypes.java:55)
   at org.activiti.engine.impl.form.DefaultFormHandler.parseConfiguration(DefaultFormHandler.java:61)
   at org.activiti.engine.impl.bpmn.parser.handler.UserTaskParseHandler.parseTaskDefinition(UserTaskParseHandler.java:59)
   at org.activiti.engine.impl.bpmn.parser.handler.UserTaskParseHandler.executeParse(UserTaskParseHandler.java:52)
   at org.activiti.engine.impl.bpmn.parser.handler.UserTaskParseHandler.executeParse(UserTaskParseHandler.java:38)
   at org.activiti.engine.impl.bpmn.parser.handler.AbstractBpmnParseHandler.parse(AbstractBpmnParseHandler.java:81)
   at org.activiti.engine.impl.bpmn.parser.handler.AbstractFlowNodeBpmnParseHandler.parse(AbstractFlowNodeBpmnParseHandler.java:27)
   at org.activiti.engine.impl.bpmn.parser.handler.AbstractActivityBpmnParseHandler.parse(AbstractActivityBpmnParseHandler.java:36)
   at org.activiti.engine.impl.bpmn.parser.BpmnParseHandlers.parseElement(BpmnParseHandlers.java:79)
   at org.activiti.engine.impl.bpmn.parser.BpmnParse.processFlowElements(BpmnParse.java:433)
   at org.activiti.engine.impl.bpmn.parser.handler.ProcessParseHandler.transformProcess(ProcessParseHandler.java:88)
   at org.activiti.engine.impl.bpmn.parser.handler.ProcessParseHandler.executeParse(ProcessParseHandler.java:49)
   at org.activiti.engine.impl.bpmn.parser.handler.ProcessParseHandler.executeParse(ProcessParseHandler.java:35)
   at org.activiti.engine.impl.bpmn.parser.handler.AbstractBpmnParseHandler.parse(AbstractBpmnParseHandler.java:81)
   at org.activiti.engine.impl.bpmn.parser.BpmnParseHandlers.parseElement(BpmnParseHandlers.java:79)
   at org.activiti.engine.impl.bpmn.parser.BpmnParse.transformProcessDefinitions(BpmnParse.java:400)
   at org.activiti.engine.impl.bpmn.parser.BpmnParse.execute(BpmnParse.java:233)
   at org.activiti.engine.impl.bpmn.deployer.BpmnDeployer.deploy(BpmnDeployer.java:133)
   at org.activiti.engine.impl.persistence.deploy.DeploymentManager.deploy(DeploymentManager.java:58)
   at org.activiti.engine.impl.persistence.deploy.DeploymentManager.resolveProcessDefinition(DeploymentManager.java:165)
   at org.activiti.engine.impl.persistence.deploy.DeploymentManager.findDeployedProcessDefinitionById(DeploymentManager.java:77)
   at org.activiti.engine.impl.persistence.entity.TaskEntity.getTaskDefinition(TaskEntity.java:798)
   at org.activiti.engine.impl.persistence.entity.TaskEntity.fireEvent(TaskEntity.java:728)
   at org.activiti.engine.impl.persistence.entity.TaskEntity.setAssignee(TaskEntity.java:559)
   at org.activiti.engine.impl.cmd.ClaimTaskCmd.execute(ClaimTaskCmd.java:44)
   at org.activiti.engine.impl.cmd.ClaimTaskCmd.execute(ClaimTaskCmd.java:23)
   at org.activiti.engine.impl.cmd.NeedsActiveTaskCmd.execute(NeedsActiveTaskCmd.java:59)
   at org.activiti.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:24)
   at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:57)
   at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:47)
   at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
   at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45)
   at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31)
   at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40)
   at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:35)
   at org.activiti.engine.impl.TaskServiceImpl.claim(TaskServiceImpl.java:167)
   at org.activiti.explorer.conf.DemoDataConfiguration$1.run(DemoDataConfiguration.java:272)
   at java.lang.Thread.run(Thread.java:745)

after starting tomcat.

I need to test getting all the possible values for the created custom types for generating the front-end with angular with REST.

Any ideas to solve this problem? Thanks.
1 REPLY 1

vasile_dirla
Star Contributor
Star Contributor
Hi,
Considering your code is working when the class is not packaged in a jar, I guess you have a setup area like that:
<code>
<bean id="processEngineConfiguration" … >
  …
  <property name="customFormTypes">
    <list>
      …
      <bean class="your_package.YourCustomFormType"/>
    </list>
  </property>
</bean>
</code>

is it true?

Or maybe you have a custom processEngineConfiguration ?
Could you give some more details about how you set the customFormTypes in the process engine configuration?

(you could start investigating this by putting some breakpoints into this class: ProcessEngineConfigurationImpl.java in the initFormTypes method and check what values do you have in customFormTypes,
probably this attribute will be empty or null and then have to check why is not set with the list you provided)