Will you please create a small, repeatable unit test so someone can
investigate this issue?

Thanks,
Rick

On Wed, May 18, 2011 at 2:30 AM, dp <[email protected]> wrote:

> I discovered something else just now. I just changed the attribute name of
> "auxdata" to "zauxdata", the meta process passed through and new exception
> happened. It is quite interesting. Should the meta process not concern with
> how I name my attribute? Anyway, the same persist exception happens again.
> can anyone help?
>
> @Entity
> @Table(name = "A")
> @SecondaryTable(name = "B", pkJoinColumns = { @PrimaryKeyJoinColumn(name =
> "PUID", referencedColumnName = "UID") })
> public class A implements Serializable {
>
>        /**
>         *
>         */
>        private static final long serialVersionUID = -422971967901446019L;
>
>        @Id
>        @Column(name = "ID")
>        private String id;
>        @Basic(optional = true)
>        @GeneratedValue(strategy = GenerationType.IDENTITY)
>        @Column(name = "UID", unique = true)
>        private Integer uid;
>        @Basic(optional = true)
>        @Column(name = "DATA")
>        private String data;
>        @Basic(optional = true)
>        @Column(table = "B", name = "AUXDATA")
>         private String zauxdata;
>
>        public A() {
>
>        }
>
>        public A(String id) {
>                this.id = id;
>        }
>
>        public String getId() {
>                return id;
>        }
>
>        public void setId(String id) {
>                this.id = id;
>        }
>
>        public Integer getUid() {
>                return uid;
>        }
>
>        public void setUid(Integer uid) {
>                this.uid = uid;
>        }
>
>        public String getData() {
>                return data;
>        }
>
>        public void setData(String data) {
>                this.data = data;
>        }
>
>         public String getZauxdata() {
>                return zauxdata;
>        }
>
>        public void setZauxdata(String zauxdata) {
>                this.zauxdata = zauxdata;
>        }
>
> }
>
>
>
> 2203  TestPersistence  TRACE  [main] openjpa.jdbc.SQLDiag - flush:
> org.apache.openjpa.kernel.PNewState for oid=z
> 2218  TestPersistence  TRACE  [main] openjpa.jdbc.JDBC - The batch limit is
> set to 100.
> 2234  TestPersistence  TRACE  [main] openjpa.jdbc.SQL - <t 3865497, conn
> 6044039> executing prepstmnt 9170930 INSERT INTO test.A (ID, DATA) VALUES
> (?, ?) [params=?, ?]
> 2250  TestPersistence  TRACE  [main] openjpa.jdbc.SQL - <t 3865497, conn
> 6044039> [16 ms] spent
> 2250  TestPersistence  TRACE  [main] openjpa.jdbc.SQL - <t 3865497, conn
> 6044039> executing prepstmnt 20327011 SELECT IDENTITY_VAL_LOCAL() FROM
> SYSIBM.SYSDUMMY1
> 2265  TestPersistence  TRACE  [main] openjpa.jdbc.SQL - <t 3865497, conn
> 6044039> [15 ms] spent
> 2265  TestPersistence  TRACE  [main] openjpa.jdbc.SQL - <t 3865497, conn
> 6044039> executing prepstmnt 13007496 INSERT INTO test.B (PUID, AUXDATA)
> VALUES (?, ?) [params=?, ?]
> 2265  TestPersistence  TRACE  [main] openjpa.jdbc.SQL - <t 3865497, conn
> 6044039> [0 ms] spent
> 2281  TestPersistence  TRACE  [main] openjpa.Runtime - An exception
> occurred
> while ending the transaction.  This exception will be re-thrown.
> <openjpa-2.1.0-r422266:1071316 fatal store error>
> org.apache.openjpa.util.StoreException: The transaction has been rolled
> back.  See the nested exceptions for details on the errors that occurred.
> FailedObject: com.ibm.taiss.jpa.test.A@628704
>        at
>
> org.apache.openjpa.kernel.BrokerImpl.newFlushException(BrokerImpl.java:2316)
>        at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2154)
>        at
> org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:2051)
>        at
> org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1969)
>        at
>
> org.apache.openjpa.kernel.LocalManagedRuntime.commit(LocalManagedRuntime.java:81)
>         at
> org.apache.openjpa.kernel.BrokerImpl.commit(BrokerImpl.java:1493)
>        at
>
> org.apache.openjpa.kernel.DelegatingBroker.commit(DelegatingBroker.java:925)
>        at
>
> org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:561)
>        at com.ibm.taiss.jpa.test.Test.main(Test.java:33)
> Caused by: <openjpa-2.1.0-r422266:1071316 fatal store error>
> org.apache.openjpa.util.ReferentialIntegrityException: DB2 SQL error:
> SQLCODE: -407, SQLSTATE: 23502, SQLERRMC: TBSPACEID=2, TABLEID=264, COLNO=0
> {prepstmnt 13007496 INSERT INTO test.B (PUID, AUXDATA) VALUES (?, ?)
> [params=?, ?]} [code=-407, state=23502]SQLCA OUTPUT[Errp=SQLDFMT1,
> Errd=-2146041828, 28, 0, 0, -1057, 0]
> DB2 SQL error: SQLCODE: -407, SQLSTATE: 23502, SQLERRMC: TBSPACEID=2,
> TABLEID=264, COLNO=0
> FailedObject: com.ibm.taiss.jpa.test.A@628704
>        at
> org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:4863)
>        at
>
> org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4829)
>        at
>
> org.apache.openjpa.jdbc.sql.DB2Dictionary.newStoreException(DB2Dictionary.java:592)
>        at
> org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:137)
>        at
> org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:78)
>        at
>
> org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushBatch(BatchingPreparedStatementManagerImpl.java:217)
>        at
>
> org.apache.openjpa.jdbc.kernel.BatchingConstraintUpdateManager.flush(BatchingConstraintUpdateManager.java:63)
>         at
>
> org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:103)
>         at
>
> org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:76)
>         at
>
> org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:742)
>        at
>
> org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:131)
>        ... 8 more
> Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: DB2 SQL
> error:
> SQLCODE: -407, SQLSTATE: 23502, SQLERRMC: TBSPACEID=2, TABLEID=264, COLNO=0
> {prepstmnt 13007496 INSERT INTO test.B (PUID, AUXDATA) VALUES (?, ?)
> [params=?, ?]} [code=-407, state=23502]
>        at
>
> org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:281)
>        at
>
> org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:257)
>        at
>
> org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$4(LoggingConnectionDecorator.java:256)
>        at
>
> org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeUpdate(LoggingConnectionDecorator.java:1199)
>        at
>
> org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:291)
>        at
>
> org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement.executeUpdate(JDBCStoreManager.java:1776)
>        at
>
> org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.executeUpdate(PreparedStatementManagerImpl.java:267)
>        at
>
> org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushSingleRow(BatchingPreparedStatementManagerImpl.java:246)
>        at
>
> org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushBatch(BatchingPreparedStatementManagerImpl.java:155)
>        ... 13 more
> 2296  TestPersistence  TRACE  [main] openjpa.jdbc.JDBC - <t 3865497, conn
> 6044039> [15 ms] rollback
> 2296  TestPersistence  TRACE  [main] openjpa.jdbc.JDBC - <t 3865497, conn
> 0>
> [0 ms] close
> 2296  TestPersistence  TRACE  [main] openjpa.Runtime - An exception
> occurred
> while ending the transaction.  This exception will be re-thrown.
> <openjpa-2.1.0-r422266:1071316 fatal store error>
> org.apache.openjpa.util.StoreException: The transaction has been rolled
> back.  See the nested exceptions for details on the errors that occurred.
> FailedObject: com.ibm.taiss.jpa.test.A@628704
>        at
>
> org.apache.openjpa.kernel.BrokerImpl.newFlushException(BrokerImpl.java:2316)
>        at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2154)
>        at
> org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:2051)
>        at
> org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1969)
>        at
>
> org.apache.openjpa.kernel.LocalManagedRuntime.commit(LocalManagedRuntime.java:81)
>         at
> org.apache.openjpa.kernel.BrokerImpl.commit(BrokerImpl.java:1493)
>        at
>
> org.apache.openjpa.kernel.DelegatingBroker.commit(DelegatingBroker.java:925)
>        at
>
> org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:561)
>        at com.ibm.taiss.jpa.test.Test.main(Test.java:33)
> Caused by: <openjpa-2.1.0-r422266:1071316 fatal store error>
> org.apache.openjpa.util.ReferentialIntegrityException: DB2 SQL error:
> SQLCODE: -407, SQLSTATE: 23502, SQLERRMC: TBSPACEID=2, TABLEID=264, COLNO=0
> {prepstmnt 13007496 INSERT INTO test.B (PUID, AUXDATA) VALUES (?, ?)
> [params=?, ?]} [code=-407, state=23502]SQLCA OUTPUT[Errp=SQLDFMT1,
> Errd=-2146041828, 28, 0, 0, -1057, 0]
> DB2 SQL error: SQLCODE: -407, SQLSTATE: 23502, SQLERRMC: TBSPACEID=2,
> TABLEID=264, COLNO=0
> FailedObject: com.ibm.taiss.jpa.test.A@628704
>        at
> org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:4863)
>        at
>
> org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4829)
>        at
>
> org.apache.openjpa.jdbc.sql.DB2Dictionary.newStoreException(DB2Dictionary.java:592)
>        at
> org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:137)
>        at
> org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:78)
>        at
>
> org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushBatch(BatchingPreparedStatementManagerImpl.java:217)
>        at
>
> org.apache.openjpa.jdbc.kernel.BatchingConstraintUpdateManager.flush(BatchingConstraintUpdateManager.java:63)
>         at
>
> org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:103)
>         at
>
> org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:76)
>         at
>
> org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:742)
>        at
>
> org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:131)
>        ... 8 more
> Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: DB2 SQL
> error:
> SQLCODE: -407, SQLSTATE: 23502, SQLERRMC: TBSPACEID=2, TABLEID=264, COLNO=0
> {prepstmnt 13007496 INSERT INTO test.B (PUID, AUXDATA) VALUES (?, ?)
> [params=?, ?]} [code=-407, state=23502]
>        at
>
> org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:281)
>        at
>
> org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:257)
>        at
>
> org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$4(LoggingConnectionDecorator.java:256)
>        at
>
> org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeUpdate(LoggingConnectionDecorator.java:1199)
>        at
>
> org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:291)
>        at
>
> org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement.executeUpdate(JDBCStoreManager.java:1776)
>        at
>
> org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.executeUpdate(PreparedStatementManagerImpl.java:267)
>        at
>
> org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushSingleRow(BatchingPreparedStatementManagerImpl.java:246)
>        at
>
> org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushBatch(BatchingPreparedStatementManagerImpl.java:155)
>        ... 13 more
> Exception in thread "main" <openjpa-2.1.0-r422266:1071316 fatal store
> error>
> org.apache.openjpa.persistence.RollbackException: The transaction has been
> rolled back.  See the nested exceptions for details on the errors that
> occurred.
> FailedObject: com.ibm.taiss.jpa.test.A@628704
>        at
>
> org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:585)
>        at com.ibm.taiss.jpa.test.Test.main(Test.java:33)
> Caused by: <openjpa-2.1.0-r422266:1071316 fatal general error>
> org.apache.openjpa.persistence.PersistenceException: The transaction has
> been rolled back.  See the nested exceptions for details on the errors that
> occurred.
> FailedObject: com.ibm.taiss.jpa.test.A@628704
>        at
>
> org.apache.openjpa.kernel.BrokerImpl.newFlushException(BrokerImpl.java:2316)
>        at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2154)
>        at
> org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:2051)
>        at
> org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1969)
>        at
>
> org.apache.openjpa.kernel.LocalManagedRuntime.commit(LocalManagedRuntime.java:81)
>         at
> org.apache.openjpa.kernel.BrokerImpl.commit(BrokerImpl.java:1493)
>        at
>
> org.apache.openjpa.kernel.DelegatingBroker.commit(DelegatingBroker.java:925)
>        at
>
> org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:561)
>        ... 1 more
> Caused by: <openjpa-2.1.0-r422266:1071316 fatal general error>
> org.apache.openjpa.persistence.PersistenceException: DB2 SQL error:
> SQLCODE:
> -407, SQLSTATE: 23502, SQLERRMC: TBSPACEID=2, TABLEID=264, COLNO=0
> {prepstmnt 13007496 INSERT INTO test.B (PUID, AUXDATA) VALUES (?, ?)
> [params=?, ?]} [code=-407, state=23502]SQLCA OUTPUT[Errp=SQLDFMT1,
> Errd=-2146041828, 28, 0, 0, -1057, 0]
> DB2 SQL error: SQLCODE: -407, SQLSTATE: 23502, SQLERRMC: TBSPACEID=2,
> TABLEID=264, COLNO=0
> FailedObject: com.ibm.taiss.jpa.test.A@628704
>        at
> org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:4863)
>        at
>
> org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4829)
>        at
>
> org.apache.openjpa.jdbc.sql.DB2Dictionary.newStoreException(DB2Dictionary.java:592)
>        at
> org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:137)
>        at
> org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:78)
>        at
>
> org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushBatch(BatchingPreparedStatementManagerImpl.java:217)
>        at
>
> org.apache.openjpa.jdbc.kernel.BatchingConstraintUpdateManager.flush(BatchingConstraintUpdateManager.java:63)
>         at
>
> org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:103)
>         at
>
> org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:76)
>         at
>
> org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:742)
>        at
>
> org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:131)
>        ... 8 more
> Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: DB2 SQL
> error:
> SQLCODE: -407, SQLSTATE: 23502, SQLERRMC: TBSPACEID=2, TABLEID=264, COLNO=0
> {prepstmnt 13007496 INSERT INTO test.B (PUID, AUXDATA) VALUES (?, ?)
> [params=?, ?]} [code=-407, state=23502]
>        at
>
> org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:281)
>        at
>
> org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:257)
>        at
>
> org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$4(LoggingConnectionDecorator.java:256)
>        at
>
> org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeUpdate(LoggingConnectionDecorator.java:1199)
>        at
>
> org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:291)
>        at
>
> org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement.executeUpdate(JDBCStoreManager.java:1776)
>        at
>
> org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.executeUpdate(PreparedStatementManagerImpl.java:267)
>        at
>
> org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushSingleRow(BatchingPreparedStatementManagerImpl.java:246)
>        at
>
> org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushBatch(BatchingPreparedStatementManagerImpl.java:155)
>        ... 13 more
>
>
-- 
*Rick Curtis*

Reply via email to