http://jakarta.apache.org/ojb/sequencemanager.html

> -----Urspr�ngliche Nachricht-----
> Von: Thomas Fahrmeyer [mailto:[EMAIL PROTECTED]]
> Gesendet: Dienstag, 3. September 2002 01:58
> An: OJB Users List; [EMAIL PROTECTED]
> Betreff: AW: Autoincrement failed while saving 
> 
> 
> I've investigated that it is related to the Primary key 
> management in table
> OJB_HL_SEQ.
> Somehow it happend that my primary key is e.g 76, but in the table
> OJB_HL_SEQ is the max key for my table 85 and grab size is 10 
> -> 76 + 10 >
> 85 -> ERROR
> 
> How can that happen ? I descreased the max key manually, 
> shutdown,startup
> and it works, but just one time.
> Can i use the AUTOINCREMENT mechanism from MySql to avoid 
> such behaviour ?
> Where can I plug in my own Sequence Manager that reads the last ID and
> increments it by 1 ?
> 
> Thanx
> Thomas
> 
> 
> > -----Urspr�ngliche Nachricht-----
> > Von: Thomas Fahrmeyer [mailto:[EMAIL PROTECTED]]
> > Gesendet: Dienstag, 3. September 2002 01:39
> > An: OJB Users List
> > Betreff: Autoincrement failed while saving
> >
> >
> > Hi,
> >
> > while I wanted to save a object with a lot of related 
> objects I got the
> > Exception with following detailmessage:
> >
> > detailMessage = "OJB ERROR: Dont know how to autoincrement 
> field class
> > de.virtualsolution.ojb.Selection.id"
> >
> > Selection is the root object. With the definition in 
> repository.xml it is
> > possible to save the seletion. The code for saving is
> >
> >        try {
> >             broker = BrokerFactory.getDefaultBroker();
> >
> >             broker.beginTransaction();
> >
> >             // ToDo: check for flag: create as MarketingAction
> >             broker.store(sel);
> >             // 7. commit transaction
> >             broker.commitTransaction();
> >             broker.close();
> >             ok = true;
> >         } catch (PersistenceBrokerException pbe) {
> >             m_log.error("Selection could not be saved !", pbe);
> >         }
> >
> > Autoincrement is defined and normally works, so I have no 
> idea what that
> > message can mean. What should I check to find the real problem.
> > Can it be, that the error is related to one of the 
> subobjects and some
> > missing configurations in repository.xml ?
> >
> > Thanx for you help.
> > Thomas
> >
> >
> > --
> > To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> >
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 

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

Reply via email to