Hello,
i try to test ojb for my next project. I followed the instructions in
the "get startet" section
but when I build and test ojb1.0rc4 on my system (win2k, jdk1.4.2, ibm
DB2 7.2.5 and the IBM
jdbc-driver) I get SQL Errors and some of the tests fail.
I think the error in the odmg tests happens because of the failed create
of table ojb_dmap_entries.
I don't know if the error in testDeleteWithRemovalAwareCollection has
the same reason.
I'm not an DB2/SQL guru but the statement in
/target/src/sql/ojbcore-schema.sql seems to be wrong
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
);

ALTER TABLE OJB_DMAP_ENTRIES
    ADD PRIMARY KEY (ID);

How is the right syntax of the create statement? 
I read that this sql is generated by tourque so it makes no sense to
correct it here?
Is there a fix for this problem? 
Does this error effect the functionality of the odmg interface?

Thanks for help
Martin Gr�neberg

Here is the output of the test-run: .\bin\build.bat junit

from cmd: build.bat junit
<snip>
[torque-insert-sql] Failed to execute: drop table OJB_DMAP_ENTRIES
[torque-insert-sql] COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI
Driver][DB2/NT] SQL0204N  "MARTIN.OJB_DMAP_ENTRIES" ist ein nicht
definierter Name.  SQLSTATE=42704
[torque-insert-sql] Failed to execute: CREATE TABLE OJB_DMAP_ENTRIES (
ID INTEGER NOT NULL, DMAP_ID INTEGER NOT NULL, KE
Y_OID VARCHAR(250) FOR BIT DATA VARCHAR(n) FOR BIT DATA, VALUE_OID
VARCHAR(250) FOR BIT DATA VARCHAR(n) FOR BIT DATA )
[torque-insert-sql] COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI
Driver][DB2/NT] SQL0104N  Auf "AR(250) FOR BIT DATA" folgte
 das unerwartete Token "VARCHAR".  Zu den m�glichen Token geh�ren:
"REFERENCES".  SQLSTATE=42601
[torque-insert-sql] Failed to execute: ALTER TABLE OJB_DMAP_ENTRIES ADD
PRIMARY KEY (ID)
[torque-insert-sql] COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI
Driver][DB2/NT] SQL0204N  "MARTIN.OJB_DMAP_ENTRIES" ist ein
 nicht definierter Name.  SQLSTATE=42704
[torque-insert-sql] Executing file:
H:\db-ojb-1.0.rc4\target\src\sql\ojbtest-data.sql
[torque-insert-sql] 461 of 464 SQL statements executed successfully

junit-no-compile-no-prepare:
    [junit] Running org.apache.ojb.broker.AllTests
    [junit] Tests run: 247, Failures: 1, Errors: 0, Time elapsed: 32,578
sec
    [junit] TEST org.apache.ojb.broker.AllTests FAILED
    [junit] Running org.apache.ojb.odmg.AllTests
    [junit] [BOOT] INFO: OJB.properties:
file:/H:/db-ojb-1.0.rc4/target/test/ojb/OJB.properties
    [junit] Tests run: 160, Failures: 0, Errors: 1, Time elapsed: 11,703
sec
    [junit] TEST org.apache.ojb.odmg.AllTests FAILED
    [junit] Running org.apache.ojb.soda.AllTests
    [junit] [BOOT] INFO: OJB.properties:
file:/H:/db-ojb-1.0.rc4/target/test/ojb/OJB.properties
    [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 1,734
sec
    [junit] Running org.apache.ojb.otm.AllTests
    [junit] Tests run: 73, Failures: 0, Errors: 0, Time elapsed: 11,453
sec

</snip>

from tests-broker.txt:
<snip>
Testcase: testDeleteWithRemovalAwareCollection took 0,047 sec
        FAILED
expected:<1> but was:<0>
junit.framework.AssertionFailedError: expected:<1> but was:<0>
        at
org.apache.ojb.broker.OneToManyTest.testDeleteWithRemovalAwareCollection
(OneToManyTest.java:74)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
</snip>

from tests-odmg.txt
<snip>
Testcase: testAdding took 0,047 sec
        Caused an ERROR
[IBM][CLI Driver][DB2/NT] SQL0204N  "MARTIN.OJB_DMAP_ENTRIES" ist ein
nicht definierter Name.  SQLSTATE=42704

org.odmg.LockNotGrantedException: [IBM][CLI Driver][DB2/NT] SQL0204N
"MARTIN.OJB_DMAP_ENTRIES" ist ein nicht definierter Name.
SQLSTATE=42704

        at
org.apache.ojb.odmg.TransactionImpl.lock(TransactionImpl.java:297)
        at
org.apache.ojb.odmg.collections.DMapImpl.put(DMapImpl.java:198)
        at org.apache.ojb.odmg.DMapTest.testAdding(DMapTest.java:123)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
</snip>























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

Reply via email to