AnsweredAssumed Answered

Error while building ibatis SqlSessionFactory: null when integrate activiti with osgi

Question asked by yava on Aug 28, 2013
Latest reply on Jan 9, 2014 by mramirez1
I have made activiti project with simple business process. it has been running well,
then I try to put it in OSGI (of course with a few changes). but I get "Error while building ibatis SqlSessionFactory: null" (complete stacktrace is attached)

I am sure the problem was not from camel route, because it has been entering my processor.

here are my activiti-context :

<beans xmlns="http://www.springframework.org/schema/beans"
   xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd">

   <bean id="processEngineConfiguration"
      class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration">
      <!– Database configurations –>
      <property name="databaseType" value="mysql" />
      <property name="jdbcUrl"
         value="jdbc:mysql://localhost:3306/activiti?autoReconnect=true" />
      <property name="jdbcDriver" value="com.mysql.jdbc.Driver" />
      <property name="jdbcUsername" value="root" />
      <property name="jdbcPassword" value="test" />

      <property name="databaseSchemaUpdate" value="true" />
      <property name="mailServerHost" value="localhost" />
      <property name="mailServerPort" value="5025" />
      <property name="jobExecutorActivate" value="false" />
   </bean>

   <bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean">
      <property name="processEngineConfiguration" ref="processEngineConfiguration" />
   </bean>

</beans>


and here is my processor :

public class HelloWorldProcessor implements Processor {
   
    private Logger log = LoggerFactory.getLogger(HelloWorldProcessor.class);

    @Override
    public void process(Exchange exchange) throws Exception {
        ProcessEngine processEngine = ProcessEngineConfiguration
                .createProcessEngineConfigurationFromResource(
                        "activiti-context.xml").buildProcessEngine();

        RepositoryService repositoryService = processEngine
                .getRepositoryService();
        RuntimeService runtimeService = processEngine.getRuntimeService();

        repositoryService.createDeployment().addClasspathResource("hello.bpmn")
                .deploy();

        runtimeService.startProcessInstanceByKey("helloWorld");
    }

}


I have put mysql jar in my osgi (complete osgi list attached), i dont know why mybatis stacktrace shown in my error message.

Attachments

Outcomes