Hi Helene, Can you please add a new issue at http://jira.codehaus.org/browse/CASTOR, and attach your code as well. I'd appreciate if you attached your files as a unified patch following the bug submission guidelines at
http://castor.codehaus.org/how-to-submit-a-bug.html Regards Werner > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Dienstag, 08. November 2005 07:25 > To: [email protected] > Subject: [castor-user] JDO: db.update causes a SQLException > since castor 0.9.9 > > Hello, > > I have some problems with db.update since I upgraded from > castor 0.9.6 to 0.9.9. > In the Javacode below you can see, that I don't set the field > "endtime". That's why I get the following Exception: > > > 07.11.2005 09:05:57 org.exolab.castor.jdo.engine.SQLEngine create > INFO: A fatal error occurred while creating/updating > oms.db.castor.entities.FiletransferexecutionImpl using SQL: > {call INSERT INTO "FILETRANSFEREXECUTION" > ("STARTTIME","ENDTIME","FILETRANSFERINSTANCE","STATE") VALUES > (?,?,?,?) RETURNING "ID" INTO ?} > java.sql.SQLException: ORA-01008: Nicht allen Variablen ist > ein Wert zugeordnet > > at > oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134) > . . . > > Do you have any idea why I get this exception, because in > Oracle "endtime" is a nullable column and in the mapping file > the field has required="false"? > > > > > //*********** Javacode ************************************** > > ftExecution = > (Filetransferexecution)BOManager.getInstance(Filetransferexecu > tion.class); > ftExecution.setStarttime(new Timestamp(today.getTime())); > ftExecution.setFiletransferinstance(filetransferinstance); > ftExecution.setState(ftState); > db.update(ftExecution); > > > > //********* Table in Oracle ********************************* > > SQL> desc filetransferexecution; > Name Null? Typ > ----------------------------------------- -------- > ---------------------------- > ID NOT NULL NUMBER(18) > FILETRANSFERINSTANCE NOT NULL NUMBER(18) > STATE NOT NULL NUMBER(18) > STARTTIME DATE > ENDTIME DATE > > > //********* mapping.xml ************************************** > > <!-- Mapping for Filetransferexecution --> <class > name="oms.db.castor.entities.FiletransferexecutionImpl" > identity="id" key-generator="RETURNING"> > <cache-type type="unlimited"/> > <map-to table="FILETRANSFEREXECUTION"/> > <field name="id" type="long"> > <sql name="id" type="numeric"/> > </field> > <field name="starttime" type="timestamp" required="false"> > <sql name="starttime" type="timestamp"/> > </field> > <field name="endtime" type="timestamp" required="false"> > <sql name="endtime" type="timestamp"/> > </field> > <field name="filetransferinstance" > type="oms.db.castor.entities.FiletransferinstanceImpl"> > <sql name="filetransferinstance"/> > </field> > <field name="state" > type="oms.db.castor.entities.FiletransferstateImpl"> > <sql name="state"/> > </field> > </class> > > > Thanks, > Helene > > ------------------------------------------------- > If you wish to unsubscribe from this list, please send an > empty message to the following address: > > [EMAIL PROTECTED] > ------------------------------------------------- > > > ------------------------------------------------- If you wish to unsubscribe from this list, please send an empty message to the following address: [EMAIL PROTECTED] -------------------------------------------------

