cancel
Showing results for 
Search instead for 
Did you mean: 

activiti installation with oracle or mssql

dheuman
Champ in-the-making
Champ in-the-making
hi all,

i need help, my activiti installation don't work when i try to change the default db (H2) to mssql or oracle. I had read the guide many time but is not clear about this.

my sistem:
is a oracle linux.

my step:
1) installed jdk1.6
2) installed tomcat7.052 on /usr/share/apache-tomcat path (work fine)
3) downloaded activiti from main site
4) unziped the archive
5) deployed the war file (activiti-explorer.war) using the tomcat application manager (my link: http://192.168.0.245:8080/manager/html)
6) opened the link "http://192.168.0.245:8080/activiti-explorer/" and it work (can see login page and access using kermit/kermit)

now i tried to modified the db.properties file to configure a mssql or oracle connection

7) created a blank schema on oracle db (activiti) and create a database on mssql (both tested using oracle-developper-tool)
8 ) downloaded the JDBC Driver 4.0 (sqljdbc4.jar file) from http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=11774
9) downloaded the ojdbc6.jar from http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html
10) copy and paste both file to /usr/share/apache-tomcat-7.0.52/webapps/activiti-explorer/WEB-INF/lib/
11) edited the classes/db.properties file:
"db=mssql
jdbc.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
jdbc.url=jdbc:sqlserver://151.1.180.50:1433/activiti
jdbc.username=activiti
jdbc.password=activiti"

for mssql and

"db=oracle
jdbc.driver=oracle.jdbc.OracleDriver
jdbc.url=jdbcSmiley Surprisedracle:thin:@localhost:1521Smiley Surprisedrcl
jdbc.username=ACTIVITI
jdbc.password=ACTIVITI"

for oracle

12) via tomcat manager stop/start the application but none of this will work. Where am I wrong?

I can advise you to do a better step-by-step installation guide?

Thx advance
17 REPLIES 17

trademak
Star Contributor
Star Contributor
Hi,

Do you see an stack trace in the Tomcat log?

Best regards,

dheuman
Champ in-the-making
Champ in-the-making
hello again. Now work with oracle. I just change the "jdbc.driver=oracle.jdbc.OracleDriver" to dbc.driver=oracle.jdbc.driver.OracleDriver

Not work with SQL Server. This is my log file:
NOTE*= this is a new installation on windows server 2008 (jre 7, tomcat 7). I have both (linux/windows) system on.

[h3]tomcat7-stderr[/h3]SEVERE: The web application [/activiti-explorer] appears to have started a thread named [AWT-Windows] but has failed to stop it. This is very likely to create a memory leak.
mar 03, 2014 11:17:04 AM com.vaadin.event.ListenerMethod writeObject
WARNING: Error in serialization of the application: Class com.vaadin.ui.Panel must implement serialization.
mar 03, 2014 11:17:04 AM com.vaadin.event.ListenerMethod writeObject
WARNING: Error in serialization of the application: Class org.activiti.explorer.ui.MainWindow must implement serialization.
mar 03, 2014 11:17:04 AM com.vaadin.event.ListenerMethod writeObject
WARNING: Error in serialization of the application: Class com.vaadin.ui.Panel must implement serialization.
mar 03, 2014 11:17:04 AM com.vaadin.event.ListenerMethod writeObject
WARNING: Error in serialization of the application: Class com.vaadin.ui.Panel must implement serialization.
mar 03, 2014 11:17:04 AM com.vaadin.event.ListenerMethod writeObject
WARNING: Error in serialization of the application: Class com.vaadin.ui.Panel must implement serialization.
mar 03, 2014 11:17:04 AM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/activiti-explorer] registered the JDBC driver [oracle.jdbc.OracleDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
mar 03, 2014 11:18:16 AM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/activiti-explorer] registered the JDBC driver [oracle.jdbc.OracleDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
mar 03, 2014 11:27:07 AM org.apache.catalina.util.LifecycleBase start
INFO: The start() method was called on component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/activiti-explorer]] after start() had already been called. The second call will be ignored.
tInterceptor.execute(CommandContextInterceptor.java:57)
at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:47)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45)
at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31)
at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40)
at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:35)
at org.activiti.engine.impl.TaskServiceImpl.claim(TaskServiceImpl.java:160)
at org.activiti.explorer.demo.DemoDataGenerator$1.run(DemoDataGenerator.java:273)
at java.lang.Thread.run(Unknown Source)
Exception in thread "http-apr-8080-exec-23" java.lang.OutOfMemoryError: PermGen space

[h3]Catalina log[/h3]SEVERE: The web application [/activiti-explorer] appears to have started a thread named [AWT-Windows] but has failed to stop it. This is very likely to create a memory leak.
mar 03, 2014 11:17:04 AM com.vaadin.event.ListenerMethod writeObject
WARNING: Error in serialization of the application: Class com.vaadin.ui.Panel must implement serialization.
mar 03, 2014 11:17:04 AM com.vaadin.event.ListenerMethod writeObject
WARNING: Error in serialization of the application: Class org.activiti.explorer.ui.MainWindow must implement serialization.
mar 03, 2014 11:17:04 AM com.vaadin.event.ListenerMethod writeObject
WARNING: Error in serialization of the application: Class com.vaadin.ui.Panel must implement serialization.
mar 03, 2014 11:17:04 AM com.vaadin.event.ListenerMethod writeObject
WARNING: Error in serialization of the application: Class com.vaadin.ui.Panel must implement serialization.
mar 03, 2014 11:17:04 AM com.vaadin.event.ListenerMethod writeObject
WARNING: Error in serialization of the application: Class com.vaadin.ui.Panel must implement serialization.
mar 03, 2014 11:17:04 AM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/activiti-explorer] registered the JDBC driver [oracle.jdbc.OracleDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
mar 03, 2014 11:18:16 AM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/activiti-explorer] registered the JDBC driver [oracle.jdbc.OracleDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
mar 03, 2014 11:27:07 AM org.apache.catalina.util.LifecycleBase start
INFO: The start() method was called on component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/activiti-explorer]] after start() had already been called. The second call will be ignored.

[h3]localhost log file[/h3]mar 03, 2014 11:17:04 AM org.apache.catalina.session.StandardSession writeObject
WARNING: Cannot serialize session attribute notificationManager for session AA9F7DB39C2F6861A0B0102C12927EC2
java.io.NotSerializableException: org.activiti.spring.SpringProcessEngineConfiguration
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
………
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at java.util.LinkedList.writeObject(Unknown Source)
at sun.reflect.GeneratedMethodAccessor263.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
…….
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

mar 03, 2014 11:17:04 AM org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext
mar 03, 2014 11:17:16 AM org.apache.catalina.core.ApplicationContext log
INFO: No Spring WebApplicationInitializer types detected on classpath
mar 03, 2014 11:17:16 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
mar 03, 2014 11:18:16 AM org.apache.catalina.session.StandardSession writeObject

[h3]tomcat std output[/h3]11:17:31,239 [Thread-14] ERROR org.activiti.engine.impl.interceptor.CommandContext  - Error while closing command context
org.activiti.engine.ActivitiObjectNotFoundException: Cannot find task with id 6195
at org.activiti.engine.impl.cmd.NeedsActiveTaskCmd.execute(NeedsActiveTaskCmd.java:54)
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.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:47)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45)
at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31)
at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40)
at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:35)
at org.activiti.engine.impl.TaskServiceImpl.claim(TaskServiceImpl.java:160)
at org.activiti.explorer.demo.DemoDataGenerator$1.run(DemoDataGenerator.java:273)
at java.lang.Thread.run(Unknown Source)
….

aitor
Champ in-the-making
Champ in-the-making
Hello,

In step 7 you said:  created a <b>blank</b> schema on oracle db (activiti) …

Have you created the database structure with these scripts?

activiti-5.14\database\create\activiti.oracle.create.engine.sql
activiti-5.14\database\create\activiti.oracle.create.history.sql
activiti-5.14\database\create\activiti.oracle.create.identity.sql

dheuman
Champ in-the-making
Champ in-the-making
Hello.

No i didn't create any database structure in oracle but it works (just in oracle). I think, the first time that the application started, has created all the necessary structure.

I'm still trying to run activiti on mssql without success. I tried with ojdbc v.4, ojdbc v.3 and jTDS driver also. No one of this want to work.

aitor
Champ in-the-making
Champ in-the-making
Hello.

A works for me well. I have Oracle 10g. I added "ojdbc14.jar" in "WEB-INF\lib". My "WEB-INF\classes\db.properties" contains:

db = oracle
jdbc.driver = oracle.jdbc.OracleDriver
jdbc.url = jdbcSmiley Surprisedracle:thin:@192.168.2.1:1521:MYDB
jdbc.username = myuser
jdbc.password = mypwd

I ran the three scripts: create.engine, create.history and create.identity

dheuman
Champ in-the-making
Champ in-the-making
Hello. I said that work for me on oracle too. Not work on Microsoft Sql server.

dheuman
Champ in-the-making
Champ in-the-making
By the way i tested the driver (sqljdbc4.jar) using Netbeans and it's work (same connection string). Is activiti-explorer that does not want to work.

log file catalina.out:

….
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processEngine': FactoryBean threw exception on object creation; nested exception is org.activiti.engine.ActivitiException: couldn't create db schema: create unique index ACT_UNIQ_RU_BUS_KEY on ACT_RU_EXECUTION (PROC_DEF_ID_, BUSINESS_KEY_) where BUSINESS_KEY_ is not null
…. … 45 more
Caused by: org.activiti.engine.ActivitiException: couldn't create db schema: create unique index ACT_UNIQ_RU_BUS_KEY on ACT_RU_EXECUTION (PROC_DEF_ID_, BUSINESS_KEY_) where BUSINESS_KEY_ is not null
….

using my database Client (oracle sql developer) i opened the file "activiti.mssql.create.engine.sql" located in "…./activiti-5.14/database/create/" path and run it as script.
The output is:

….. (many create table)
create unique index ACT_UNIQ_RU_BUS_KEY on ACT_RU_EXECUTION (PROC_DEF_ID_, BUSINESS_KEY_) where BUSINESS_KEY_ is not null
Error row 172 column : 1
Errore SQL: Incorrect syntax near the keyword 'where'.
…..

Any Idea would be appreciated
Thx

frederikherema1
Star Contributor
Star Contributor
Are you sure activiti explorer is using the correct database-type?

dheuman
Champ in-the-making
Champ in-the-making
I think so, the sql query above is located in "activiti.mssql.create.engine.sql" file.