Guillaume Laforge wrote: We use Oracle with Oracle sequences and it works out fine. We use OJB 1.0.1 and Oracle9i.
Have a look at our set-up: <field-descriptor name="adressartId" column="adressart_id" jdbc-type="INTEGER" primarykey="true" autoincrement="true" access="readwrite" sequence-name="ADRESSART_ID_SEQ" /> <jdbc-connection-descriptor jcd-alias="default" default-connection="true" platform="Oracle9i" jdbc-level="2.0" driver="oracle.jdbc.driver.OracleDriver" protocol="jdbc" subprotocol="oracle" dbalias="thin:@(description=(address=(host=xxx.x.x.xxx)(protocol=tcp)(port=1521))(connect_data=(sid=xxx)(server=dedicated)))" username="xx" password="xxx" eager-release="false" batch-mode="false" useAutoCommit="1" ignoreAutoCommitExceptions="false" > <connection-pool whenExhaustedAction="2" maxActive="100" maxIdle="20" maxWait="2000" testOnBorrow="true" logAbandoned="false" removeAbandoned="true" validationQuery="select count(*) from datenklasse" /> <sequence-manager className="org.apache.ojb.broker.util.sequence.SequenceManagerNextValImpl"> </sequence-manager> </jdbc-connection-descriptor> > <sequence-manager > className="org.apache.ojb.broker.util.sequence.SequenceManagerNextValImpl"> > <attribute attribute-name="autoNaming" attribute-value="true"/> <attribute > attribute-name="globalSequenceStart" attribute-value="1000"/> > </sequence-manager> I think here is one conflict. You have to figure out who shall manage the sequences OJB or Oracle. If you don't use clustered environments or other not OJB applications which insert objects too OJB can manage the sequences. > And xDoclet generated the following mapping snippet: > > <field-descriptor name="id" column="ID" jdbc-type="BIGINT" > primarykey="true" autoincrement="true" sequence-name="seq1" > access="readonly" >> access should be set to readwrite. If you don't use autoNaming you have also to create the sequences in Oracle. -- Mit freundlichen Grüßen Thomas Franke Geschäftsführer Leiter Entwicklung ------------------------------ the energy for a better world ------------------------------ softEnergy GmbH Platz der Freundschaft 1 18059 Rostock ------------------------------ fon: +49 381 40 587 535 fax: +49 381 40 587 555 mobil: +49 162 249 8860 (Achtung neue Nummer!) http://www.softenergy.de mail: [EMAIL PROTECTED] ------------------------------ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]