cancel
Showing results for 
Search instead for 
Did you mean: 

Installation problem Activiti 5.11

jbbond
Champ in-the-making
Champ in-the-making
Hi,

I am trying to install Activiti 5.11 and get the following error. I have tried a few times but no success.

org.h2.jdbc.JdbcSQLException: Connection is broken: "java.net.ConnectException: Connection refused: connect: localhost" [90067-168]
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
        at org.h2.message.DbException.get(DbException.java:158)
        at org.h2.engine.SessionRemote.connectServer(SessionRemote.java:399)
        at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:287)
        at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:108)
        at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:92)
        at org.h2.Driver.connect(Driver.java:72)
        at org.springframework.jdbc.datasource.SimpleDriverDataSource.getConnectionFromDriver(SimpleDriverDataSource.java:140)
        at org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnectionFromDriver(AbstractDriverBasedDataSource.java:149)
        at org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnection(AbstractDriverBasedDataSource.java:119)
        at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111)
        at org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy$TransactionAwareInvocationHandler.invoke(TransactionAwareDataSourceProxy.java:224)
        at $Proxy8.getMetaData(Unknown Source)
        at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.initDatabaseType(ProcessEngineConfigurationImpl.java:526)
        at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.initDataSource(ProcessEngineConfigurationImpl.java:487)
        at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.init(ProcessEngineConfigurationImpl.java:332)
        at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:310)
        at org.activiti.spring.SpringProcessEngineConfiguration.buildProcessEngine(SpringProcessEngineConfiguration.java:60)
        at org.activiti.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:56)
        at org.activiti.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:32)
        at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142)
        at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:102)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1442)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:248)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:424)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:414)
        at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1163)
        at org.activiti.spring.SpringConfigurationHelper.buildProcessEngine(SpringConfigurationHelper.java:38)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.activiti.engine.ProcessEngines.initProcessEngineFromSpringResource(ProcessEngines.java:122)
        at org.activiti.engine.ProcessEngines.init(ProcessEngines.java:109)
        at org.activiti.engine.ProcessEngines.getProcessEngine(ProcessEngines.java:224)
        at org.activiti.engine.ProcessEngines.getDefaultProcessEngine(ProcessEngines.java:217)
        at org.activiti.rest.servlet.ActivitiServletContextListener.contextInitialized(ActivitiServletContextListener.java:39)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4887)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5381)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:977)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1655)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
Caused by: java.net.ConnectException: Connection refused: connect
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
        at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
        at java.net.Socket.connect(Socket.java:529)
        at org.h2.util.NetUtils.createSocket(NetUtils.java:119)
        at org.h2.util.NetUtils.createSocket(NetUtils.java:100)
        at org.h2.engine.SessionRemote.initTransfer(SessionRemote.java:93)
        at org.h2.engine.SessionRemote.connectServer(SessionRemote.java:395)
        … 49 more
Apr 30, 2013 4:14:34 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.activiti.rest.servlet.ActivitiServletContextListener
org.activiti.engine.ActivitiException: couldn't initialize process engine from spring configuration resource file:/C:/Activiti%20engine/activiti-5.11/apache-tomcat-7.0.39/webapps/activiti-rest/WEB-INF
/classes/activiti-context.xml: null
        at org.activiti.engine.ProcessEngines.initProcessEngineFromSpringResource(ProcessEngines.java:130)
        at org.activiti.engine.ProcessEngines.init(ProcessEngines.java:109)
        at org.activiti.engine.ProcessEngines.getProcessEngine(ProcessEngines.java:224)
        at org.activiti.engine.ProcessEngines.getDefaultProcessEngine(ProcessEngines.java:217)
        at org.activiti.rest.servlet.ActivitiServletContextListener.contextInitialized(ActivitiServletContextListener.java:39)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4887)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5381)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:977)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1655)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.activiti.engine.ProcessEngines.initProcessEngineFromSpringResource(ProcessEngines.java:122)
        … 18 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processEngine': FactoryBean threw exception on object creation; nested exception is org.springframewo
rk.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is org.h2.jdbc.JdbcSQLException: Connection is broken: "java.net.ConnectException: Con
nection refused: connect: localhost" [90067-168]
        at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:149)
        at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:102)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1442)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:248)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:424)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:414)
        at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1163)
        at org.activiti.spring.SpringConfigurationHelper.buildProcessEngine(SpringConfigurationHelper.java:38)
        … 23 more
Caused by: org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is org.h2.jdbc.JdbcSQLException: Connection is broken: "ja
va.net.ConnectException: Connection refused: connect: localhost" [90067-168]
        at org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin(DataSourceTransactionManager.java:240)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:371)
        at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:127)
        at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:40)
        at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:32)
        at org.activiti.engine.impl.ProcessEngineImpl.<init>(ProcessEngineImpl.java:75)
        at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:311)
        at org.activiti.spring.SpringProcessEngineConfiguration.buildProcessEngine(SpringProcessEngineConfiguration.java:60)
        at org.activiti.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:56)
        at org.activiti.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:32)
        at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142)
        … 31 more
Caused by: org.h2.jdbc.JdbcSQLException: Connection is broken: "java.net.ConnectException: Connection refused: connect: localhost" [90067-168]
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
        at org.h2.message.DbException.get(DbException.java:158)
        at org.h2.engine.SessionRemote.connectServer(SessionRemote.java:399)
        at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:287)
        at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:108)
        at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:92)
        at org.h2.Driver.connect(Driver.java:72)
        at org.springframework.jdbc.datasource.SimpleDriverDataSource.getConnectionFromDriver(SimpleDriverDataSource.java:140)
        at org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnectionFromDriver(AbstractDriverBasedDataSource.java:149)
        at org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnection(AbstractDriverBasedDataSource.java:119)
        at org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin(DataSourceTransactionManager.java:202)
        … 41 more
Caused by: java.net.ConnectException: Connection refused: connect
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
        at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
        at java.net.Socket.connect(Socket.java:529)
        at org.h2.util.NetUtils.createSocket(NetUtils.java:119)
        at org.h2.util.NetUtils.createSocket(NetUtils.java:100)
        at org.h2.engine.SessionRemote.initTransfer(SessionRemote.java:93)
        at org.h2.engine.SessionRemote.connectServer(SessionRemote.java:395)
        … 49 more
Apr 30, 2013 4:14:34 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Apr 30, 2013 4:14:34 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/activiti-rest] startup failed due to previous errors
Apr 30, 2013 4:14:34 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/activiti-rest] registered the JDBC driver [org.h2.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has
been forcibly unregistered.
Apr 30, 2013 4:14:34 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/activiti-rest] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@10a69f0]) and a value of type [org.apache.ibatis.executor.Erro
rContext] (value [
### The error may exist in org/activiti/db/mapping/entity/EventSubscription.xml
### The error occurred while processing mapper_resultMap[compensateResultMap]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid
a probable memory leak.


Thanks.
7 REPLIES 7

trademak
Star Contributor
Star Contributor
Ehm, it says that it can't reach your standalone local H2 database. Do you have one running?

Best regards,

logic3
Champ in-the-making
Champ in-the-making
I thought it starts automatically when I run the tomcat after coping the war files.  Is there any way to start the database ?

cheers

trademak
Star Contributor
Star Contributor
That's true for the Activiti Explorer, because it uses an in-memory database by default. For the REST app that's not true, this uses a standalone H2 database by default and you have to install and start it yourself. You can of course also change the db config of the REST API, but it doesn't make a lot of sense to use an in-memory database for the REST app.

Best regards,

jbbond
Champ in-the-making
Champ in-the-making
Thanks guys.
I will try installing standalone H2 database for the REST and see if this helps. Otherwise, i do not see any other solution

jbbond
Champ in-the-making
Champ in-the-making
I followed the instruction (http://bpmn20inaction.blogspot.co.uk/) and installed the h2 database but still not success

<code>org.h2.jdbc.JdbcSQLException: IO Exception: "java.io.FileNotFoundException: C:\Program Files\H2\bin\activiti.lock.db (Access is denied)"; "C:/Program Files/H2/bin/activiti.lock.db" [90031-170]
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
        at org.h2.message.DbException.get(DbException.java:158)
        at org.h2.message.DbException.convertIOException(DbException.java:315)
        at org.h2.store.fs.FilePathDisk.newOutputStream(FilePathDisk.java:265)
        at org.h2.store.fs.FileUtils.newOutputStream(FileUtils.java:223)
        at org.h2.store.FileLock.save(FileLock.java:198)
        at org.h2.store.FileLock.lockFile(FileLock.java:334)
        at org.h2.store.FileLock.lock(FileLock.java:129)
        at org.h2.engine.Database.open(Database.java:541)
        at org.h2.engine.Database.openDatabase(Database.java:221)
        at org.h2.engine.Database.<init>(Database.java:216)
        at org.h2.engine.Engine.openSession(Engine.java:56)
        at org.h2.engine.Engine.openSession(Engine.java:159)
        at org.h2.engine.Engine.createSessionAndValidate(Engine.java:138)
        at org.h2.engine.Engine.createSession(Engine.java:121)
        at org.h2.server.TcpServerThread.run(TcpServerThread.java:136)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: C:\Program Files\H2\bin\activiti.lock.db (Access is denied)
        at java.io.FileOutputStream.open(Native Method)
        at java.io.FileOutputStream.<init>(Unknown Source)
        at java.io.FileOutputStream.<init>(Unknown Source)
        at org.h2.store.fs.FilePathDisk.newOutputStream(FilePathDisk.java:257)
        … 13 more

        at org.h2.engine.SessionRemote.done(SessionRemote.java:567)
        at org.h2.engine.SessionRemote.initTransfer(SessionRemote.java:111)
        at org.h2.engine.SessionRemote.connectServer(SessionRemote.java:395)
        at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:287)
        at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:108)
        at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:92)
        at org.h2.Driver.connect(Driver.java:72)
        at org.springframework.jdbc.datasource.SimpleDriverDataSource.getConnectionFromDriver(SimpleDriverDataSource.java:140)
        at org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnectionFromDriver(AbstractDriverBasedDataSource.java:149)
        at org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnection(AbstractDriverBasedDataSource.java:119)
        at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111)
        at org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy$TransactionAwareInvocationHandler.invoke(TransactionAwareDataSourceProxy.java:224)
        at $Proxy8.getMetaData(Unknown Source)
        at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.initDatabaseType(ProcessEngineConfigurationImpl.java:526)
        at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.initDataSource(ProcessEngineConfigurationImpl.java:487)
        at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.init(ProcessEngineConfigurationImpl.java:332)
        at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:310)
        at org.activiti.spring.SpringProcessEngineConfiguration.buildProcessEngine(SpringProcessEngineConfiguration.java:60)
        at org.activiti.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:56)
        at org.activiti.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:32)
        at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142)
        at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:102)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1442)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:248)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:424)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:414)
        at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1163)
        at org.activiti.spring.SpringConfigurationHelper.buildProcessEngine(SpringConfigurationHelper.java:38)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.activiti.engine.ProcessEngines.initProcessEngineFromSpringResource(ProcessEngines.java:122)
        at org.activiti.engine.ProcessEngines.init(ProcessEngines.java:109)
        at org.activiti.engine.ProcessEngines.getProcessEngine(ProcessEngines.java:224)
        at org.activiti.engine.ProcessEngines.getDefaultProcessEngine(ProcessEngines.java:217)
        at org.activiti.rest.servlet.ActivitiServletContextListener.contextInitialized(ActivitiServletContextListener.java:39)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4887)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5381)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:977)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1655)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
May 1, 2013 11:40:54 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.activiti.rest.servlet.ActivitiServletContextListener
org.activiti.engine.ActivitiException: couldn't initialize process engine from spring configuration resource file:/C:/Activiti%20engine/activiti-5.11/apache-tomcat-7.0.39/webapps/activiti-rest/WEB-INF
/classes/activiti-context.xml: null
        at org.activiti.engine.ProcessEngines.initProcessEngineFromSpringResource(ProcessEngines.java:130)
        at org.activiti.engine.ProcessEngines.init(ProcessEngines.java:109)
        at org.activiti.engine.ProcessEngines.getProcessEngine(ProcessEngines.java:224)
        at org.activiti.engine.ProcessEngines.getDefaultProcessEngine(ProcessEngines.java:217)
        at org.activiti.rest.servlet.ActivitiServletContextListener.contextInitialized(ActivitiServletContextListener.java:39)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4887)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5381)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:977)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1655)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.activiti.engine.ProcessEngines.initProcessEngineFromSpringResource(ProcessEngines.java:122)
        … 18 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processEngine': FactoryBean threw exception on object creation; nested exception is org.springframewo
rk.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is org.h2.jdbc.JdbcSQLException: IO Exception: "java.io.FileNotFoundException: C:\Prog
ram Files\H2\bin\activiti.lock.db (Access is denied)"; "C:/Program Files/H2/bin/activiti.lock.db" [90031-170]
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
        at org.h2.message.DbException.get(DbException.java:158)
        at org.h2.message.DbException.convertIOException(DbException.java:315)
        at org.h2.store.fs.FilePathDisk.newOutputStream(FilePathDisk.java:265)
        at org.h2.store.fs.FileUtils.newOutputStream(FileUtils.java:223)
        at org.h2.store.FileLock.save(FileLock.java:198)
        at org.h2.store.FileLock.lockFile(FileLock.java:334)
        at org.h2.store.FileLock.lock(FileLock.java:129)
        at org.h2.engine.Database.open(Database.java:541)
        at org.h2.engine.Database.openDatabase(Database.java:221)
        at org.h2.engine.Database.<init>(Database.java:216)
        at org.h2.engine.Engine.openSession(Engine.java:56)
        at org.h2.engine.Engine.openSession(Engine.java:159)
        at org.h2.engine.Engine.createSessionAndValidate(Engine.java:138)
        at org.h2.engine.Engine.createSession(Engine.java:121)
        at org.h2.server.TcpServerThread.run(TcpServerThread.java:136)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: C:\Program Files\H2\bin\activiti.lock.db (Access is denied)
        at java.io.FileOutputStream.open(Native Method)
        at java.io.FileOutputStream.<init>(Unknown Source)
        at java.io.FileOutputStream.<init>(Unknown Source)
        at org.h2.store.fs.FilePathDisk.newOutputStream(FilePathDisk.java:257)
        … 13 more

        at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:149)
        at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:102)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1442)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:248)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:424)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:414)
        at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1163)
        at org.activiti.spring.SpringConfigurationHelper.buildProcessEngine(SpringConfigurationHelper.java:38)
        … 23 more
Caused by: org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is org.h2.jdbc.JdbcSQLException: IO Exception: "java.io.Fi
leNotFoundException: C:\Program Files\H2\bin\activiti.lock.db (Access is denied)"; "C:/Program Files/H2/bin/activiti.lock.db" [90031-170]
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
        at org.h2.message.DbException.get(DbException.java:158)
        at org.h2.message.DbException.convertIOException(DbException.java:315)
        at org.h2.store.fs.FilePathDisk.newOutputStream(FilePathDisk.java:265)
        at org.h2.store.fs.FileUtils.newOutputStream(FileUtils.java:223)
        at org.h2.store.FileLock.save(FileLock.java:198)
        at org.h2.store.FileLock.lockFile(FileLock.java:334)
        at org.h2.store.FileLock.lock(FileLock.java:129)
        at org.h2.engine.Database.open(Database.java:541)
        at org.h2.engine.Database.openDatabase(Database.java:221)
        at org.h2.engine.Database.<init>(Database.java:216)
        at org.h2.engine.Engine.openSession(Engine.java:56)
        at org.h2.engine.Engine.openSession(Engine.java:159)
        at org.h2.engine.Engine.createSessionAndValidate(Engine.java:138)
        at org.h2.engine.Engine.createSession(Engine.java:121)
        at org.h2.server.TcpServerThread.run(TcpServerThread.java:136)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: C:\Program Files\H2\bin\activiti.lock.db (Access is denied)
        at java.io.FileOutputStream.open(Native Method)
        at java.io.FileOutputStream.<init>(Unknown Source)
        at java.io.FileOutputStream.<init>(Unknown Source)
        at org.h2.store.fs.FilePathDisk.newOutputStream(FilePathDisk.java:257)
        … 13 more

        at org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin(DataSourceTransactionManager.java:240)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:371)
        at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:127)
        at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:40)
        at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:32)
        at org.activiti.engine.impl.ProcessEngineImpl.<init>(ProcessEngineImpl.java:75)
        at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:311)
        at org.activiti.spring.SpringProcessEngineConfiguration.buildProcessEngine(SpringProcessEngineConfiguration.java:60)
        at org.activiti.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:56)
        at org.activiti.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:32)
        at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142)
        … 31 more
Caused by: org.h2.jdbc.JdbcSQLException: IO Exception: "java.io.FileNotFoundException: C:\Program Files\H2\bin\activiti.lock.db (Access is denied)"; "C:/Program Files/H2/bin/activiti.lock.db" [90031-1
70]
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
        at org.h2.message.DbException.get(DbException.java:158)
        at org.h2.message.DbException.convertIOException(DbException.java:315)
        at org.h2.store.fs.FilePathDisk.newOutputStream(FilePathDisk.java:265)
        at org.h2.store.fs.FileUtils.newOutputStream(FileUtils.java:223)
        at org.h2.store.FileLock.save(FileLock.java:198)
        at org.h2.store.FileLock.lockFile(FileLock.java:334)
        at org.h2.store.FileLock.lock(FileLock.java:129)
        at org.h2.engine.Database.open(Database.java:541)
        at org.h2.engine.Database.openDatabase(Database.java:221)
        at org.h2.engine.Database.<init>(Database.java:216)
        at org.h2.engine.Engine.openSession(Engine.java:56)
        at org.h2.engine.Engine.openSession(Engine.java:159)
        at org.h2.engine.Engine.createSessionAndValidate(Engine.java:138)
        at org.h2.engine.Engine.createSession(Engine.java:121)
        at org.h2.server.TcpServerThread.run(TcpServerThread.java:136)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: C:\Program Files\H2\bin\activiti.lock.db (Access is denied)
        at java.io.FileOutputStream.open(Native Method)
        at java.io.FileOutputStream.<init>(Unknown Source)
        at java.io.FileOutputStream.<init>(Unknown Source)
        at org.h2.store.fs.FilePathDisk.newOutputStream(FilePathDisk.java:257)
        … 13 more

        at org.h2.engine.SessionRemote.done(SessionRemote.java:567)
        at org.h2.engine.SessionRemote.initTransfer(SessionRemote.java:111)
        at org.h2.engine.SessionRemote.connectServer(SessionRemote.java:395)
        at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:287)
        at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:108)
        at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:92)
        at org.h2.Driver.connect(Driver.java:72)
        at org.springframework.jdbc.datasource.SimpleDriverDataSource.getConnectionFromDriver(SimpleDriverDataSource.java:140)
        at org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnectionFromDriver(AbstractDriverBasedDataSource.java:149)
        at org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnection(AbstractDriverBasedDataSource.java:119)
        at org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin(DataSourceTransactionManager.java:202)
        … 41 more
May 1, 2013 11:40:55 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
May 1, 2013 11:40:55 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/activiti-rest] startup failed due to previous errors
May 1, 2013 11:40:55 AM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/activiti-rest] registered the JDBC driver [org.h2.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has
been forcibly unregistered.
May 1, 2013 11:40:55 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/activiti-rest] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@16bbeaf]) and a value of type [org.apache.ibatis.executor.Erro
rContext] (value [
### The error may exist in org/activiti/db/mapping/entity/EventSubscription.xml
### The error occurred while processing mapper_resultMap[compensateResultMap]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid
a probable memory leak.
May 1, 2013 11:40:55 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Activiti engine\activiti-5.11\apache-tomcat-7.0.39\webapps\docs
May 1, 2013 11:40:55 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Activiti engine\activiti-5.11\apache-tomcat-7.0.39\webapps\examples
May 1, 2013 11:40:55 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Activiti engine\activiti-5.11\apache-tomcat-7.0.39\webapps\host-manager
May 1, 2013 11:40:55 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Activiti engine\activiti-5.11\apache-tomcat-7.0.39\webapps\manager
May 1, 2013 11:40:55 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Activiti engine\activiti-5.11\apache-tomcat-7.0.39\webapps\ROOT
May 1, 2013 11:40:55 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-apr-8080"]
May 1, 2013 11:40:55 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-apr-8009"]
May 1, 2013 11:40:55 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 14093 ms
</code>

trademak
Star Contributor
Star Contributor
It's giving an access denied exception as you can see. Do you have file security settings on your system? Maybe also install H2 in a directory without spaces just to be sure.

Best regards,

jbbond
Champ in-the-making
Champ in-the-making
Thanks. The error disappeared.