AnsweredAssumed Answered

Error While Deploying Activiti Process: Error parsing SQL Mapper Configuration.Cause: org.apache.ibatis.binding.BindingException

Question asked by activiti_5.14 on Apr 2, 2014
Latest reply on Apr 7, 2014 by trademak
Currently I am working with JSP and Activiti Workflow Engine. I build my project by using Dynamic Web Project on Eclipse. When I tried to run my deployment class, I got following error:

<blockcode>
[main] INFO org.activiti.engine.ProcessEngines - Initializing process engine using configuration 'file:/D:/Tomcat/webapps/mobileform/build/classes/activiti.cfg.xml'
[main] INFO org.activiti.engine.ProcessEngines - initializing process engine for resource file:/D:/Tomcat/webapps/mobileform/build/classes/activiti.cfg.xml
Apr 02, 2014 10:03:18 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from resource loaded through InputStream
[main] ERROR org.activiti.engine.ProcessEngines - Exception while initializing process engine: Error while building ibatis SqlSessionFactory: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.binding.BindingException: Only interfaces can be configured by the MapperFactory.  Type class org.activiti.engine.impl.persistence.entity.ByteArrayEntity is not an interface.
org.activiti.engine.ActivitiException: Error while building ibatis SqlSessionFactory: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.binding.BindingException: Only interfaces can be configured by the MapperFactory.  Type class org.activiti.engine.impl.persistence.entity.ByteArrayEntity is not an interface.
   at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.initSqlSessionFactory(ProcessEngineConfigurationImpl.java:649)
   at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.init(ProcessEngineConfigurationImpl.java:386)
   at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:362)
   at org.activiti.engine.ProcessEngines.buildProcessEngine(ProcessEngines.java:194)
   at org.activiti.engine.ProcessEngines.initProcessEnginFromResource(ProcessEngines.java:167)
   at org.activiti.engine.ProcessEngines.init(ProcessEngines.java:98)
   at org.activiti.engine.ProcessEngines.getProcessEngine(ProcessEngines.java:224)
   at org.activiti.engine.ProcessEngines.getDefaultProcessEngine(ProcessEngines.java:217)
   at project.fraport.mobileformular.DevelopProcess.main(DevelopProcess.java:17)
Caused by: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.binding.BindingException: Only interfaces can be configured by the MapperFactory.  Type class org.activiti.engine.impl.persistence.entity.ByteArrayEntity is not an interface.
   at org.apache.ibatis.builder.xml.XMLConfigBuilder.parseConfiguration(XMLConfigBuilder.java:68)
   at org.apache.ibatis.builder.xml.XMLConfigBuilder.parse(XMLConfigBuilder.java:53)
   at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.initSqlSessionFactory(ProcessEngineConfigurationImpl.java:644)
   … 8 more
Caused by: org.apache.ibatis.binding.BindingException: Only interfaces can be configured by the MapperFactory.  Type class org.activiti.engine.impl.persistence.entity.ByteArrayEntity is not an interface.
   at org.apache.ibatis.binding.MapperRegistry.addMapper(MapperRegistry.java:35)
   at org.apache.ibatis.session.Configuration.addMapper(Configuration.java:320)
   at org.apache.ibatis.builder.xml.XMLMapperBuilder.bindMapperForNamespace(XMLMapperBuilder.java:236)
   at org.apache.ibatis.builder.xml.XMLMapperBuilder.parse(XMLMapperBuilder.java:40)
   at org.apache.ibatis.builder.xml.XMLConfigBuilder.mapperElement(XMLConfigBuilder.java:226)
   at org.apache.ibatis.builder.xml.XMLConfigBuilder.parseConfiguration(XMLConfigBuilder.java:66)
   … 10 more
Exception in thread "main" java.lang.NullPointerException
   at project.fraport.mobileformular.DevelopProcess.main(DevelopProcess.java:18)
</blockcode>

Here is my code on <blockcode>DevelopProcess.java</blockcode> file:


package project.fraport.mobileformular;

import org.activiti.engine.*;
import org.activiti.engine.runtime.*;

public class DevelopProcess {
      
      //set global variable
      static ProcessEngine processEngine;
      static RepositoryService repositoryService;
      static RuntimeService  runtimeService;
      static ProcessInstance processInstance;
      
      //method for deploying and start process
      public static void main(String[] args)
      {
         processEngine = ProcessEngines.getDefaultProcessEngine();
         repositoryService = processEngine.getRepositoryService();
         
         repositoryService.createDeployment()
           .addClasspathResource("accidentForm.bpmn20.xml")
           .deploy();
         System.out.println("Success");
      }
      
}


I have also tried to create another project (Java Project not Dynamic Web Project) using eclipse and placed my DevelopProcess.java there, and its run perfectly without getting any error.

But why am I getting this error while trying to run it from Dynamic Web Project? And how to solve it? Thanks

Outcomes