db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From karan malhi <karan.ma...@gmail.com>
Subject jpox cannot find sequence
Date Fri, 16 Sep 2005 01:58:11 GMT
Hi ,

I am trying to call 
pm.getSequence("org.apache.jdo.tck.pc.company.TestSequence") and i get a 
JDOUserException that jpox is unable to find the sequence.
Has anybody successfully obtained a sequence with jpox before?
Can anybody guide me as to what am i missing in writing this test case. 
If you dont find anything wrong with it, then should i assume that this 
test fails and jpox does not support sequence .
 Has anybody tried any of the tests with mysql (we will have to run 
against some db to test native datastore sequence since derby doesnt 
support them)

HERE IS MY .CONF FILE

jdo.tck.description = Run one test for debugging
jdo.tck.testdata =
jdo.tck.standarddata =
jdo.tck.mapping = 0
jdo.tck.classes = org.apache.jdo.tck.api.persistencemanager.Test

HERE IS PART OF MY package-derby.orm FILE

<orm>
    <package name="org.apache.jdo.tck.pc.company">
     <sequence name="TestSequence"  strategy="contiguous"/>
        <class name="Company" table="companies">

TEST.JAVA (I am just trying to get a sequence)

    public void test() {
        pm = getPM();
        Transaction tx = pm.currentTransaction();
        tx.begin();
        try{
        Sequence seq = 
pm.getSequence("org.apache.jdo.tck.pc.company.TestSequence");
        }catch(JDOUserException e){
           
            fail(ASSERTION_FAILED,
            "Could not get sequence "+e.getMessage().toUpperCase());
           
        }


        tx.commit();
        pm.close();
        pm = null;
        }

MAVEN COMMAND

maven -bo -Djdo.tck.cfglist=aaa.conf 
-Djdo.tck.identitytypes=applicationidentity runtck.jdori


ERROR

doRuntck.jdori:
    [java] RUN Test.test        21:43:10,140 (main) DEBUG 
[JPOX.RDBMS.SCHEMA] - Database adapter allows schemas to be used in 
table definitions
    [java] 21:43:10,140 (main) INFO  [JPOX.RDBMS] - RDBMS Adapter 
initialised : CloudscapeAdapter : Apache Derby version=10.1.1.0, 
major=10, minor=1, revision=1
    [java] Identifier Names : UPPERCASE
    [java] Driver name=Apache Derby Embedded JDBC Driver, 
version=10.1.1.0, major=10, minor=1
    [java] Identifier Max Lengths : Table=128  Column=30  Constraint=18  
Index=18  Delimeters="
    [java] Identifier Support in DDL : catalog=false  schema=true
    [java] 21:43:10,140 (main) INFO  [JPOX.RDBMS.SCHEMA] - Initialising 
Catalog "", Schema "TCKUSER" using "None" auto-start option
    [java] 21:43:10,156 (main) INFO  [JPOX.RDBMS.SCHEMA] - Catalog "", 
Schema "TCKUSER" initialised - managing 0 classes
    [java]    FAILURE
    [java] Description: Run one test for debugging
    [java] Time: 002
    [java] There was 1 failure:
    [java] 1) 
test(org.apache.jdo.tck.api.persistencemanager.Test)junit.framework.AssertionFailedError:

Assertion A12.14-1 (Test) failed:
    [java] Could not get sequence THE REQUESTED SEQUENCE 
"ORG.APACHE.JDO.TCK.PC.COMPANY.TESTSEQUENCE" COULD NOT BE FOUND. PLEASE 
MAKE SURE THAT IT IS SPECIFIED IN A VALID META-DATA FILE.
    [java]      at org.apache.jdo.tck.JDO_Test.fail(JDO_Test.java:546)
    [java]      at 
org.apache.jdo.tck.api.persistencemanager.Test.test(Test.java:69)
    [java]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method)
    [java]      at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    [java]      at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [java]      at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:204)
    [java]      at 
org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:115)
    [java]      at 
org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:93)
    [java] FAILURES!!!
    [java] derby-app-aaa-junit.txt:
    [java]     ** Tests run: 001, Time: 002 seconds. Failures: 1, Errors: 0
    [java] Excluded tests: 
[org.apache.jdo.tck.enhancement.FieldAccessModified, 
org.apache.jdo.tck.enhancement.ImplementsPersistenceCapable]
    [java] [ERROR] Java Result: 1
    [echo] Finished run with database="derby" 
identitytype="applicationidentity" mapping="".


-- 
Karan Singh


Mime
View raw message