In jakarta-jetspeed/src/sql/external/turbine-oracle.sql

You should add the scheme for an extra table:
-----------------------------------------------------------------------------
-- ID_TABLE
-----------------------------------------------------------------------------
drop table ID_TABLE cascade constraints;
drop sequence ID_TABLE_SEQ;

CREATE TABLE ID_TABLE
(
    ID_TABLE_ID INT NOT NULL,
    TABLE_NAME VARCHAR2 (255) NOT NULL,
    NEXT_ID INT,
    QUANTITY INT,
    UNIQUE (TABLE_NAME)
);

ALTER TABLE ID_TABLE
    ADD CONSTRAINT ID_TABLE_PK 
PRIMARY KEY (ID_TABLE_ID);

(see jakarta-turbine/src/sql/oracle-id-table-schema.sql)

in jakarta-jetspeed/src/sql/external/default_roles_permissions.sql,
you should add the following records:

insert into ID_TABLE (id_table_id, table_name, next_id, quantity) VALUES
(1, 'TURBINE_PERMISSION', 100, 10);
insert into ID_TABLE (id_table_id, table_name, next_id, quantity) VALUES
(2, 'TURBINE_ROLE', 100, 10);
insert into ID_TABLE (id_table_id, table_name, next_id, quantity) VALUES
(3, 'TURBINE_GROUP', 100, 10);
insert into ID_TABLE (id_table_id, table_name, next_id, quantity) VALUES
(4, 'TURBINE_ROLE_PERMISSION', 100, 10);
insert into ID_TABLE (id_table_id, table_name, next_id, quantity) VALUES
(5, 'TURBINE_USER', 100, 10);
insert into ID_TABLE (id_table_id, table_name, next_id, quantity) VALUES
(6, 'TURBINE_USER_GROUP_ROLE', 100, 10);
insert into ID_TABLE (id_table_id, table_name, next_id, quantity) VALUES
(7, 'TURBINE_SCHEDULED_JOB', 100, 10);
(see jakarta-turbine/src/sql/oracle-turbine-id-table-init.sql)

This changes the error:
ORA-00942: table or view does not exist
into the error:
The table TURBINE_USER does not have a proper entry in the ID_TABLE

This error makes a newbie look less stupid and avoids people saying:
if you follow our instructions, it must work (or you're a moron)

OK, now you can still say I'm a moron because you can say:
hey man, you don't have a record for TURBINE_USER in ID_TABLE.

Well, I looked at the code in IDBroker, method selectRow
and I saw the exact SQL statement is:
SELECT NEXT_ID, QUANTITY FROM ID_TABLE WHERE TABLE_NAME='TURBINE_USER';
when I do this query in SqlPlus, I get:

   NEXT_ID   QUANTIY
---------- ---------
       100        10

But when this same query is performed by Turbine, the resultset
seems to be empty. This is very, very strange...

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to