Hi all,

I'm using OJB 1.0RC6 in conjunction with DB2 and when i try to run the junit target in the build.xml file i get the following error:

[torque-sql-exec] Failed to execute: CREATE TABLE OJB_DMAP_ENTRIES ( ID INTEGER NOT NULL, DMAP_ID INTEGER NOT NULL, KEY_OID VARCHAR(250) FOR BIT DATA VARCHAR(n) FOR BIT DATA, VALUE_OID VARCHAR(250) FOR BIT DATA VARCHAR(n) FOR BIT DATA )
[torque-sql-exec] COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/LINUX] SQL0104N An unexpected token "VARCHAR" was found following "AR(250) FOR BIT DATA". Expected tokens may include: "REFERENCES". SQLSTATE=42601


Poking around in the ojbcore-schema.sql file, under the "OJB_DMAP_ENTRIES" section i see:

CREATE TABLE OJB_DMAP_ENTRIES
(
            ID INTEGER NOT NULL,
            DMAP_ID INTEGER NOT NULL,
            KEY_OID VARCHAR(250) FOR BIT DATA VARCHAR(n) FOR BIT DATA,
            VALUE_OID VARCHAR(250) FOR BIT DATA VARCHAR(n) FOR BIT DATA
);

Changing this SQL to:

CREATE TABLE OJB_DMAP_ENTRIES
(
            ID INTEGER NOT NULL,
            DMAP_ID INTEGER NOT NULL,
            KEY_OID VARCHAR(250) FOR BIT DATA,
            VALUE_OID VARCHAR(250) FOR BIT DATA
);

eliminates these errors.

So finally, my question is: is this a torque or and ojb problem and is there a work-around that doesn't require manual edits?

Thanks and apologies if this issue is already known,

Sean Kirby


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



Reply via email to