I would like to execute a process which is in Camunda from an external program by using Java API with ProcessEngine. I have seen in the documentation that with ProcessEngine I can use "jdbc:h2:tcp://localhost/camunda" like indicate in url: http://docs.camunda.org/latest/guides/user-guide/
I show my exemple:
public static void main( String[] args )
{
....
ProcessEngine processEngine = ProcessEngineConfiguration.createStandaloneInMemProcessEngineConfiguration()
.setJdbcDriver("org.h2.Driver")
.setJdbcUrl("jdbc:h2:tcp://localhost:16000/camunda")
.setJdbcUsername("demo")
.setJdbcPassword("demo")
.buildProcessEngine();
....
}
When I execute the program, I have this error after a few seconds:
org.h2.jdbc.JdbcSQLException: Connection is broken: "java.io.EOFException: localhost:16000" [90067-176]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:344)
at org.h2.message.DbException.get(DbException.java:167)
at org.h2.engine.SessionRemote.connectServer(SessionRemote.java:434)
at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:311)
at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:107)
at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:91)
at org.h2.Driver.connect(Driver.java:74)
at java.sql.DriverManager.getConnection(DriverManager.java:579)
at java.sql.DriverManager.getConnection(DriverManager.java:190)
at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.doGetConnection(UnpooledDataSource.java:181)
at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.doGetConnection(UnpooledDataSource.java:176)
at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.getConnection(UnpooledDataSource.java:80)
at org.apache.ibatis.datasource.pooled.PooledDataSource.popConnection(PooledDataSource.java:371)
at org.apache.ibatis.datasource.pooled.PooledDataSource.getConnection(PooledDataSource.java:80)
at org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl.initDatabaseType(ProcessEngineConfigurationImpl.java:660)
at org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl.initDataSource(ProcessEngineConfigurationImpl.java:622)
at org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl.init(ProcessEngineConfigurationImpl.java:409)
at org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:380)
at com.test.mavenproject4.App.main(App.java:76)
Caused by: java.io.EOFException
at java.io.DataInputStream.readInt(DataInputStream.java:392)
at org.h2.value.Transfer.readInt(Transfer.java:157)
at org.h2.engine.SessionRemote.done(SessionRemote.java:599)
at org.h2.engine.SessionRemote.initTransfer(SessionRemote.java:119)
at org.h2.engine.SessionRemote.connectServer(SessionRemote.java:430)
... 16 more
is something wrong in JdbcUrl???
OR are there another way to indicate the url in ProcessEngine for using the good camunda plaform where are all process?
Thank you for your help
ProcessEngineConfiguration.createStandaloneInMemProcessEngineConfiguration
OR are there another way to indicate the url in ProcessEngine for using the good camunda plaform where are all process?