7 Replies Latest reply on Aug 15, 2005 9:52 AM by jeff_porter

    Problems Generating Oracle create Script

    fletch_g

      Hi,

      I am trying to build Oracle scripts from the starter-kit and am having problems. First, I could not build oracle.scripts. I received the following error:

      oracle.scripts:

      db.scripts:
      [mkdir] Created dir: D:\jbpm\DB-jbpm-starters-kit-with-eclipse-3.0\jbpm-starters-kit-with-eclipse-3.0\jbpm-db\build\
      oracle\scripts
      [java] java.lang.NoClassDefFoundError: org/jbpm/db/JbpmSchema
      [java] Exception in thread "main"
      [java] Java Result: 1

      I looked around and updated the claspath.jbpm.test in build.xml to include jars in the jbpm/build directory by changing it from this:


      <path id="classpath.jbpm.test">
       <fileset dir="${jbpm.3.location}/lib" 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" />
       </path>
      


      to this:

      <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}/src/config.files" />
       </path>



      When I ran ant again it completed successfully, but the sql does not look like Oracle and does not work. As an example here is the first table create:

      create table JBPM_ACTION
      (ID_ bigint generated by default as identity (start with 1),
      class char(1) not null,
      NAME_ varchar(255),
      ISPROPAGATIONALLOWED_ bit,
      REFERENCEDACTION_ bigint,
      ACTIONDELEGATION_ bigint,
      EVENT_ bigint,
      PROCESSDEFINITION_ bigint,
      EXPRESSION_ varchar(4000),
      TIMERNAME_ varchar(255),
      DUEDATE_ varchar(255),
      REPEAT_ varchar(255),
      TRANSITIONNAME_ varchar(255),
      TIMERACTION_ bigint,
      EVENTINDEX_ integer,
      EXCEPTIONHANDLER_ bigint,
      EXCEPTIONHANDLERINDEX_ integer,
      primary key (ID_));

      Am I missing something? I also did the following:

      1) Update hibernate.properties to use proper connect info.
      2) modify jbpm.3/src/resources/hibernate.cfg.xml: add line true 1, false 0
      3) copy classes12.zip to the jbpm-db\oracle\lib directory

      Finally, here is some output from the script, it appears to be set to use Oracle but ...

      [java] 16:43:44,234 DEBUG JbpmConfiguration : jbpm.hibernate.properties=jbpm.hibernate.properties
      [java] 16:43:44,265 INFO Environment : Hibernate 3.0.5
      [java] 16:43:44,265 INFO Environment : loaded properties from resource hibernate.properties: {hibernate.connection
      .driver_class=oracle.jdbc.driver.OracleDriver, hibernate.cglib.use_reflection_optimizer=true, hibernate.c3p0.max_size=3,
      hibernate.dialect=org.hibernate.dialect.Oracle9Dialect, hibernate.c3p0.min_size=1, hibernate.connection.username=jbpmte
      st,hibernate.connection.url=jdbc:oracle:thin:@localhost:1521:, hibernate.show_sql=true, hibernate.connection.password=****}



        • 1. Re: Problems Generating Oracle create Script
          hammer.ab.ca

          We want to move to Oracle to integrate a proof of concept into our application. Has anyone generated the scripts?

          • 2. Re: Problems Generating Oracle create Script
            russelldb

            I have the same issue. The scripts created for Oracle do not run. Syntax error in the created scripts. I am looking at fixing it now and when I do I will let you know what I find.

            I would be surprised if any JBoss developer would answer an Oracle question as Oracle users are ripe candidates for purchasing consultancy/support. Oracle reeks of money.

            • 3. Re: Problems Generating Oracle create Script
              kukeltje

              The starterkit is not realy meant to be used to reconfigure things, recompile etc... It is meant to run out of the box with the hsqldb configured. Hence the class not found exceptions. Try using the normal jbpm.3 release and follow the docs. Please report if the same happens then.

              Besides the script not working right, I'm curious where you got the impression that Oracle questions will not be answerd. If you look through the SF forums, you'll see lots of oracle questions got answered without refering to paid support.

              • 4. Re: Problems Generating Oracle create Script
                russelldb

                fletch_g,
                Your mistake is that you have editted the build.xml that comes with the jbpm db release. By adding all the jars in the build dir to the class path you end up loading the hibernate properties for the sar rather than the properties in the oracle directory of the jbpm db project.

                If you read the logs you will see this when the JbpmSessionFactory "overrides" the hibernate properties.

                Rather than changing the classpath in the build.xml, instead run the "prepare" task first, then generate yor scripts.

                Let me know if that works for you

                Regards

                kukeltje,
                Sorry. Just a bit of trolling. No harm meant.

                regards to you too

                • 5. Re: Problems Generating Oracle create Script
                  fletch_g

                  Yes russlldb that was exactly what I figured out. Last week I executed the 'compile' target in the jbpm/build.xml and noticed the classes that could not be found when trying to generate the scripts were now there.

                  So running the prepare target or compiling the jbpm project before trying to generate the scripts should solve the problem.

                  I did however receive 2 failures and 6 errors when running the tests (4 hours later). If your interested all of the errors look similar:


                  couldn't commit transaction

                  java.lang.RuntimeException: couldn't commit transaction at org.jbpm.db.JbpmSession.commitTransaction(JbpmSession.java:107) at org.jbpm.db.AbstractDbTestCase.commitAndCloseSession(AbstractDbTestCase.java:90) at org.jbpm.db.AbstractDbTestCase.tearDown(AbstractDbTestCase.java:76)Caused by: java.lang.NullPointerException at org.jbpm.db.JbpmSession.commitTransaction(JbpmSession.java:102) ... 12 more


                  As kukeltje suggested I will try using the normal jbpm.3 release and see if I still have the same problem, but not for a day or two. In the meantime, if anybody knows what that error means please let me know. What I was trying to do was to run the sample app with Oracle model, its just easier for my analysis than working with the hsql workbench.

                  Greg

                  • 6. Re: Problems Generating Oracle create Script
                    kukeltje

                    lHey, I like trolls, love Hobbits to though. :-), But elves.... hmmmm... she is ^H^H^H^H^H^H they are my favorite. Especially when she is the daughter of.....

                    • 7. Re: Problems Generating Oracle create Script
                      jeff_porter

                       

                      "kukeltje" wrote:
                      lHey, I like trolls, love Hobbits to though. :-), But elves.... hmmmm... she is ^H^H^H^H^H^H they are my favorite. Especially when she is the daughter of.....



                      Did I just wander into the elves appreciation forum kukeltje ?
                      If you weren't such a "guru" I'd give you more of a ribbing.
                      he he.