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 Saulo Arruda Coelho <sa...@studioweb.ws> on 2003/05/01 19:59:49 UTC

Can not get next org.apache.ojb.broker.util.sequence.HighLowSequence for next scope of keys

I define a repository.xml with default configuration, like follows:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE descriptor-repository SYSTEM "repository.dtd" []>
<descriptor-repository version="1.0" isolation-level="read-uncommitted">
   <jdbc-connection-descriptor
        jcd-alias="default"
        default-connection="true"
        platform="Hsqldb"
        jdbc-level="2.0"
        driver="org.hsqldb.jdbcDriver"
        protocol="jdbc"
        subprotocol="hsqldb"
        dbalias="..\data\auth"
        username="sa"
        password=""
        batch-mode="false"
        useAutoCommit="1"
        ignoreAutoCommitExceptions="false"
   />

    <!-- class User
        exprSQL:
        DROP TABLE USER
        CREATE TABLE USER  (
              USER_ID    INT PRIMARY KEY,
              NAME  VARCHAR(100) NOT NULL,
              LOGIN VARCHAR(10) NOT NULL,
              PASSWD VARCHAR(30) NOT NULL,
              EMAIL VARCHAR(100) NOT NULL
        )

    -->
    <class-descriptor
 class="User"
 table="USER"
    >
 <field-descriptor
  name="userOID"
  column="USER_ID"
  jdbc-type="INTEGER"
  primarykey="true"
  autoincrement="true"
 />
 <field-descriptor
  name="name"
  column="NAME"
  jdbc-type="VARCHAR"
 />
 <field-descriptor
  name="passwd"
  column="PASSWD"
  jdbc-type="VARCHAR"
 />
 <field-descriptor
  name="login"
  column="LOGIN"
  jdbc-type="VARCHAR"
 />
 <field-descriptor
  name="email"
  column="EMAIL"
  jdbc-type="VARCHAR"
 />
 </class-descriptor>
</descriptor-repository>

And if i try to store an object without set the primary key this is the
message:
Can not get next org.apache.ojb.broker.util.sequence.HighLowSequence for
next scope of keys

But it works if the primary key of the object is given.

Please Help Me!!

saulo