6 Replies Latest reply on Sep 4, 2009 4:52 AM by nystony

    values in example.identities.sql for JBPM4_ID_USER do not fi

    mrinnel1

      This issue applies to revision 4815 and some earlier revisions.

      The script example.identities.sql contains lines like

      INSERT INTO JBPM4_ID_USER VALUES (1,0,'alex','password','Administrator Login','');

      but the script jbpm.hsqldb.create.sql creates the JBPM4_ID_USER table as follows
      create table JBPM4_ID_USER (
       DBID_ bigint generated by default as identity (start with 1),
       DBVERSION_ integer not null,
       ID_ varchar(255),
       PASSWORD_ varchar(255),
       GIVENNAME_ varchar(255),
       FAMILYNAME_ varchar(255),
       BUSINESSEMAIL_ varchar(255),
       primary key (DBID_)
       );

      The value 'Administrator Login' does not fit to the columns GIVENNAME_ and FAMILYNAME_.

      The script example.identities.sql should be changed to use something like
      INSERT INTO JBPM4_ID_USER VALUES (1,0,'alex','password','Alex','Admin','');



        • 1. Re: values in example.identities.sql for JBPM4_ID_USER do no
          tom.baeyens

          so is your point that 'Administrator Login' is not an intuitive value for GIVENNAME_ ? and that you think that 'Alex' is a better value for it ?

          • 2. Re: values in example.identities.sql for JBPM4_ID_USER do no
            mrinnel1

            No, the point is that the number of values does not match the number of columns in the table.

            When I execute the example.identities.sql script from the HSQL Database Manager I get the error message:

            java.sql.SQLException: Column count does not match in statement [
            INSERT INTO JBPM4_ID_USER VALUES(1,0,'alex','password','Administrator Login','')]


            As far as I know you have to provide a value for all columns if you just use the syntax "INSERT INTO table VALUES(...)" without naming the columns.


            • 3. Re: values in example.identities.sql for JBPM4_ID_USER do no
              tom.baeyens

              now i got it!

              i fixed it like this:

              INSERT INTO JBPM4_ID_GROUP VALUES (1,0,'manager','manager','security-role',NULL);
              INSERT INTO JBPM4_ID_GROUP VALUES (2,0,'administrator','administrator','security-role',NULL);
              INSERT INTO JBPM4_ID_GROUP VALUES (3,0,'user','user','security-role',NULL);
              INSERT INTO JBPM4_ID_GROUP VALUES(4,0,'sales','sales',NULL,NULL);
              
              INSERT INTO JBPM4_ID_USER VALUES (1,0,'alex','password','Alex',NULL,'alex@jbpm.org');
              INSERT INTO JBPM4_ID_USER VALUES (2,0,'mike','password','Mike',NULL,'mike@jbpm.org');
              INSERT INTO JBPM4_ID_USER VALUES (3,0,'peter','password','Peter',NULL,'peter@jbpm.org');
              INSERT INTO JBPM4_ID_USER VALUES (4,0,'mary','password','Mary',NULL,'mary@jbpm.org');
              
              INSERT INTO JBPM4_ID_MEMBERSHIP VALUES (1,0,1,2,NULL);
              INSERT INTO JBPM4_ID_MEMBERSHIP VALUES (2,0,2,1,NULL);
              INSERT INTO JBPM4_ID_MEMBERSHIP VALUES (3,0,3,3,NULL);
              INSERT INTO JBPM4_ID_MEMBERSHIP VALUES (4,0,3,4,NULL);
              INSERT INTO JBPM4_ID_MEMBERSHIP VALUES (5,0,4,3,NULL);
              INSERT INTO JBPM4_ID_MEMBERSHIP VALUES (6,0,4,4,NULL);
              


              • 4. Re: values in example.identities.sql for JBPM4_ID_USER do no
                tom.baeyens

                the nice thing about these addresses is that after a while i'll be getting task notification and reminders as deverlopers start playing with it. it usually takes a day for them to figure out that the emails that they cannot find actually went out the door :-)

                • 5. Re: values in example.identities.sql for JBPM4_ID_USER do no
                  kukeltje

                  Tom, just make sure ronald@jbpm.org will NOT be in there :-D

                  • 6. Re: values in example.identities.sql for JBPM4_ID_USER do no

                    Tom, I just installed 4.1 on jboss 5.0GA, but when it is deployed, the database schema is created but no users. I found your script in this forum; but why isn't it in the installation. I see an Ant target to create the schema but it doesn't populate the users database

                    bedankt

                    Tony