> The DListImpl class request on creation time and for each entry an ID > from the SequenceManager (DListImpl_2 a new implementation try to avoid > this overhead) and it seems you don't have created the tables used by > DListImpl.
The tables are there, I probably should have got that out of the way in the first place ;) BTW. I am using RC5. >From my HSQL .script: ... CREATE TABLE OJB_HL_SEQ(TABLENAME VARCHAR(175) NOT NULL,FIELDNAME VARCHAR(70) NOT NULL,MAX_KEY INTEGER,GRAB_SIZE INTEGER,VERSION INTEGER,CONSTRAINT SYS_PK_OJB_HL_SEQ PRIMARY KEY(TABLENAME,FIELDNAME)) CREATE TABLE OJB_LOCKENTRY(OID_ VARCHAR(250) NOT NULL,TX_ID VARCHAR(50) NOT NULL,TIMESTAMP_ TIMESTAMP,ISOLATIONLEVEL INTEGER,LOCKTYPE INTEGER,CONSTRAINT SYS_PK_OJB_LOCKENTRY PRIMARY KEY(OID_,TX_ID)) CREATE TABLE OJB_NRM(NAME VARCHAR(250) NOT NULL PRIMARY KEY,OID_ LONGVARBINARY) CREATE TABLE OJB_DLIST(ID INTEGER NOT NULL PRIMARY KEY,SIZE_ INTEGER) CREATE TABLE OJB_DLIST_ENTRIES(ID INTEGER NOT NULL PRIMARY KEY,DLIST_ID INTEGER,POSITION_ INTEGER,OID_ LONGVARBINARY) CREATE TABLE OJB_DSET(ID INTEGER NOT NULL PRIMARY KEY,SIZE_ INTEGER) CREATE TABLE OJB_DSET_ENTRIES(ID INTEGER NOT NULL PRIMARY KEY,DLIST_ID INTEGER,POSITION_ INTEGER,OID_ LONGVARBINARY) CREATE TABLE OJB_DMAP(ID INTEGER NOT NULL PRIMARY KEY,SIZE_ INTEGER) CREATE TABLE OJB_DMAP_ENTRIES(ID INTEGER NOT NULL PRIMARY KEY,DMAP_ID INTEGER,KEY_OID BINARY,VALUE_OID BINARY) ... > Why you need to specify DListImpl as collection class? I found this approach in the mailing list archive. If I don't specify it, OJB uses the RemovalAwareCollection instead. I would think, since I am using ODMG, this would be a better approach. The real reason for this is that I have use cases that are failing. Example unit test case: 1:n automatic update use case: A contains a collection of B. B has a reference back to its parent A. Calling A.addB(B) sets B's reference to A. Create new A. Create new B. Add B to A. Make A persistent. A and B successfully persisted to the DB. Clear the OJB cache Retrieve A (using PB) Start Tx (ODMG) Lock A for writing (ODMG) Create a new B2. Add B2 to A. Commit Tx. Clear Cache. Retrieve A (using PB) Assert(A count Bs == 2) FAIL. B2 was never persisted. ODMG's Persistence by reachability should have persisted B2, should it not? I thought that using DList might fix this. Regards, *================================* | Scott T Weaver | | <[EMAIL PROTECTED]> | | Apache Jetspeed Portal Project | | Apache Pluto Portlet Container | *================================* > -----Original Message----- > From: Armin Waibel [mailto:[EMAIL PROTECTED] > Sent: Wednesday, January 21, 2004 9:37 AM > To: OJB Users List > Subject: Re: SQL exceptions when using DList > > Hi Scott, > > Weaver, Scott wrote: > > Hi All, > > > > I have never used the ODMG specific collection classes before. That > being > > said, I just started using DList in some of my mappings. > > > > Example: > > > > <collection-descriptor > > name="portlets" > > > > element-class- > ref="org.apache.jetspeed.om.common.portlet.PortletDefinitionCo > > mposite" > > collection-class="org.apache.ojb.odmg.collections.DListImpl" > > > > > <inverse-foreignkey field-ref="appId"/> > > </collection-descriptor> > > > > However, when I do specify the DListImpl, I get this error when updating > to > > the DB: > > > > Could not obtain next object: Can't build new sequence: Table not found: > > OJB_HL_SEQ in statement [SELECT > > A0.VERSION,A0.GRAB_SIZE,A0.MAX_KEY,A0.FIELDNAME,A0.TABLENAME FROM > OJB_HL_SEQ > > A0 WHERE A0.TABLENAME LIKE 'SEQ_OJB_DLIST' ] > > The DListImpl class request on creation time and for each entry an ID > from the SequenceManager (DListImpl_2 a new implementation try to avoid > this overhead) and it seems you don't have created the tables used by > DListImpl. > > Why you need to specify DListImpl as collection class? > > regards, > Armin > > > > > Thanks, > > *================================* > > | Scott T Weaver | > > | <[EMAIL PROTECTED]> | > > | Apache Jetspeed Portal Project | > > | Apache Pluto Portlet Container | > > *================================* > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
