Unable to initiate a ProcessEngine instance successfully
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2015 07:45 AM
Hi,
I am new to Activiti, I am trying to create a ProcessEngine instance by following the user guide.
I added the activiti.cfg.xml file that contains the engine configuration for an H2 in memory database.
When executing the code in the main method i get this error: 01:27:19,675 [main] ERROR org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl - Exception while initializing Database connection
java.sql.SQLException: Error setting driver on UnpooledDataSource. Cause: java.lang.ClassNotFoundException: org.h2.Driver
It seems not to detect the H2 driver although I included the dependency for H2 in the pom.xml.
Could someone help me in what i am doing wrong here?
Here is the main method i am executing:
and here is the activiti.cfg.xml file contents:
Here is the full output log i get:
01:27:18,583 [main] INFO org.activiti.engine.ProcessEngines - Initializing process engine using configuration 'file:/Users/Hassan/Documents/Eclipse/workspace/activiti-unit-test-template-master/target/classes/activiti.cfg.xml'
01:27:18,586 [main] INFO org.activiti.engine.ProcessEngines - initializing process engine for resource file:/Users/Hassan/Documents/Eclipse/workspace/activiti-unit-test-template-master/target/classes/activiti.cfg.xml
01:27:18,853 [main] DEBUG org.springframework.core.env.StandardEnvironment - Adding [systemProperties] PropertySource with lowest search precedence
01:27:18,854 [main] DEBUG org.springframework.core.env.StandardEnvironment - Adding [systemEnvironment] PropertySource with lowest search precedence
01:27:18,854 [main] DEBUG org.springframework.core.env.StandardEnvironment - Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]
01:27:18,865 [main] INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from resource loaded through InputStream
01:27:18,887 [main] DEBUG org.springframework.beans.factory.xml.DefaultDocumentLoader - Using JAXP provider [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl]
01:27:18,914 [main] DEBUG org.springframework.beans.factory.xml.PluggableSchemaResolver - Loading schema mappings from [META-INF/spring.schemas]
01:27:18,922 [main] DEBUG org.springframework.beans.factory.xml.PluggableSchemaResolver - Loaded schema mappings: {http://www.springframework.org/schema/beans/spring-beans-3.2.xsd=org/springframework/beans/factory/x..., http://www.springframework.org/schema/util/spring-util-3.0.xsd=org/springframework/beans/factory/xml..., http://www.springframework.org/schema/util/spring-util-4.1.xsd=org/springframework/beans/factory/xml..., http://www.springframework.org/schema/util/spring-util-2.0.xsd=org/springframework/beans/factory/xml..., http://www.springframework.org/schema/util/spring-util-2.5.xsd=org/springframework/beans/factory/xml..., http://www.springframework.org/schema/tool/spring-tool-3.0.xsd=org/springframework/beans/factory/xml..., http://www.springframework.org/schema/tool/spring-tool-4.1.xsd=org/springframework/beans/factory/xml..., http://www.springframework.org/schema/tool/spring-tool-2.0.xsd=org/springframework/beans/factory/xml..., http://www.springframework.org/schema/util/spring-util-3.2.xsd=org/springframework/beans/factory/xml..., http://www.springframework.org/schema/beans/spring-beans-4.1.xsd=org/springframework/beans/factory/x..., http://www.springframework.org/schema/beans/spring-beans-2.0.xsd=org/springframework/beans/factory/x..., http://www.springframework.org/schema/tool/spring-tool-2.5.xsd=org/springframework/beans/factory/xml..., http://www.springframework.org/schema/beans/spring-beans-3.1.xsd=org/springframework/beans/factory/x..., http://www.springframework.org/schema/beans/spring-beans-2.5.xsd=org/springframework/beans/factory/x..., http://www.springframework.org/schema/beans/spring-beans.xsd=org/springframework/beans/factory/xml/s..., http://www.springframework.org/schema/tool/spring-tool.xsd=org/springframework/beans/factory/xml/spr..., http://www.springframework.org/schema/tool/spring-tool-3.2.xsd=org/springframework/beans/factory/xml..., http://www.springframework.org/schema/util/spring-util-4.0.xsd=org/springframework/beans/factory/xml..., http://www.springframework.org/schema/tool/spring-tool-4.0.xsd=org/springframework/beans/factory/xml..., http://www.springframework.org/schema/util/spring-util-3.1.xsd=org/springframework/beans/factory/xml..., http://www.springframework.org/schema/beans/spring-beans-4.0.xsd=org/springframework/beans/factory/x..., http://www.springframework.org/schema/beans/spring-beans-3.0.xsd=org/springframework/beans/factory/x..., http://www.springframework.org/schema/tool/spring-tool-3.1.xsd=org/springframework/beans/factory/xml..., http://www.springframework.org/schema/util/spring-util.xsd=org/springframework/beans/factory/xml/spr...}
01:27:18,929 [main] DEBUG org.springframework.beans.factory.xml.PluggableSchemaResolver - Found XML schema [http://www.springframework.org/schema/beans/spring-beans.xsd] in classpath: org/springframework/beans/factory/xml/spring-beans-4.1.xsd
01:27:18,974 [main] DEBUG org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader - Loading bean definitions
01:27:19,011 [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'processEngineConfiguration'
01:27:19,012 [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating instance of bean 'processEngineConfiguration'
01:27:19,096 [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Eagerly caching bean 'processEngineConfiguration' to allow for resolving potential circular references
01:27:19,222 [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Finished creating instance of bean 'processEngineConfiguration'
01:27:19,660 [main] DEBUG org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl - initializing datasource to db: jdbc:h2:mem:activiti;DB_CLOSE_DELAY=1000
01:27:19,670 [main] DEBUG org.apache.ibatis.logging.LogFactory - Logging initialized using 'class org.apache.ibatis.logging.slf4j.Slf4jImpl' adapter.
01:27:19,673 [main] DEBUG org.apache.ibatis.datasource.pooled.PooledDataSource - PooledDataSource forcefully closed/removed all connections.
01:27:19,675 [main] ERROR org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl - Exception while initializing Database connection
java.sql.SQLException: Error setting driver on UnpooledDataSource. Cause: java.lang.ClassNotFoundException: org.h2.Driver
at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.initializeDriver(UnpooledDataSource.java:211)
at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.doGetConnection(UnpooledDataSource.java:190)
at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.doGetConnection(UnpooledDataSource.java:186)
at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.getConnection(UnpooledDataSource.java:88)
at org.apache.ibatis.datasource.pooled.PooledDataSource.popConnection(PooledDataSource.java:373)
at org.apache.ibatis.datasource.pooled.PooledDataSource.getConnection(PooledDataSource.java:82)
at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.initDatabaseType(ProcessEngineConfigurationImpl.java:670)
at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.initDataSource(ProcessEngineConfigurationImpl.java:621)
at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.init(ProcessEngineConfigurationImpl.java:454)
at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:426)
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 org.activiti.UnitTest.main(UnitTest.java:18)
01:27:20,785 [main] DEBUG org.activiti.engine.impl.interceptor.LogInterceptor -
01:27:20,786 [main] DEBUG org.activiti.engine.impl.interceptor.LogInterceptor - — starting SchemaOperationsProcessEngineBuild ——————————————————–
01:27:20,798 [main] DEBUG org.apache.ibatis.transaction.jdbc.JdbcTransaction - Opening JDBC Connection
01:27:20,798 [main] DEBUG org.activiti.engine.impl.interceptor.CommandContext - Error while closing command context
org.activiti.engine.ActivitiException: couldn't check if tables are already present using metadata:
### Error getting a new connection. Cause: java.sql.SQLException: Error setting driver on UnpooledDataSource. Cause: java.lang.ClassNotFoundException: org.h2.Driver
### Cause: java.sql.SQLException: Error setting driver on UnpooledDataSource. Cause: java.lang.ClassNotFoundException: org.h2.Driver
at org.activiti.engine.impl.db.DbSqlSession.isTablePresent(DbSqlSession.java:1195)
at org.activiti.engine.impl.db.DbSqlSession.isEngineTablePresent(DbSqlSession.java:1145)
at org.activiti.engine.impl.db.DbSqlSession.dbSchemaUpdate(DbSqlSession.java:1078)
at org.activiti.engine.impl.db.DbSqlSession.performSchemaOperationsProcessEngineBuild(DbSqlSession.java:1473)
at org.activiti.engine.impl.SchemaOperationsProcessEngineBuild.execute(SchemaOperationsProcessEngineBuild.java:25)
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.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:37)
at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40)
at org.activiti.engine.impl.ProcessEngineImpl.<init>(ProcessEngineImpl.java:77)
at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:427)
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 org.activiti.UnitTest.main(UnitTest.java:18)
Caused by: org.apache.ibatis.exceptions.PersistenceException:
### Error getting a new connection. Cause: java.sql.SQLException: Error setting driver on UnpooledDataSource. Cause: java.lang.ClassNotFoundException: org.h2.Driver
### Cause: java.sql.SQLException: Error setting driver on UnpooledDataSource. Cause: java.lang.ClassNotFoundException: org.h2.Driver
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:23)
at org.apache.ibatis.session.defaults.DefaultSqlSession.getConnection(DefaultSqlSession.java:225)
at org.activiti.engine.impl.db.DbSqlSession.isTablePresent(DbSqlSession.java:1163)
… 16 more
Caused by: java.sql.SQLException: Error setting driver on UnpooledDataSource. Cause: java.lang.ClassNotFoundException: org.h2.Driver
at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.initializeDriver(UnpooledDataSource.java:211)
at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.doGetConnection(UnpooledDataSource.java:190)
at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.doGetConnection(UnpooledDataSource.java:186)
at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.getConnection(UnpooledDataSource.java:88)
at org.apache.ibatis.datasource.pooled.PooledDataSource.popConnection(PooledDataSource.java:373)
at org.apache.ibatis.datasource.pooled.PooledDataSource.getConnection(PooledDataSource.java:82)
at org.apache.ibatis.transaction.jdbc.JdbcTransaction.openConnection(JdbcTransaction.java:131)
at org.apache.ibatis.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:58)
at org.apache.ibatis.session.defaults.DefaultSqlSession.getConnection(DefaultSqlSession.java:223)
… 17 more
01:27:20,799 [main] DEBUG org.activiti.engine.impl.cfg.standalone.StandaloneMybatisTransactionContext - firing event rolling back…
01:27:20,800 [main] DEBUG org.activiti.engine.impl.cfg.standalone.StandaloneMybatisTransactionContext - rolling back ibatis sql session…
01:27:20,800 [main] DEBUG org.activiti.engine.impl.cfg.standalone.StandaloneMybatisTransactionContext - firing event rolled back…
01:27:20,800 [main] DEBUG org.activiti.engine.impl.interceptor.LogInterceptor - — SchemaOperationsProcessEngineBuild finished ——————————————————–
01:27:20,800 [main] DEBUG org.activiti.engine.impl.interceptor.LogInterceptor -
01:27:20,800 [main] ERROR org.activiti.engine.ProcessEngines - Exception while initializing process engine: couldn't check if tables are already present using metadata:
### Error getting a new connection. Cause: java.sql.SQLException: Error setting driver on UnpooledDataSource. Cause: java.lang.ClassNotFoundException: org.h2.Driver
### Cause: java.sql.SQLException: Error setting driver on UnpooledDataSource. Cause: java.lang.ClassNotFoundException: org.h2.Driver
org.activiti.engine.ActivitiException: couldn't check if tables are already present using metadata:
### Error getting a new connection. Cause: java.sql.SQLException: Error setting driver on UnpooledDataSource. Cause: java.lang.ClassNotFoundException: org.h2.Driver
### Cause: java.sql.SQLException: Error setting driver on UnpooledDataSource. Cause: java.lang.ClassNotFoundException: org.h2.Driver
at org.activiti.engine.impl.db.DbSqlSession.isTablePresent(DbSqlSession.java:1195)
at org.activiti.engine.impl.db.DbSqlSession.isEngineTablePresent(DbSqlSession.java:1145)
at org.activiti.engine.impl.db.DbSqlSession.dbSchemaUpdate(DbSqlSession.java:1078)
at org.activiti.engine.impl.db.DbSqlSession.performSchemaOperationsProcessEngineBuild(DbSqlSession.java:1473)
at org.activiti.engine.impl.SchemaOperationsProcessEngineBuild.execute(SchemaOperationsProcessEngineBuild.java:25)
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.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:37)
at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40)
at org.activiti.engine.impl.ProcessEngineImpl.<init>(ProcessEngineImpl.java:77)
at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:427)
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 org.activiti.UnitTest.main(UnitTest.java:18)
Caused by: org.apache.ibatis.exceptions.PersistenceException:
### Error getting a new connection. Cause: java.sql.SQLException: Error setting driver on UnpooledDataSource. Cause: java.lang.ClassNotFoundException: org.h2.Driver
### Cause: java.sql.SQLException: Error setting driver on UnpooledDataSource. Cause: java.lang.ClassNotFoundException: org.h2.Driver
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:23)
at org.apache.ibatis.session.defaults.DefaultSqlSession.getConnection(DefaultSqlSession.java:225)
at org.activiti.engine.impl.db.DbSqlSession.isTablePresent(DbSqlSession.java:1163)
… 16 more
Caused by: java.sql.SQLException: Error setting driver on UnpooledDataSource. Cause: java.lang.ClassNotFoundException: org.h2.Driver
at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.initializeDriver(UnpooledDataSource.java:211)
at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.doGetConnection(UnpooledDataSource.java:190)
at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.doGetConnection(UnpooledDataSource.java:186)
at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.getConnection(UnpooledDataSource.java:88)
at org.apache.ibatis.datasource.pooled.PooledDataSource.popConnection(PooledDataSource.java:373)
at org.apache.ibatis.datasource.pooled.PooledDataSource.getConnection(PooledDataSource.java:82)
at org.apache.ibatis.transaction.jdbc.JdbcTransaction.openConnection(JdbcTransaction.java:131)
at org.apache.ibatis.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:58)
at org.apache.ibatis.session.defaults.DefaultSqlSession.getConnection(DefaultSqlSession.java:223)
… 17 more
End of exe!
I am new to Activiti, I am trying to create a ProcessEngine instance by following the user guide.
I added the activiti.cfg.xml file that contains the engine configuration for an H2 in memory database.
When executing the code in the main method i get this error: 01:27:19,675 [main] ERROR org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl - Exception while initializing Database connection
java.sql.SQLException: Error setting driver on UnpooledDataSource. Cause: java.lang.ClassNotFoundException: org.h2.Driver
It seems not to detect the H2 driver although I included the dependency for H2 in the pom.xml.
Could someone help me in what i am doing wrong here?
Here is the main method i am executing:
package org.activiti;import org.activiti.engine.ProcessEngine;import org.activiti.engine.ProcessEngineConfiguration;import org.activiti.engine.ProcessEngines;import org.activiti.engine.runtime.ProcessInstance;import org.activiti.engine.task.Task;import org.activiti.engine.test.ActivitiRule;import org.activiti.engine.test.Deployment;import org.junit.Rule;import org.junit.Test;import static org.junit.Assert.*;public class UnitTest { public static void main(String[] args){ ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine(); System.out.println("End of exe!"); }}
and here is the activiti.cfg.xml file contents:
<beans xmlns="http://www.springframework.org/schema/beans" 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"> <bean id="processEngineConfiguration" class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration"> <property name="jdbcUrl" value="jdbc:h2:mem:activiti;DB_CLOSE_DELAY=1000" /> <property name="jdbcDriver" value="org.h2.Driver" /> <property name="jdbcUsername" value="sa" /> <property name="jdbcPassword" value="" /> <property name="databaseSchemaUpdate" value="true" /> <property name="jobExecutorActivate" value="false" /> <property name="asyncExecutorEnabled" value="true" /> <property name="asyncExecutorActivate" value="false" /> <property name="mailServerHost" value="mail.my-corp.com" /> <property name="mailServerPort" value="5025" /> </bean></beans>
Here is the full output log i get:
01:27:18,583 [main] INFO org.activiti.engine.ProcessEngines - Initializing process engine using configuration 'file:/Users/Hassan/Documents/Eclipse/workspace/activiti-unit-test-template-master/target/classes/activiti.cfg.xml'
01:27:18,586 [main] INFO org.activiti.engine.ProcessEngines - initializing process engine for resource file:/Users/Hassan/Documents/Eclipse/workspace/activiti-unit-test-template-master/target/classes/activiti.cfg.xml
01:27:18,853 [main] DEBUG org.springframework.core.env.StandardEnvironment - Adding [systemProperties] PropertySource with lowest search precedence
01:27:18,854 [main] DEBUG org.springframework.core.env.StandardEnvironment - Adding [systemEnvironment] PropertySource with lowest search precedence
01:27:18,854 [main] DEBUG org.springframework.core.env.StandardEnvironment - Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]
01:27:18,865 [main] INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from resource loaded through InputStream
01:27:18,887 [main] DEBUG org.springframework.beans.factory.xml.DefaultDocumentLoader - Using JAXP provider [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl]
01:27:18,914 [main] DEBUG org.springframework.beans.factory.xml.PluggableSchemaResolver - Loading schema mappings from [META-INF/spring.schemas]
01:27:18,922 [main] DEBUG org.springframework.beans.factory.xml.PluggableSchemaResolver - Loaded schema mappings: {http://www.springframework.org/schema/beans/spring-beans-3.2.xsd=org/springframework/beans/factory/x..., http://www.springframework.org/schema/util/spring-util-3.0.xsd=org/springframework/beans/factory/xml..., http://www.springframework.org/schema/util/spring-util-4.1.xsd=org/springframework/beans/factory/xml..., http://www.springframework.org/schema/util/spring-util-2.0.xsd=org/springframework/beans/factory/xml..., http://www.springframework.org/schema/util/spring-util-2.5.xsd=org/springframework/beans/factory/xml..., http://www.springframework.org/schema/tool/spring-tool-3.0.xsd=org/springframework/beans/factory/xml..., http://www.springframework.org/schema/tool/spring-tool-4.1.xsd=org/springframework/beans/factory/xml..., http://www.springframework.org/schema/tool/spring-tool-2.0.xsd=org/springframework/beans/factory/xml..., http://www.springframework.org/schema/util/spring-util-3.2.xsd=org/springframework/beans/factory/xml..., http://www.springframework.org/schema/beans/spring-beans-4.1.xsd=org/springframework/beans/factory/x..., http://www.springframework.org/schema/beans/spring-beans-2.0.xsd=org/springframework/beans/factory/x..., http://www.springframework.org/schema/tool/spring-tool-2.5.xsd=org/springframework/beans/factory/xml..., http://www.springframework.org/schema/beans/spring-beans-3.1.xsd=org/springframework/beans/factory/x..., http://www.springframework.org/schema/beans/spring-beans-2.5.xsd=org/springframework/beans/factory/x..., http://www.springframework.org/schema/beans/spring-beans.xsd=org/springframework/beans/factory/xml/s..., http://www.springframework.org/schema/tool/spring-tool.xsd=org/springframework/beans/factory/xml/spr..., http://www.springframework.org/schema/tool/spring-tool-3.2.xsd=org/springframework/beans/factory/xml..., http://www.springframework.org/schema/util/spring-util-4.0.xsd=org/springframework/beans/factory/xml..., http://www.springframework.org/schema/tool/spring-tool-4.0.xsd=org/springframework/beans/factory/xml..., http://www.springframework.org/schema/util/spring-util-3.1.xsd=org/springframework/beans/factory/xml..., http://www.springframework.org/schema/beans/spring-beans-4.0.xsd=org/springframework/beans/factory/x..., http://www.springframework.org/schema/beans/spring-beans-3.0.xsd=org/springframework/beans/factory/x..., http://www.springframework.org/schema/tool/spring-tool-3.1.xsd=org/springframework/beans/factory/xml..., http://www.springframework.org/schema/util/spring-util.xsd=org/springframework/beans/factory/xml/spr...}
01:27:18,929 [main] DEBUG org.springframework.beans.factory.xml.PluggableSchemaResolver - Found XML schema [http://www.springframework.org/schema/beans/spring-beans.xsd] in classpath: org/springframework/beans/factory/xml/spring-beans-4.1.xsd
01:27:18,974 [main] DEBUG org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader - Loading bean definitions
01:27:19,011 [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'processEngineConfiguration'
01:27:19,012 [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating instance of bean 'processEngineConfiguration'
01:27:19,096 [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Eagerly caching bean 'processEngineConfiguration' to allow for resolving potential circular references
01:27:19,222 [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Finished creating instance of bean 'processEngineConfiguration'
01:27:19,660 [main] DEBUG org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl - initializing datasource to db: jdbc:h2:mem:activiti;DB_CLOSE_DELAY=1000
01:27:19,670 [main] DEBUG org.apache.ibatis.logging.LogFactory - Logging initialized using 'class org.apache.ibatis.logging.slf4j.Slf4jImpl' adapter.
01:27:19,673 [main] DEBUG org.apache.ibatis.datasource.pooled.PooledDataSource - PooledDataSource forcefully closed/removed all connections.
01:27:19,675 [main] ERROR org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl - Exception while initializing Database connection
java.sql.SQLException: Error setting driver on UnpooledDataSource. Cause: java.lang.ClassNotFoundException: org.h2.Driver
at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.initializeDriver(UnpooledDataSource.java:211)
at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.doGetConnection(UnpooledDataSource.java:190)
at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.doGetConnection(UnpooledDataSource.java:186)
at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.getConnection(UnpooledDataSource.java:88)
at org.apache.ibatis.datasource.pooled.PooledDataSource.popConnection(PooledDataSource.java:373)
at org.apache.ibatis.datasource.pooled.PooledDataSource.getConnection(PooledDataSource.java:82)
at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.initDatabaseType(ProcessEngineConfigurationImpl.java:670)
at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.initDataSource(ProcessEngineConfigurationImpl.java:621)
at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.init(ProcessEngineConfigurationImpl.java:454)
at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:426)
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 org.activiti.UnitTest.main(UnitTest.java:18)
01:27:20,785 [main] DEBUG org.activiti.engine.impl.interceptor.LogInterceptor -
01:27:20,786 [main] DEBUG org.activiti.engine.impl.interceptor.LogInterceptor - — starting SchemaOperationsProcessEngineBuild ——————————————————–
01:27:20,798 [main] DEBUG org.apache.ibatis.transaction.jdbc.JdbcTransaction - Opening JDBC Connection
01:27:20,798 [main] DEBUG org.activiti.engine.impl.interceptor.CommandContext - Error while closing command context
org.activiti.engine.ActivitiException: couldn't check if tables are already present using metadata:
### Error getting a new connection. Cause: java.sql.SQLException: Error setting driver on UnpooledDataSource. Cause: java.lang.ClassNotFoundException: org.h2.Driver
### Cause: java.sql.SQLException: Error setting driver on UnpooledDataSource. Cause: java.lang.ClassNotFoundException: org.h2.Driver
at org.activiti.engine.impl.db.DbSqlSession.isTablePresent(DbSqlSession.java:1195)
at org.activiti.engine.impl.db.DbSqlSession.isEngineTablePresent(DbSqlSession.java:1145)
at org.activiti.engine.impl.db.DbSqlSession.dbSchemaUpdate(DbSqlSession.java:1078)
at org.activiti.engine.impl.db.DbSqlSession.performSchemaOperationsProcessEngineBuild(DbSqlSession.java:1473)
at org.activiti.engine.impl.SchemaOperationsProcessEngineBuild.execute(SchemaOperationsProcessEngineBuild.java:25)
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.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:37)
at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40)
at org.activiti.engine.impl.ProcessEngineImpl.<init>(ProcessEngineImpl.java:77)
at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:427)
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 org.activiti.UnitTest.main(UnitTest.java:18)
Caused by: org.apache.ibatis.exceptions.PersistenceException:
### Error getting a new connection. Cause: java.sql.SQLException: Error setting driver on UnpooledDataSource. Cause: java.lang.ClassNotFoundException: org.h2.Driver
### Cause: java.sql.SQLException: Error setting driver on UnpooledDataSource. Cause: java.lang.ClassNotFoundException: org.h2.Driver
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:23)
at org.apache.ibatis.session.defaults.DefaultSqlSession.getConnection(DefaultSqlSession.java:225)
at org.activiti.engine.impl.db.DbSqlSession.isTablePresent(DbSqlSession.java:1163)
… 16 more
Caused by: java.sql.SQLException: Error setting driver on UnpooledDataSource. Cause: java.lang.ClassNotFoundException: org.h2.Driver
at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.initializeDriver(UnpooledDataSource.java:211)
at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.doGetConnection(UnpooledDataSource.java:190)
at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.doGetConnection(UnpooledDataSource.java:186)
at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.getConnection(UnpooledDataSource.java:88)
at org.apache.ibatis.datasource.pooled.PooledDataSource.popConnection(PooledDataSource.java:373)
at org.apache.ibatis.datasource.pooled.PooledDataSource.getConnection(PooledDataSource.java:82)
at org.apache.ibatis.transaction.jdbc.JdbcTransaction.openConnection(JdbcTransaction.java:131)
at org.apache.ibatis.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:58)
at org.apache.ibatis.session.defaults.DefaultSqlSession.getConnection(DefaultSqlSession.java:223)
… 17 more
01:27:20,799 [main] DEBUG org.activiti.engine.impl.cfg.standalone.StandaloneMybatisTransactionContext - firing event rolling back…
01:27:20,800 [main] DEBUG org.activiti.engine.impl.cfg.standalone.StandaloneMybatisTransactionContext - rolling back ibatis sql session…
01:27:20,800 [main] DEBUG org.activiti.engine.impl.cfg.standalone.StandaloneMybatisTransactionContext - firing event rolled back…
01:27:20,800 [main] DEBUG org.activiti.engine.impl.interceptor.LogInterceptor - — SchemaOperationsProcessEngineBuild finished ——————————————————–
01:27:20,800 [main] DEBUG org.activiti.engine.impl.interceptor.LogInterceptor -
01:27:20,800 [main] ERROR org.activiti.engine.ProcessEngines - Exception while initializing process engine: couldn't check if tables are already present using metadata:
### Error getting a new connection. Cause: java.sql.SQLException: Error setting driver on UnpooledDataSource. Cause: java.lang.ClassNotFoundException: org.h2.Driver
### Cause: java.sql.SQLException: Error setting driver on UnpooledDataSource. Cause: java.lang.ClassNotFoundException: org.h2.Driver
org.activiti.engine.ActivitiException: couldn't check if tables are already present using metadata:
### Error getting a new connection. Cause: java.sql.SQLException: Error setting driver on UnpooledDataSource. Cause: java.lang.ClassNotFoundException: org.h2.Driver
### Cause: java.sql.SQLException: Error setting driver on UnpooledDataSource. Cause: java.lang.ClassNotFoundException: org.h2.Driver
at org.activiti.engine.impl.db.DbSqlSession.isTablePresent(DbSqlSession.java:1195)
at org.activiti.engine.impl.db.DbSqlSession.isEngineTablePresent(DbSqlSession.java:1145)
at org.activiti.engine.impl.db.DbSqlSession.dbSchemaUpdate(DbSqlSession.java:1078)
at org.activiti.engine.impl.db.DbSqlSession.performSchemaOperationsProcessEngineBuild(DbSqlSession.java:1473)
at org.activiti.engine.impl.SchemaOperationsProcessEngineBuild.execute(SchemaOperationsProcessEngineBuild.java:25)
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.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:37)
at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40)
at org.activiti.engine.impl.ProcessEngineImpl.<init>(ProcessEngineImpl.java:77)
at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:427)
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 org.activiti.UnitTest.main(UnitTest.java:18)
Caused by: org.apache.ibatis.exceptions.PersistenceException:
### Error getting a new connection. Cause: java.sql.SQLException: Error setting driver on UnpooledDataSource. Cause: java.lang.ClassNotFoundException: org.h2.Driver
### Cause: java.sql.SQLException: Error setting driver on UnpooledDataSource. Cause: java.lang.ClassNotFoundException: org.h2.Driver
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:23)
at org.apache.ibatis.session.defaults.DefaultSqlSession.getConnection(DefaultSqlSession.java:225)
at org.activiti.engine.impl.db.DbSqlSession.isTablePresent(DbSqlSession.java:1163)
… 16 more
Caused by: java.sql.SQLException: Error setting driver on UnpooledDataSource. Cause: java.lang.ClassNotFoundException: org.h2.Driver
at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.initializeDriver(UnpooledDataSource.java:211)
at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.doGetConnection(UnpooledDataSource.java:190)
at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.doGetConnection(UnpooledDataSource.java:186)
at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.getConnection(UnpooledDataSource.java:88)
at org.apache.ibatis.datasource.pooled.PooledDataSource.popConnection(PooledDataSource.java:373)
at org.apache.ibatis.datasource.pooled.PooledDataSource.getConnection(PooledDataSource.java:82)
at org.apache.ibatis.transaction.jdbc.JdbcTransaction.openConnection(JdbcTransaction.java:131)
at org.apache.ibatis.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:58)
at org.apache.ibatis.session.defaults.DefaultSqlSession.getConnection(DefaultSqlSession.java:223)
… 17 more
End of exe!
Labels:
- Labels:
-
Archive
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2015 07:57 AM
Hi,
did you check twice whether h2 driver is in the classpath?
Regards
Martin
did you check twice whether h2 driver is in the classpath?
Regards
Martin

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2015 02:51 AM
Hi
i'm newer about activiti workflow engine. I'm trying to import below xml in model workspace to invoke webservice call and getting below error.
01:18:54,863 [http-bio-8080-exec-3] ERROR org.activiti.bpmn.converter.BaseBpmnXMLConverter - Error converting Input for webservice, invalid data type: setToRequestItem
01:18:54,867 [http-bio-8080-exec-3] ERROR org.activiti.bpmn.converter.BaseBpmnXMLConverter - Error converting Input for webservice, invalid data type: setToRequestItem
Dec 16, 2015 1:18:54 PM com.vaadin.Application terminalError
SEVERE: Terminal error:
com.vaadin.event.ListenerMethod$MethodException: Invocation of method uploadFinished in org.activiti.explorer.ui.custom.ImportComponent failed.
Can any one help?.. i'm used below xml for webservice call.
<?xml version="1.0" encoding="UTF-8" ?>
<definitions id="definitions"
xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:activiti="http://activiti.org/bpmn"
targetNamespace="org.activiti.enginge.impl.webservice" xmlns:tns="org.activiti.enginge.impl.webservice"
xmlns:counter="http://webservice.activiti.org/">
<import importType="http://schemas.xmlsoap.org/wsdl/" location="http://localhost:63081/counter?wsdl"
namespace="http://webservice.activiti.org/" />
<process id="webServiceInvocationWithParametersFromTask">
<dataObject id="dataInputOfProcess" name="Input for webservice" itemSubjectRef="tns:setToRequestItem"/>
<startEvent id="theStart" />
<sequenceFlow id="flow1" sourceRef="theStart" targetRef="theScriptTask" />
<scriptTask id="theScriptTask" scriptFormat="groovy" name="Execute script">
<script>
def scriptVar = "10"
execution.setVariable("dataInputOfProcess", scriptVar)
</script>
</scriptTask>
<sequenceFlow id="flow1a" sourceRef="theScriptTask" targetRef="webService" />
<serviceTask id="webService" name="Call WS"
implementation="##WebService" operationRef="tns:setToOperation">
<!– The BPMN 2.0 Meta Model requires an Input/Output Specification –>
<ioSpecification>
<dataInput itemSubjectRef="tns:setToRequestItem" id="dataInputOfServiceTask" />
<inputSet>
<dataInputRefs>dataInputOfServiceTask</dataInputRefs>
</inputSet>
<outputSet />
</ioSpecification>
<dataInputAssociation>
<sourceRef>dataInputOfProcess</sourceRef>
<targetRef>dataInputOfServiceTask</targetRef>
<assignment>
<from>${dataInputOfProcess}</from>
<to>${dataInputOfServiceTask.value}</to>
</assignment>
</dataInputAssociation>
</serviceTask>
<sequenceFlow id="flow2" sourceRef="webService"
targetRef="waitState" />
<receiveTask id="waitState" />
<sequenceFlow id="flow3" sourceRef="waitState" targetRef="theEnd" />
<endEvent id="theEnd" />
</process>
<!– Interface: implementationRef = QName of WSDL Port Type –>
<interface name="Counter Interface" implementationRef="counter:Counter">
<!– Operation: implementationRef = QName of WSDL Operation –>
<operation id="setToOperation" name="setTo Operation"
implementationRef="counter:setTo">
<inMessageRef>tns:setToRequestMessage</inMessageRef>
</operation>
</interface>
<message id="setToRequestMessage" itemRef="tns:setToRequestItem" />
<itemDefinition id="setToRequestItem" structureRef="counter:setTo" /><!–
QName of input element –>
</definitions>
i'm newer about activiti workflow engine. I'm trying to import below xml in model workspace to invoke webservice call and getting below error.
01:18:54,863 [http-bio-8080-exec-3] ERROR org.activiti.bpmn.converter.BaseBpmnXMLConverter - Error converting Input for webservice, invalid data type: setToRequestItem
01:18:54,867 [http-bio-8080-exec-3] ERROR org.activiti.bpmn.converter.BaseBpmnXMLConverter - Error converting Input for webservice, invalid data type: setToRequestItem
Dec 16, 2015 1:18:54 PM com.vaadin.Application terminalError
SEVERE: Terminal error:
com.vaadin.event.ListenerMethod$MethodException: Invocation of method uploadFinished in org.activiti.explorer.ui.custom.ImportComponent failed.
Can any one help?.. i'm used below xml for webservice call.
<?xml version="1.0" encoding="UTF-8" ?>
<definitions id="definitions"
xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:activiti="http://activiti.org/bpmn"
targetNamespace="org.activiti.enginge.impl.webservice" xmlns:tns="org.activiti.enginge.impl.webservice"
xmlns:counter="http://webservice.activiti.org/">
<import importType="http://schemas.xmlsoap.org/wsdl/" location="http://localhost:63081/counter?wsdl"
namespace="http://webservice.activiti.org/" />
<process id="webServiceInvocationWithParametersFromTask">
<dataObject id="dataInputOfProcess" name="Input for webservice" itemSubjectRef="tns:setToRequestItem"/>
<startEvent id="theStart" />
<sequenceFlow id="flow1" sourceRef="theStart" targetRef="theScriptTask" />
<scriptTask id="theScriptTask" scriptFormat="groovy" name="Execute script">
<script>
def scriptVar = "10"
execution.setVariable("dataInputOfProcess", scriptVar)
</script>
</scriptTask>
<sequenceFlow id="flow1a" sourceRef="theScriptTask" targetRef="webService" />
<serviceTask id="webService" name="Call WS"
implementation="##WebService" operationRef="tns:setToOperation">
<!– The BPMN 2.0 Meta Model requires an Input/Output Specification –>
<ioSpecification>
<dataInput itemSubjectRef="tns:setToRequestItem" id="dataInputOfServiceTask" />
<inputSet>
<dataInputRefs>dataInputOfServiceTask</dataInputRefs>
</inputSet>
<outputSet />
</ioSpecification>
<dataInputAssociation>
<sourceRef>dataInputOfProcess</sourceRef>
<targetRef>dataInputOfServiceTask</targetRef>
<assignment>
<from>${dataInputOfProcess}</from>
<to>${dataInputOfServiceTask.value}</to>
</assignment>
</dataInputAssociation>
</serviceTask>
<sequenceFlow id="flow2" sourceRef="webService"
targetRef="waitState" />
<receiveTask id="waitState" />
<sequenceFlow id="flow3" sourceRef="waitState" targetRef="theEnd" />
<endEvent id="theEnd" />
</process>
<!– Interface: implementationRef = QName of WSDL Port Type –>
<interface name="Counter Interface" implementationRef="counter:Counter">
<!– Operation: implementationRef = QName of WSDL Operation –>
<operation id="setToOperation" name="setTo Operation"
implementationRef="counter:setTo">
<inMessageRef>tns:setToRequestMessage</inMessageRef>
</operation>
</interface>
<message id="setToRequestMessage" itemRef="tns:setToRequestItem" />
<itemDefinition id="setToRequestItem" structureRef="counter:setTo" /><!–
QName of input element –>
</definitions>
