You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Sean Kirby <ss...@alumni.uwaterloo.ca> on 2004/04/30 23:44:16 UTC

Cannot create table OJB_DMAP_ENTRIES on DB2

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: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org