openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fay Wang <fyw...@yahoo.com>
Subject Re: Nullable column
Date Fri, 06 Nov 2009 20:00:11 GMT
Hi Annette,
   Is the field materialNummer an Id field?

Regards,
Fay 


----- Original Message ----
From: "Scherer, Annette" <Annette.Scherer@huk-coburg.de>
To: "users@openjpa.apache.org" <users@openjpa.apache.org>
Sent: Fri, November 6, 2009 11:26:59 AM
Subject: Nullable column

Hi all,

I annotated a Column like this, hoping to succed in inserting a null value to that column
@Column(nullable=true)
private String materialNummer;

It doesn't work. 
I get the exception below.
What can I do?


thank you for help
Annette


812  DruckerMaterialAnforderung_DB  TRACE  [main] openjpa.jdbc.SQL - <t 109577864, conn
243469955> executing prepstmnt 1712481810 SELECT SEQSCHEMA AS SEQUENCE_SCHEMA, SEQNAME
AS SEQUENCE_NAME FROM SYSCAT.SEQUENCES
812  DruckerMaterialAnforderung_DB  TRACE  [main] openjpa.jdbc.SQL - <t 109577864, conn
243469955> [0 ms] spent
8656  DruckerMaterialAnforderung_DB  TRACE  [main] openjpa.jdbc.SQL - <t 109577864, conn
2117697081> executing prepstmnt 241307234 SELECT SEQUENCE_VALUE FROM T7.OPENJPA_SEQUENCE_TABLE
WHERE ID = ?  FOR READ ONLY WITH RS USE AND KEEP UPDATE LOCKS [params=(int) 0]
8656  DruckerMaterialAnforderung_DB  TRACE  [main] openjpa.jdbc.SQL - <t 109577864, conn
2117697081> [0 ms] spent
8656  DruckerMaterialAnforderung_DB  TRACE  [main] openjpa.jdbc.SQL - <t 109577864, conn
2117697081> executing prepstmnt 677128284 UPDATE T7.OPENJPA_SEQUENCE_TABLE SET SEQUENCE_VALUE
= ? WHERE ID = ? AND SEQUENCE_VALUE = ? [params=(long) 174151, (int) 0, (long) 174101]
8656  DruckerMaterialAnforderung_DB  TRACE  [main] openjpa.jdbc.SQL - <t 109577864, conn
2117697081> [0 ms] spent
8687  DruckerMaterialAnforderung_DB  TRACE  [main] openjpa.jdbc.SQL - <t 109577864, conn
1268140950> batching prepstmnt 294719889 INSERT INTO T7.DRUCK_MATERIAL (id, bezeichner,
materialNummer) VALUES (?, ?, ?) [params=(String) 174101, (String) Toner/Tinte siehe Bemerkungsfeld,
(null) null]
8687  DruckerMaterialAnforderung_DB  TRACE  [main] openjpa.jdbc.SQL - <t 109577864, conn
1268140950> [0 ms] spent
8687  DruckerMaterialAnforderung_DB  TRACE  [main] openjpa.jdbc.SQL - <t 109577864, conn
1268140950> batching prepstmnt 294719889 INSERT INTO T7.DRUCK_MATERIAL (id, bezeichner,
materialNummer) VALUES (?, ?, ?) [params=(String) 174102, (String) Toner, cyan, (String) 20K1400]
8687  DruckerMaterialAnforderung_DB  TRACE  [main] openjpa.jdbc.SQL - <t 109577864, conn
1268140950> [0 ms] spent
.......
Exception in thread "main" <openjpa-1.2.1-r752877:753278 fatal store error> org.apache.openjpa.persistence.RollbackException:
Das Rollback der Transaktion ist abgeschlossen. Suchen Sie in den verschachtelten Ausnahmen
nach Einzelheiten zu den aufgetretenen Fehlern.
    at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:523)
    at de.huk.dma.persist.DataPersistorMain.main(DataPersistorMain.java:39)
Caused by: <openjpa-1.2.1-r752877:753278 fatal general error> org.apache.openjpa.persistence.PersistenceException:
Das Rollback der Transaktion ist abgeschlossen. Suchen Sie in den verschachtelten Ausnahmen
nach Einzelheiten zu den aufgetretenen Fehlern.
    at org.apache.openjpa.kernel.BrokerImpl.newFlushException(BrokerImpl.java:2163)
    at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2010)
    at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1908)
    at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1826)
    at org.apache.openjpa.kernel.LocalManagedRuntime.commit(LocalManagedRuntime.java:81)
    at org.apache.openjpa.kernel.BrokerImpl.commit(BrokerImpl.java:1350)
    at org.apache.openjpa.kernel.DelegatingBroker.commit(DelegatingBroker.java:877)
    at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:512)
    ... 1 more
Caused by: <openjpa-1.2.1-r752877:753278 nonfatal general error> org.apache.openjpa.persistence.PersistenceException:
Non-atomic batch failure.  The batch was submitted, but at least one exception occurred on
an individual member of the batch. Use getNextException() to retrieve the exceptions for specific
batched elements.SQLCA OUTPUT[Errp=SQLDFMT1, Errd=-2146041828, 28, 0, 0, -957, 0]
Error for batch element #0: DB2 SQL error: SQLCODE: -407, SQLSTATE: 23502, SQLERRMC: TBSPACEID=2,
TABLEID=269, COLNO=0
FailedObject: prepstmnt 294719889 INSERT INTO T7.DRUCK_MATERIAL (id, bezeichner, materialNummer)
VALUES (?, ?, ?) [org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement]
    at org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:4232)
    at org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4197)
    at org.apache.openjpa.jdbc.sql.DB2Dictionary.newStoreException(DB2Dictionary.java:503)
    at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:102)
    at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:72)
    at org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushBatch(BatchingPreparedStatementManagerImpl.java:195)
    at org.apache.openjpa.jdbc.kernel.BatchingConstraintUpdateManager.flush(BatchingConstraintUpdateManager.java:63)
    at com.ibm.ws.persistence.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:78)
    at com.ibm.ws.persistence.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:60)
    at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:717)
    at org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:130)
    ... 8 more
Caused by: com.ibm.db2.jcc.a.dg: Non-atomic batch failure.  The batch was submitted, but at
least one exception occurred on an individual member of the batch. Use getNextException()
to retrieve the exceptions for specific batched elements.
    at com.ibm.db2.jcc.a.f.a(f.java:328)
    at com.ibm.db2.jcc.a.cp.a(cp.java:2160)
    at com.ibm.db2.jcc.a.cp.executeBatch(cp.java:1991)
    at com.ibm.db2.jcc.a.cp.executeBatch(cp.java:1010)
    at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeBatch(DelegatingPreparedStatement.java:244)
    at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeBatch(LoggingConnectionDecorator.java:878)
    at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeBatch(DelegatingPreparedStatement.java:244)
    at org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement.executeBatch(JDBCStoreManager.java:1604)
    at org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.executeBatch(BatchingPreparedStatementManagerImpl.java:325)
    at org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushBatch(BatchingPreparedStatementManagerImpl.java:188)
    ... 13 more


      

Mime
View raw message