activiti.cfg
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-18-2014 02:36 PM
I'm trying to create a standalone engine, using the following code to access the H2 DB:
ProcessEngine processEngine = ProcessEngineConfiguration
.createStandaloneProcessEngineConfiguration()
.buildProcessEngine();
I installed the H2 DB myself (couldn't get the demo.start working) and was getting the problem that the tables aren't set up.
So I've added <property name="databaseSchemaUpdate" value="true" />
I tried installing version 5.9 in hope of getting the examples working and now, even after I've removed the directory, I'm getting the message:
org.activiti.engine.ActivitiWrongDbException: version mismatch: activiti library version is '5.13', db version is 5.9 Hint: Set <property name="databaseSchemaUpdate" to value="true" or value="create-drop" (use create-drop for testing only!) in bean processEngineConfiguration in activiti.cfg.xml for automatic schema creation
at org.activiti.engine.impl.db.DbSqlSession.dbSchemaCheckVersion(DbSqlSession.java:598)
It seems like there's a cfg file I'm hitting, not hitting my own file. I've got my own cfg file in my classpath, moved to the top so that it ought to get loaded first.
Am I missing something?
Thanks,
Axel
ProcessEngine processEngine = ProcessEngineConfiguration
.createStandaloneProcessEngineConfiguration()
.buildProcessEngine();
I installed the H2 DB myself (couldn't get the demo.start working) and was getting the problem that the tables aren't set up.
So I've added <property name="databaseSchemaUpdate" value="true" />
I tried installing version 5.9 in hope of getting the examples working and now, even after I've removed the directory, I'm getting the message:
org.activiti.engine.ActivitiWrongDbException: version mismatch: activiti library version is '5.13', db version is 5.9 Hint: Set <property name="databaseSchemaUpdate" to value="true" or value="create-drop" (use create-drop for testing only!) in bean processEngineConfiguration in activiti.cfg.xml for automatic schema creation
at org.activiti.engine.impl.db.DbSqlSession.dbSchemaCheckVersion(DbSqlSession.java:598)
It seems like there's a cfg file I'm hitting, not hitting my own file. I've got my own cfg file in my classpath, moved to the top so that it ought to get loaded first.
Am I missing something?
Thanks,
Axel
Labels:
- Labels:
-
Archive
4 REPLIES 4
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2014 02:18 AM
Hi Axel,
Regards
Martin
activiti library version is '5.13', db version is 5.9It seems that you are trying to run 5.13 libraries on the Database schema version 5.9. -> It should be in sync.
I'm trying to create a standalone engine, using the following code to access the H2 DB:Process engine is instantiated in almost each jUnit test in activiti project. Try to find it.
Regards
Martin
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2014 10:16 AM
Hi Martin,
Thanks for getting back to me so quick. I know how to instantiate the engine, and, in fact I've gotten around my problem (but would like to understand better what's going on) by using ProcessEngine processEngine = ProcessEngineConfiguration.createStandaloneProcessEngineConfiguration().setJdbcUrl( "jdbc:h2:tcp://localhost/~/test").setDatabaseSchemaUpdate("true").buildProcessEngine();
This points me at the H2 DB I want to use. But I'd still like to understand where the default cfg file is and why I can't get my own file to work even though I've got in my class path. Is it in the activiti.jar?
Thanks,
Axel
Thanks for getting back to me so quick. I know how to instantiate the engine, and, in fact I've gotten around my problem (but would like to understand better what's going on) by using ProcessEngine processEngine = ProcessEngineConfiguration.createStandaloneProcessEngineConfiguration().setJdbcUrl( "jdbc:h2:tcp://localhost/~/test").setDatabaseSchemaUpdate("true").buildProcessEngine();
This points me at the H2 DB I want to use. But I'd still like to understand where the default cfg file is and why I can't get my own file to work even though I've got in my class path. Is it in the activiti.jar?
Thanks,
Axel
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2014 02:41 AM
Hi Axel,
Another method for creating process engine configuration should be used to apply activiti.cfg.xml
Regards
Martin
Another method for creating process engine configuration should be used to apply activiti.cfg.xml
public static ProcessEngineConfiguration createProcessEngineConfigurationFromResourceDefault() {
return createProcessEngineConfigurationFromResource("activiti.cfg.xml", "processEngineConfiguration");
}
public static ProcessEngineConfiguration createProcessEngineConfigurationFromResource(String resource) {
return createProcessEngineConfigurationFromResource(resource, "processEngineConfiguration");
}
Regards
Martin
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2014 01:21 PM
Ok, sounds good will try that.
Thanks
Thanks
