AnsweredAssumed Answered

Exception starting Tomcat with Oracle DB in Activiti-5.0.rc1

Question asked by gerry.fisher on Nov 4, 2010
Latest reply on Nov 4, 2010 by frederikheremans1
OS: Windows XP
Activiti version: 5.0.rc1
Tomcat version: 6.0.29
Oracle version: 9.1
JDBC Driver version: 11.1.0.6.0 (ojdbc5.jar)

I have, after some tweaking of setup/build.xml, created a database, which I have named 'ACTIVITI', and populated the ACT_ID_GROUP, ACT_ID_MEMBERSHIP and ACT_ID_USER tables successfully.
However, Tomcat is throwing an exception when trying to deploy activiti-webapp-init. Here's a snippet of the console dump:


04-Nov-2010 12:07:40 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory activiti-webapp-init
org.apache.ibatis.exceptions.PersistenceException:
### Error opening session.  Cause: org.h2.jdbc.JdbcSQLException: Connection is broken: "session closed" [90067-132]
### The error may exist in org/activiti/db/ibatis/variable.mapping.xml
### The error occurred while processing mapper_resultMap[byteArrayResultMap_postgres]
### Cause: org.h2.jdbc.JdbcSQLException: Connection is broken: "session closed" [90067-132]
        at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:8)
        at org.apache.ibatis.session.defaults.DefaultSqlSessionFactory.openSessionFromDataSource(DefaultSqlSessionFactory.java:81)
        at org.apache.ibatis.session.defaults.DefaultSqlSessionFactory.openSession(DefaultSqlSessionFactory.java:40)
        at org.activiti.engine.impl.db.DbSqlSessionFactory.dbSchemaCheckVersion(DbSqlSessionFactory.java:229)
        at org.activiti.engine.impl.ProcessEngineImpl.performSchemaOperationsCreate(ProcessEngineImpl.java:102)
        at org.activiti.engine.impl.ProcessEngineImpl$1.execute(ProcessEngineImpl.java:70)
        at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:22)
        at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:36)
        at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
        at org.activiti.engine.impl.ProcessEngineImpl.<init>(ProcessEngineImpl.java:68)
        at org.activiti.engine.impl.cfg.ProcessEngineConfiguration.buildProcessEngine(ProcessEngineConfiguration.java:302)
        at org.activiti.engine.ProcessEngineBuilder.buildProcessEngine(ProcessEngineBuilder.java:272)
        at org.activiti.engine.ProcessEngines.buildProcessEngine(ProcessEngines.java:150)
        at org.activiti.engine.ProcessEngines.initProcessEnginFromResource(ProcessEngines.java:124)
        at org.activiti.engine.ProcessEngines.init(ProcessEngines.java:83)
        at org.activiti.impl.servlet.listener.ProcessEnginesServletContextListener.contextInitialized(ProcessEnginesServletContextListener.java:30)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)

1. For a start, I'm running an Oracle database and so the exception is being thrown by an incorrect class - org.h2.jdbc.JdbcSQLException.
2. On line 5, the suggested error location, org/activiti/db/ibatis/variable.mapping.xml, is in activiti-engine-5.0.rc1.jar.

My guess is that iBatis is attempting to insert a record into a H2 table. My question is: How do I get the 'application' to work with Oracle instead?
Although I tweaked build.xml to integrate Oracle, I'm assuming that I haven't missed out any other changes since the source of the problem lies in activiti-engine-5.0.rc1.jar. I imagine that there are some hard-coded values in activiti-engine-5.0.rc1.jar that should instead be configurable.

Outcomes