I need to know how we can manage tablespace with oracle db as database for activiti enterpirse. I found we have no way to configure in activiti.
Yes It worked. This is what I did.
Thank you very much.
Not sure what you mean.
Can you provide more details.
Thanks,Greg
Are you questioning how to specify the user and schema of Oracle database, not the tablespace?If you specify the user and schema of Oracle database, tablespace is determined automatically from the user and schema.
If you want to specify the user and schema of Oracle database, you should use setDataSource(DataSource dataSource) and setDatabaseSchema(String databaseSchema).
・setDataSource(DataSource dataSource) or setDataSourceJndiName(String dataSourceJndiName)https://www.activiti.org/javadocs/org/activiti/engine/ProcessEngineConfiguration.html#setDataSource-javax.sql.DataSource-https://www.activiti.org/javadocs/org/activiti/engine/ProcessEngineConfiguration.html#setDataSourceJndiName-java.lang.String-
・setDatabaseSchema(String databaseSchema)https://www.activiti.org/javadocs/org/activiti/engine/ProcessEngineConfiguration.html#databaseSchema
I'm creating a user named test2 and granting it dba permissions. Now I created a new tablespace test1 of size 100M and set it as default tablespace for test2 user.
Before starting activiti I have my activity app configured with properties-
datasource.driver=oracle.jdbc.driver.OracleDriverdatasource.url=jdbcracle:thin:@localhost:1521rcldatasource.username=test2datasource.password=test2
with oracle dialect.
Now I'am starting the activiti and it starts initializing by creating its tables but fails to startup as it is throwing SQLException
Table doesn't get created ACT_GE_PROPERTY in the database. but when I query 'desc model' in database it finds model table , I don't understand why activity is not creating this table with all the other tables.
Thank you for your all stack trace and I understood the cause.
But, if you use activiti-explorer, it is difficult to resolve the problem.
If you use directly activiti-engine, you can use setDatabaseSchema(String databaseSchema).If you use activiti-explorer, you cannot set databaseSchema.https://www.activiti.org/javadocs/org/activiti/engine/ProcessEngineConfiguration.html#databaseSchema
If you use activiti-explorer and want to resolve this problem, you limit the user's(test2) authority, not use dba permissions.
The causeActiviti engine check which the table already exists in the database by using your datasource setting.Your datasource setting contains dba permissions and activiti engine can get information on tables of other schemas and mistakenly judge that the table has already been created.
If you set datasource and schema, activiti engine can get information on tables of only your schema and don't mistakenly judge.
> If you use activiti-explorer, you cannot set databaseSchema.
Perhaps, you can specify the schema by changing the following settings.activiti-rest/WEB-INF/classes/META-INF/activiti-rest/activiti-custom-context.xml
<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration"><property name="databaseSchema" ref="test2" /> <property name="dataSource" ref="dataSource" /><property name="transactionManager" ref="transactionManager" /> <property name="databaseSchemaUpdate" value="true" /> <property name="mailServerHost" value="localhost" /> <property name="mailServerPort" value="5025" /> <property name="historyLevel" value="full" /> <property name="jobExecutorActivate" value="false" /> <property name="asyncExecutorEnabled" value="false" /> <property name="asyncExecutorActivate" value="false" /></bean>
<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
<property name="databaseSchema" ref="test2" /> <property name="dataSource" ref="dataSource" />
<property name="transactionManager" ref="transactionManager" /> <property name="databaseSchemaUpdate" value="true" /> <property name="mailServerHost" value="localhost" /> <property name="mailServerPort" value="5025" /> <property name="historyLevel" value="full" /> <property name="jobExecutorActivate" value="false" /> <property name="asyncExecutorEnabled" value="false" /> <property name="asyncExecutorActivate" value="false" /></bean>
Or, you may resolve to set schemaUpdate setting as false.activiti-rest/WEB-INF/classes/META-INF/activiti-rest/engine.propertiesengine.schema.update=true
thanks daisuke-yoshimoto, I am using enterprise version so I changed it through java configuration and it worked for me.