-
1. Re: connecting with oracle db
alal007 Oct 10, 2005 4:57 PM (in response to alal007)When I searched in thi sforum i realized various people faced different problem when persisting in oracle db. In manual/tutorail very bare minimal steps is given to mak eit work with oracle db.
I think it on purpose so that people /companies likey to buy paid tech support from jboss
any comments?? -
2. Re: connecting with oracle db
alal007 Oct 10, 2005 6:45 PM (in response to alal007)I am still not able to run
ant oracle.scripts.
Still getting above errors
For others who are having same issue
1. I am able to create/drop/recreate by manuuly running main program under jbpmSchema.java
2. Specify oralcles's calsses12.jar in lib path
3. change hibernate.properties to
hibernate.dialect=org.hibernate.dialect.Oracle9Dialect
# for Oracle 8 compatibility use
#hibernate.dialect=org.hibernate.dialect.OracleDialect
hibernate.connection.driver_class=oracle.jdbc.driver.OracleDriver
hibernate.connection.url=jdbc:oracle:thin:@10.10.100.149:1521:randal
hibernate.connection.username=heather_pa
hibernate.connection.password=heather_pa
hibernate.show_sql=true
#hibernate.c3p0.min_size=1
#hibernate.c3p0.max_size=3
hibernate.query.substitutions=true 1, false 0
4. jbpm.properties to
jbpm.scheduler.service.factory=org.jbpm.scheduler.impl.SchedulerServiceImpl
jbpm.task.instance.class=org.jbpm.taskmgmt.exe.TaskInstance
# jbpm.hibernate.cfg.xml=optional resource path to the hibernate.cfg.xml file.
# resource path to a properties file that will overwrite all the hibernate
# properties. For database specific builds in the jbpm.db project there is a
# different hibernate.properties file on the classpath for each database.
jbpm.hibernate.properties=hibernate.properties
# uncomment the next line to use the file system instead of the database for
# storing files related to a process definition
# jbpm.files.dir=c:/jbpm.data
5. commenting following hibernate.cfg file
<!-- jdbc connection properties -->
<!--
org.hibernate.dialect.HSQLDialect
org.hsqldb.jdbcDriver
jdbc:hsqldb:.;sql.enforce_strict_size=true
sa
-->
org.hibernate.dialect.Oracle9Dialect
oracle.jdbc.driver.OracleDriver
jdbc:oracle:thin:@10.10.100.149:1521:randal
heather_pa
heather_pa
I am able to use oracle database with jbpm -
3. Re: connecting with oracle db
aguizar Oct 11, 2005 2:33 AM (in response to alal007)Hehe. Every once in a while someone raises this jbpm-bans-oracle-for-money thing. Who started that story? Anyway, the issue at hand has nothing to do with Oracle. The target oracle.scripts calls for compilation of the jBPM classes, but its classpath still has the prebuilt binaries in the first place. Look for the path classpath.jbpm.test:
<path id="classpath.jbpm.test"> <fileset dir="${jbpm.3.location}/lib" includes="**/*.jar" /> <fileset dir="${jbpm.3.location}/build/" includes="*.jar" /> <pathelement path="${basedir}" /> <!-- to get to jbpm.properties --> <pathelement path="${jbpm.3.location}/build/classes.jbpm" /> <pathelement path="${jbpm.3.location}/build/classes.identity" /> <pathelement path="${jbpm.3.location}/build/classes.jbpm.test" /> <pathelement path="${jbpm.3.location}/build/classes.identity.test" /> <pathelement path="${jbpm.3.location}/src/config.files" /> <pathelement path="${jbpm.3.location}/src/java.identity" /> <!-- to get User.hbm.xml --> </path>
Comment out the third line:<!-- <fileset dir="${jbpm.3.location}/build/" includes="*.jar" /> -->
jBPM will generate the DDL scripts successfully:[java] 01:23:23,783 INFO SchemaExport : writing generated schema to file:
.../jbpm-starters-kit-3.0.1/jbpm-db/build/oracle/scripts/oracle.drop.create.sql
You no longer need to change any other file besides build.xml. Thanks for sharing your solution anyway. -
4. Re: connecting with oracle db
klsateesh Nov 9, 2005 4:09 PM (in response to alal007)Hi All,
I am able to generate the Oracle Scripts but unable to create the tables required using those scripts..
I ma getting the Error:
ERROR at line 2:
ORA-00902: invalid datatype
ID_ bigint generated by default as identity (start with 1),
Pls let me know ..
Thanks
Sateesh -
5. Re: connecting with oracle db
sanjeevt Nov 10, 2005 8:10 AM (in response to alal007)I was able to successfully connect to Oracle DB. Whether it be because of Oracle DB or not, I did have to upgrade my JDK to 1.5. Also I copied the Oracle9Driver.jar file to JBPM_HOME/src/lib/oracle folder and the hibernate properties file to src/resources/oracle.
However I have another question. Once I create the JBPM schema in the Oracle DB I would like to keep the tables intact instead of dropping them and creating them fresh whenever I run the build.deploy.xml ant script.<!-- ============== --> <!-- === SERVER === --> <!-- ============== --> <target name="create.db" depends="declare.jbpm.tasks,db.clean" description="creates a oracle database with the jbpm tables and loads the processes in there"> <jbpmschema actions="create" properties="src/resources/oracle/create.db.hibernate.properties"/> <loadidentities file="src/resources/oracle/identity.db.xml" properties="src/resources/oracle/create.db.hibernate.properties"/> <ant antfile="build.xml" target="build.processes" inheritall="false" /> <deploypar properties="src/resources/oracle/create.db.hibernate.properties"> <fileset dir="build" includes="*.par" /> </deploypar> <!--antcall target="db.stop" / --> </target>
For this do I need to pass a different argument instead of "create" in the above section of the ant script for the JbpmSchema actions. I checked the JbpmSchema.java file which based on the argument passed and the dialect used builds either a drop script or create script. However I am not sure if the Hibernate callconfiguration.generateSchemaCreationScript(dialect)
builds a script that has drop table calls before the create table calls.
This is quite important for me as I would like to keep the old process definition information intact in the tables while deploying newer versions. Where as with the drop table calls all the past info is lost.
Thanks in advance. -
6. Re: connecting with oracle db
kukeltje Nov 10, 2005 10:19 AM (in response to alal007)deploy newer version of the process? Why not use the deploy.process task then?