1 2 Previous Next 19 Replies Latest reply on Mar 30, 2007 4:54 AM by Ronald van Kuijk

    jBPM : Couldn't be that complicated...

    Vinicius Carvalho Apprentice

      Hello there! For the last 6 hours I've been fighting again jBPM and the documentation (or total lack of it) regarding customizing an installation.
      jBPM is an awesome product, no doubt of that, but only if you intend to use it with the starter kit.
      We are a Red Hat Partner, and we have a real nice SOA prospect in hands. Im defining a process execution example/environment setup for the customer, and it's been a nightmare so far.
      I'm trying to get the 3.2 ear version to work (I need to deploy on a standalone jboss), and I've spent the entire day looking at this forum. There's so many flaws on the docs regarding installation.
      1st : The queues: If you plan to install the enterprise as standalone, there's no mention the the queues you have to create...
      2nd: Database... I read the chapter 8, followed every single step, just to start, the scripts on the 3.2 simply does not work. After all tables get created, the values inserted into JBPM_ID_USER are not enough to grant you enough privileges, there's some relationship missing

      I'm not the type that only throws rocks, I'd like to contribute, I'm still fighting against the deployment, and I'm volunteering to help in the wiki as soon as I figure out how to get jBPM 3.2 to work in a standalone jboss instance.

      Could anyone tell me what else do I need after creating the users? Which other tables should I fill?

      Regards

        • 1. Re: jBPM : Couldn't be that complicated...
          smichea Newbie

          Hi

          We are fighting for making jbpm work on jboss4.0.5 + EJB3 RC9 patch 1 + jbossws 1.2 for weeks...
          And no success yet.

          Among things we tried we removed javassist.jar from the console (at least we can see the console)

          We are now struggling with the transitions in decision nodes. Whatever we put in the condition (using ... or ) jbpm always takes the first one !

          What about creating a page somewhere to get jbpm work with jboss4.0.5 ?
          I don't think it is a really fancy idea since the 4.0.5 is the latest production quality release.

          • 2. Re: jBPM : Couldn't be that complicated...
            Ronald van Kuijk Master

            you do not need to fill any other table. One important thing however is that you do have to configure the login module. (as is described in the other post).

            If you have problems, please file as much relevant info (but not more) so we can help you better.

            Regarding the transitions, there is lots of info on this in the forum and the examples. Just a message like above is not enough info for us to help you.

            • 3. Re: jBPM : Couldn't be that complicated...
              Vinicius Carvalho Apprentice

              News from the front: So far jbpm seems to be working on jboss 4.0.5 (still problems with 4.2, left it behind due schedule). But I'm still using hsqldb as the database.
              I tried to run the scripts for mySQL no success. One thing that should be improved in the docs is that it starts from the principle that the user already use jbpm. For instance, if you run the scripts from jbpm-jpdl-3.2.GA/db/jbpm-jpdl-mysql.sql it will throw errors, since it tries to update tables that do not exist. So I believe there's a startup script (maybe the one found on previous version under jbpm-db) that creates the tables, and this one updates it. Did that. Well still need to fill some tabels (ID_USER, ID_GROUP).
              This stuff is not on the docs, and that's the *only* complaint I have about jbpm. Am I right folks? So, what's the minimal data that need to go on those user tables?
              I believe I'm very close to get it working now :)

              • 4. Re: jBPM : Couldn't be that complicated... Getting there
                Vinicius Carvalho Apprentice

                Alright! Almost there: So far those have been the steps taken:

                I'm using jbpm-jpdl-3.2.GA ok, on jboss 4.0.5:

                1st: Create a db named jbpmdb on you mysql (please google it for instruction , I'll post a full explanation as soon as I finish this)
                2nd: Download the jbpm-starters-kit 3.1.3
                3rd: Use the scripts under starters-kit/jbpm-db/build/mysql/scripts/mysql.create.sql, for that log on the myslq 'mysql -u root -p'
                >use jbpmdb;
                >source mysql.create.sql
                (Remember that you must be on the scripts directory when you started the mysql in order to use the exact sentence above)

                4th: Fill in some tables...
                You need to create a user: JBPM_ID_USER (fill in as you need, just use 'U' for the class [do not ask me why, I dunno know yet ;P])
                Now setup three groups for the user:

                insert into JBPM_ID_GROUP (ID_,
                CLASS_,
                NAME_,
                TYPE_,
                PARENT_) values (1, 'G', 'manager', 'security-role', null), (2, 'G', 'participant', 'security-role', null), (3,'G','administrator', 'security-role', null)
                

                5th: now you have to map roles<->users
                insert into JBPM_ID_MEMBERSHIP (ID_,
                CLASS_,
                NAME_,
                ROLE_,
                USER_,
                GROUP_) values (1,'M','','',1,1),(1,'M','','',1,2),(1,'M','','',1,3)
                

                Once again , don't know why class should be M (internal use of jbpm???).

                6th: Ok, you have the db-setup, next step, create a jbpm-ds.xml file on your deploy dir:
                <datasources>
                 <local-tx-datasource>
                 <jndi-name>JbpmDS</jndi-name>
                 <connection-url>jdbc:mysql://localhost:3306/jbpmdb</connection-url>
                 <driver-class>com.mysql.jdbc.Driver</driver-class>
                 <user-name>root</user-name>
                 <password></password>
                 <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
                 <!-- should only be used on drivers after 3.22.1 with "ping" support
                 <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker</valid-connection-checker-class-name>
                 -->
                 <!-- sql to call when connection is created
                 <new-connection-sql>some arbitrary sql</new-connection-sql>
                 -->
                 <!-- sql to call on an existing pooled connection when it is obtained from pool - MySQLValidConnectionChecker is preferred for newer drivers
                 <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
                 -->
                
                 <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
                 <metadata>
                 <type-mapping>mySQL</type-mapping>
                 </metadata>
                 </local-tx-datasource>
                </datasources>
                


                7th: Append this to your login-config.xml under conf dir:

                 <application-policy name = "jbpm">
                 <authentication>
                 <login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule"
                 flag="required">
                 <module-option name="dsJndiName">java:/JbpmDS</module-option>
                 <module-option name="principalsQuery">
                 SELECT PASSWORD_ FROM JBPM_ID_USER WHERE NAME_=?
                 </module-option>
                 <module-option name="rolesQuery">
                 SELECT g.NAME_ ,'Roles'
                 FROM JBPM_ID_USER u,
                 JBPM_ID_MEMBERSHIP m,
                 JBPM_ID_GROUP g
                 WHERE g.TYPE_='security-role'
                 AND m.GROUP_ = g.ID_
                 AND m.USER_ = u.ID_
                 AND u.NAME_=?
                 </module-option>
                 </login-module>
                 </authentication>
                 </application-policy>
                

                8th: Create some queues, append the following under the deploy/jms/jbossmq-destinations-service.xml:
                 <mbean code="org.jboss.mq.server.jmx.Queue"
                 name="jboss.mq.destination:service=Queue,name=JbpmCommandQueue">
                 <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
                 </mbean>
                
                 <mbean code="org.jboss.mq.server.jmx.Queue"
                 name="jboss.mq.destination:service=Queue,name=JbpmJobQueue">
                 <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
                 </mbean>
                

                And last but not least, copy the jbpm-enterprise.ear to your deploy dir

                Ok you are now setup. You can log on your new jbpm deployed into you jboss as standalone and try to access the console.
                You try to log in and ... BAAAM! Error. /common/searchheader.xhtml @27,7 disabled="#{search.firstPage}": org.hibernate.exception.SQLGrammarException: could not execute query

                I'm still figuring out this one, please come back later :)

                • 5. Re: jBPM : Couldn't be that complicated...
                  Ronald van Kuijk Master

                  A complete script for users is in the 'getting started'. The U is for some hibernate thing so you can use one table for more than one class (e.g. when they are inherited).

                  Can you post thhe full stacktrace of the error? I'd like to help you find the cause as a reward for describing this. Many thanks for that.

                  • 6. Re: jBPM : Couldn't be that complicated...
                    Vinicius Carvalho Apprentice

                    Hello kukeltje, the error is that the TASKINSTANCE table is missing the version column. After running the scripts from mysql it throws a lot of errors (did not see the first time, had verbose off). I don't know if it is a mysql issue (found a lot of references about errors when dropping FKs on mysql.)
                    For instance the following SQL throws an error:

                    alter table JBPM_ACTION drop foreign key FK_ACTION_EVENT
                    Error: java.sql.SQLException: Error on rename of '.\jbpmdb\jbpm_action' to '.\jbpmdb\#sql2-7e0-10' (errno: 152), SQL State: HY000, Error Code: 1025
                    


                    I'll try something different this time, I'll try to replace the new modified tables inside the build script of the starters kit.
                    I'm also trying a new approach (switching to oralce ;P)

                    Regards

                    • 7. Re: jBPM : Couldn't be that complicated...
                      Ronald van Kuijk Master

                      I always run the scripts in half. If the database is not there I only run the create parts.

                      With mysql 4.x you have to change the boolean to tinyint(1). This is on the wiki... This is the only thing I have to do manually when creating the database on mysql (this and filling the user database)

                      • 8. Re: jBPM : Couldn't be that complicated...
                        Vinicius Carvalho Apprentice

                        Well, it did work on Oracle. Seems to be a bug with mySQL. As I'm in a rush for a customer presentation about jbpm we are gonna stick to Oracle.
                        Really would like to see the mysql working, I'll save some time to create a full script for the 3.2 version (wondering why 3.2 do not have the jbpm-db project to build the scripts ...)

                        regards

                        • 9. Re: jBPM : Couldn't be that complicated...
                          Ronald van Kuijk Master

                          3.2 source has... it's only not a jbpm.db 'subproject' anymore, but in the core.

                          • 10. Re: jBPM : Couldn't be that complicated...
                            smichea Newbie

                            To create the tables, I used the script given with 3.2 GA after :
                            - removing the firsts ALTER TABLE instructions
                            - adding ";" at the end of each line

                            It seems to work, for the login/pass I just uses a properties file.

                            We are still struggling with transactions and transitions, as we have different behaviours depending on the machine.
                            I start to guess that 4.0.5GA + EJB3 might have some bug in redeployment, often I have to delete the content of server/tmp to deploy correctly.

                            A jboss4.0.5+EJB3 bundled with JBPM... would be great in the suite.

                            • 11. Re: jBPM : Couldn't be that complicated...
                              Ronald van Kuijk Master

                              There is something like profiles in the source now. This should eventually be filled (by users?) where complete setups for specific servers can be putin and build. I thought the ";" was already fixed in the database scripts for the databases who need it (e.g. MySQL). If not, could you point to the specifc script you used

                              jBPM with ejb3 is not my expertise (yet), so unfortunately no help here... sorry

                              • 12. Re: jBPM : Couldn't be that complicated...
                                Vinicius Carvalho Apprentice

                                 

                                "michea" wrote:
                                To create the tables, I used the script given with 3.2 GA after :
                                - removing the firsts ALTER TABLE instructions
                                - adding ";" at the end of each line

                                It seems to work, for the login/pass I just uses a properties file.

                                We are still struggling with transactions and transitions, as we have different behaviours depending on the machine.
                                I start to guess that 4.0.5GA + EJB3 might have some bug in redeployment, often I have to delete the content of server/tmp to deploy correctly.

                                A jboss4.0.5+EJB3 bundled with JBPM... would be great in the suite.


                                Well, I really give up mysql here. Here's what I've done, step by step and it did not work in 4 different versions of mySQL (4.0.28,4.1.23,5.0.24a,5.1.7).

                                Ran the examples located at starterskit 3.1.3 (I run the ant tasks to create the scripts for mySQL)
                                Ran the scripts of 3.2 under db (removed the alter tables...)
                                Here's the result:
                                mysql> source jbpm.jpdl.mysql.sql;
                                ERROR 1217 (23000): Cannot delete or update a parent row: a foreign key constraint fails
                                ERROR 1217 (23000): Cannot delete or update a parent row: a foreign key constraint fails
                                Query OK, 0 rows affected (0.00 sec)
                                
                                Query OK, 0 rows affected (0.06 sec)
                                
                                Query OK, 0 rows affected (0.00 sec)
                                
                                ERROR 1217 (23000): Cannot delete or update a parent row: a foreign key constraint fails
                                ERROR 1217 (23000): Cannot delete or update a parent row: a foreign key constraint fails
                                ERROR 1217 (23000): Cannot delete or update a parent row: a foreign key constraint fails
                                Query OK, 0 rows affected, 1 warning (0.00 sec)
                                
                                Query OK, 0 rows affected (0.03 sec)
                                
                                ERROR 1217 (23000): Cannot delete or update a parent row: a foreign key constraint fails
                                ERROR 1217 (23000): Cannot delete or update a parent row: a foreign key constraint fails
                                ERROR 1217 (23000): Cannot delete or update a parent row: a foreign key constraint fails
                                ERROR 1217 (23000): Cannot delete or update a parent row: a foreign key constraint fails
                                ERROR 1217 (23000): Cannot delete or update a parent row: a foreign key constraint fails
                                ERROR 1217 (23000): Cannot delete or update a parent row: a foreign key constraint fails
                                Query OK, 0 rows affected (0.01 sec)
                                
                                ERROR 1217 (23000): Cannot delete or update a parent row: a foreign key constraint fails
                                ERROR 1217 (23000): Cannot delete or update a parent row: a foreign key constraint fails
                                ERROR 1217 (23000): Cannot delete or update a parent row: a foreign key constraint fails
                                Query OK, 0 rows affected (0.03 sec)
                                
                                ERROR 1217 (23000): Cannot delete or update a parent row: a foreign key constraint fails
                                ERROR 1217 (23000): Cannot delete or update a parent row: a foreign key constraint fails
                                ERROR 1217 (23000): Cannot delete or update a parent row: a foreign key constraint fails
                                ERROR 1217 (23000): Cannot delete or update a parent row: a foreign key constraint fails
                                ERROR 1217 (23000): Cannot delete or update a parent row: a foreign key constraint fails
                                Query OK, 0 rows affected (0.01 sec)
                                
                                Query OK, 0 rows affected (0.03 sec)
                                
                                ERROR 1050 (42S01): Table 'JBPM_ACTION' already exists
                                ERROR 1050 (42S01): Table 'JBPM_BYTEARRAY' already exists
                                Query OK, 0 rows affected, 1 warning (0.14 sec)
                                
                                Query OK, 0 rows affected, 1 warning (0.07 sec)
                                
                                Query OK, 0 rows affected, 1 warning (0.11 sec)
                                
                                ERROR 1050 (42S01): Table 'JBPM_DELEGATION' already exists
                                ERROR 1050 (42S01): Table 'JBPM_EVENT' already exists
                                ERROR 1050 (42S01): Table 'JBPM_EXCEPTIONHANDLER' already exists
                                Query OK, 0 rows affected, 1 warning (0.09 sec)
                                
                                Query OK, 0 rows affected, 1 warning (0.10 sec)
                                
                                ERROR 1050 (42S01): Table 'JBPM_MODULEDEFINITION' already exists
                                ERROR 1050 (42S01): Table 'JBPM_MODULEINSTANCE' already exists
                                ERROR 1050 (42S01): Table 'JBPM_NODE' already exists
                                ERROR 1050 (42S01): Table 'JBPM_POOLEDACTOR' already exists
                                ERROR 1050 (42S01): Table 'JBPM_PROCESSDEFINITION' already exists
                                ERROR 1050 (42S01): Table 'JBPM_PROCESSINSTANCE' already exists
                                Query OK, 0 rows affected, 1 warning (0.08 sec)
                                
                                ERROR 1050 (42S01): Table 'JBPM_SWIMLANE' already exists
                                ERROR 1050 (42S01): Table 'JBPM_SWIMLANEINSTANCE' already exists
                                ERROR 1050 (42S01): Table 'JBPM_TASK' already exists
                                Query OK, 0 rows affected, 1 warning (0.05 sec)
                                
                                ERROR 1050 (42S01): Table 'JBPM_TASKCONTROLLER' already exists
                                ERROR 1050 (42S01): Table 'JBPM_TASKINSTANCE' already exists
                                ERROR 1050 (42S01): Table 'JBPM_TOKEN' already exists
                                ERROR 1050 (42S01): Table 'JBPM_TOKENVARIABLEMAP' already exists
                                ERROR 1050 (42S01): Table 'JBPM_TRANSITION' already exists
                                Query OK, 0 rows affected, 1 warning (0.10 sec)
                                
                                Query OK, 0 rows affected, 1 warning (0.09 sec)
                                
                                Query OK, 0 rows affected (0.14 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.14 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.15 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                ERROR 1061 (42000): Duplicate key name 'FK_ACTION_EVENT'
                                ERROR 1061 (42000): Duplicate key name 'FK_ACTION_EXPTHDL'
                                ERROR 1061 (42000): Duplicate key name 'FK_ACTION_PROCDEF'
                                ERROR 1061 (42000): Duplicate key name 'FK_CRTETIMERACT_TA'
                                ERROR 1061 (42000): Duplicate key name 'FK_ACTION_ACTNDEL'
                                ERROR 1061 (42000): Duplicate key name 'FK_ACTION_REFACT'
                                ERROR 1061 (42000): Duplicate key name 'FK_BYTEARR_FILDEF'
                                Query OK, 0 rows affected (0.15 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.14 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.11 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.17 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.14 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.16 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.11 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                ERROR 1061 (42000): Duplicate key name 'FK_DELEGATION_PRCD'
                                ERROR 1061 (42000): Duplicate key name 'FK_EVENT_PROCDEF'
                                ERROR 1061 (42000): Duplicate key name 'FK_EVENT_NODE'
                                ERROR 1061 (42000): Duplicate key name 'FK_EVENT_TRANS'
                                ERROR 1061 (42000): Duplicate key name 'FK_EVENT_TASK'
                                Query OK, 0 rows affected (0.11 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.13 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.14 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.15 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.17 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.65 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.18 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.18 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.18 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.14 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.16 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.14 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.13 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.15 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.13 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.18 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.14 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.16 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.14 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.17 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.16 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.15 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                ERROR 1061 (42000): Duplicate key name 'FK_TSKDEF_START'
                                ERROR 1061 (42000): Duplicate key name 'FK_MODDEF_PROCDEF'
                                Query OK, 0 rows affected (0.12 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                ERROR 1061 (42000): Duplicate key name 'FK_TASKMGTINST_TMD'
                                ERROR 1061 (42000): Duplicate key name 'FK_MODINST_PRCINST'
                                Query OK, 0 rows affected (0.13 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.14 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.16 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.16 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                ERROR 1061 (42000): Duplicate key name 'FK_PROCST_SBPRCDEF'
                                ERROR 1061 (42000): Duplicate key name 'FK_NODE_PROCDEF'
                                ERROR 1072 (42000): Key column 'SCRIPT_' doesn't exist in table
                                ERROR 1061 (42000): Duplicate key name 'FK_NODE_ACTION'
                                ERROR 1061 (42000): Duplicate key name 'FK_DECISION_DELEG'
                                ERROR 1061 (42000): Duplicate key name 'FK_NODE_SUPERSTATE'
                                ERROR 1061 (42000): Duplicate key name 'IDX_PLDACTR_ACTID'
                                Query OK, 0 rows affected (0.15 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                ERROR 1061 (42000): Duplicate key name 'FK_POOLEDACTOR_SLI'
                                Query OK, 0 rows affected (0.13 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                ERROR 1061 (42000): Duplicate key name 'FK_PROCDEF_STRTSTA'
                                Query OK, 0 rows affected (0.14 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.15 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.14 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                ERROR 1061 (42000): Duplicate key name 'FK_PROCIN_PROCDEF'
                                ERROR 1061 (42000): Duplicate key name 'FK_PROCIN_ROOTTKN'
                                ERROR 1061 (42000): Duplicate key name 'FK_PROCIN_SPROCTKN'
                                Query OK, 0 rows affected (0.13 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.16 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.17 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.42 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                ERROR 1061 (42000): Duplicate key name 'FK_SWL_ASSDEL'
                                ERROR 1061 (42000): Duplicate key name 'FK_SWL_TSKMGMTDEF'
                                Query OK, 0 rows affected (0.15 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                ERROR 1061 (42000): Duplicate key name 'FK_SWIMLANEINST_TM'
                                ERROR 1061 (42000): Duplicate key name 'FK_SWIMLANEINST_SL'
                                Query OK, 0 rows affected (0.13 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.15 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.18 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                ERROR 1061 (42000): Duplicate key name 'FK_TSK_TSKCTRL'
                                ERROR 1061 (42000): Duplicate key name 'FK_TASK_ASSDEL'
                                ERROR 1061 (42000): Duplicate key name 'FK_TASK_TASKNODE'
                                ERROR 1061 (42000): Duplicate key name 'FK_TASK_PROCDEF'
                                ERROR 1061 (42000): Duplicate key name 'FK_TASK_STARTST'
                                ERROR 1061 (42000): Duplicate key name 'FK_TASK_TASKMGTDEF'
                                ERROR 1061 (42000): Duplicate key name 'FK_TASK_SWIMLANE'
                                Query OK, 0 rows affected (0.13 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.13 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                ERROR 1061 (42000): Duplicate key name 'FK_TSKCTRL_DELEG'
                                Query OK, 0 rows affected (0.16 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                ERROR 1072 (42000): Key column 'PROCINST_' doesn't exist in table
                                Query OK, 0 rows affected (0.14 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.15 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                ERROR 1061 (42000): Duplicate key name 'IDX_TASK_ACTORID'
                                ERROR 1072 (42000): Key column 'PROCINST_' doesn't exist in table
                                ERROR 1061 (42000): Duplicate key name 'FK_TASKINST_TMINST'
                                ERROR 1061 (42000): Duplicate key name 'FK_TASKINST_TOKEN'
                                ERROR 1061 (42000): Duplicate key name 'FK_TASKINST_SLINST'
                                ERROR 1061 (42000): Duplicate key name 'FK_TASKINST_TASK'
                                Query OK, 0 rows affected (0.14 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.27 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.17 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.13 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                ERROR 1061 (42000): Duplicate key name 'FK_TOKEN_PARENT'
                                ERROR 1061 (42000): Duplicate key name 'FK_TOKEN_NODE'
                                ERROR 1061 (42000): Duplicate key name 'FK_TOKEN_PROCINST'
                                ERROR 1061 (42000): Duplicate key name 'FK_TOKEN_SUBPI'
                                Query OK, 0 rows affected (0.15 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.15 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                ERROR 1061 (42000): Duplicate key name 'FK_TKVARMAP_CTXT'
                                ERROR 1061 (42000): Duplicate key name 'FK_TKVARMAP_TOKEN'
                                Query OK, 0 rows affected (0.14 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.15 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.14 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                ERROR 1061 (42000): Duplicate key name 'FK_TRANSITION_TO'
                                ERROR 1061 (42000): Duplicate key name 'FK_TRANS_PROCDEF'
                                ERROR 1061 (42000): Duplicate key name 'FK_TRANSITION_FROM'
                                Query OK, 0 rows affected (0.15 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.17 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.16 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.13 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.16 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.12 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.16 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.15 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.14 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.14 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                Query OK, 0 rows affected (0.14 sec)
                                Records: 0 Duplicates: 0 Warnings: 0
                                
                                ERROR:
                                No query specified
                                


                                And after all this, the tables are not updated, for instance JBPM_TASKINSTANCE does not get an VERSION_ column

                                Well, what else am I doing wrong that I cant get it working on mysql? Oracle works pretty fine :) But ?I don't have an oracle on my machine :( hence I depend to be on my company network to run the examples I'm building...

                                Regards

                                • 13. Re: jBPM : Couldn't be that complicated...
                                  Ronald van Kuijk Master

                                  did you try to run this script for updating a 3.1 database to a 3.2 database? I'm looking into this, but afaik, this is for creating a new database (even if one already exists).

                                  I did it several times and did not encounter these errors. It's simple, if the fk's are not deleted, you cannot drop the tables..... that is mysql behaviour. Then do a truncate first or something delete the schema and create it again... not so difficult, is it? I've worked with mysql and jbpm for 4 years now... you have to be a little creative, but just a little.

                                  • 14. Re: jBPM : Couldn't be that complicated...
                                    Vinicius Carvalho Apprentice

                                     

                                    "kukeltje" wrote:
                                    did you try to run this script for updating a 3.1 database to a 3.2 database? I'm looking into this, but afaik, this is for creating a new database (even if one already exists).

                                    I did it several times and did not encounter these errors. It's simple, if the fk's are not deleted, you cannot drop the tables..... that is mysql behaviour. Then do a truncate first or something delete the schema and create it again... not so difficult, is it? I've worked with mysql and jbpm for 4 years now... you have to be a little creative, but just a little.


                                    Yeah I know! I do understand the errors. What I can't understand is that why the script simply can't run out-of-the-box, this is the whole point. I don't belive the scripts located at db/jbpm-jpdl-mysql.sql are intend for fresh install are they? The miss a lot of tables when compared to the one found on starters-kit.
                                    One thing I'll do here is to mix both scripts so I don't need to rely on the alter table that seems to be problematic (I found a bug on mysql complaining about droping constraints with alter table).
                                    So far I left this behind as we are running out of time and I've already an oracle DB setup

                                    Regards

                                    1 2 Previous Next