Hi everybody,
I am already trying to upgrade Castor JDO from 1.2
to 1.3.2. I am already using Castor JDO in standalone mode (not
integrated with Spring).
Since this upgrade, the code didn't work anymore. It seems there are identity problem as you can see below:
16:26:04,121 INFO [STDOUT] ERROR : workflowEngine.EX_ERROR_
PROCESSING_REQUEST | MODULE : workflowEngine.WorkflowEngineThread | Erreur lors du traitement d'une requête de la liste d'attente (com.silverpeas.workflow.engine.TimeoutRequest@4d9c674e, EXCEPTION : !!! Message workflowEngine.EX_ERR_PROCESS_ADD_TIMEOUT_REQUEST NOT INITIALIZED !!!
16:26:04,121 INFO [STDOUT] nested (Deepest) :
16:26:04,122 INFO [STDOUT] org.exolab.castor.jdo.TransactionAbortedException: Nested error: javax.persistence.PersistenceException: Size of identity field mismatch!: Size of identity field mismatch!
16:26:04,122 INFO [STDOUT] at org.castor.persist.AbstractTransactionContext.prepare(AbstractTransactionContext.java:1188)
16:26:04,122 INFO [STDOUT] at org.exolab.castor.jdo.engine.LocalDatabaseImpl.commit(LocalDatabaseImpl.java:159)
16:26:04,123 INFO [STDOUT] at com.silverpeas.workflow.engine.TimeoutRequest.process(WorkflowEngineThread.java:1032)
16:26:04,123 INFO [STDOUT] at com.silverpeas.workflow.engine.WorkflowEngineThread.run(WorkflowEngineThread.java:183)
16:26:04,123 INFO [STDOUT] Caused by: javax.persistence.PersistenceException: Size of identity field mismatch!
16:26:04,123 INFO [STDOUT] at org.castor.cpa.persistence.sql.engine.info.TableInfo.toSQL(TableInfo.java:232)
16:26:04,123 INFO [STDOUT] at org.castor.cpa.persistence.sql.engine.SQLStatementUpdate.appendOldEntityCondition(SQLStatementUpdate.java:202)
16:26:04,124 INFO [STDOUT] at org.castor.cpa.persistence.sql.engine.SQLStatementUpdate.executeStatement(SQLStatementUpdate.java:157)
16:26:04,124 INFO [STDOUT] at org.exolab.castor.jdo.engine.SQLEngine.store(SQLEngine.java:359)
16:26:04,124 INFO [STDOUT] at org.exolab.castor.persist.ClassMolder.store(ClassMolder.java:905)
16:26:04,124 INFO [STDOUT] at org.exolab.castor.persist.LockEngine.store(LockEngine.java:906)
16:26:04,124 INFO [STDOUT] at org.castor.persist.AbstractTransactionContext.prepareForCreate(AbstractTransactionContext.java:1230)
16:26:04,124 INFO [STDOUT] at org.castor.persist.AbstractTransactionContext.prepare(AbstractTransactionContext.java:1175)
16:26:04,124 INFO [STDOUT] ... 3 more
16:26:04,124 INFO [STDOUT] Caused by: javax.persistence.PersistenceException: Size of identity field mismatch!
16:26:04,124 INFO [STDOUT] at org.castor.cpa.persistence.sql.engine.info.TableInfo.toSQL(TableInfo.java:232)
16:26:04,124 INFO [STDOUT] at org.castor.cpa.persistence.sql.engine.SQLStatementUpdate.appendOldEntityCondition(SQLStatementUpdate.java:202)
16:26:04,125 INFO [STDOUT] at org.castor.cpa.persistence.sql.engine.SQLStatementUpdate.executeStatement(SQLStatementUpdate.java:157)
16:26:04,125 INFO [STDOUT] at org.exolab.castor.jdo.engine.SQLEngine.store(SQLEngine.java:359)
16:26:04,125 INFO [STDOUT] at org.exolab.castor.persist.ClassMolder.store(ClassMolder.java:905)
16:26:04,125 INFO [STDOUT] at org.exolab.castor.persist.LockEngine.store(LockEngine.java:906)
16:26:04,125 INFO [STDOUT] at org.castor.persist.AbstractTransactionContext.prepareForCreate(AbstractTransactionContext.java:1230)
16:26:04,125 INFO [STDOUT] at org.castor.persist.AbstractTransactionContext.prepare(AbstractTransactionContext.java:1175)
16:26:04,125 INFO [STDOUT] at org.exolab.castor.jdo.engine.LocalDatabaseImpl.commit(LocalDatabaseImpl.java:159)
16:26:04,125 INFO [STDOUT] at com.silverpeas.workflow.engine.TimeoutRequest.process(WorkflowEngineThread.java:1032)
16:26:04,125 INFO [STDOUT] at com.silverpeas.workflow.engine.WorkflowEngineThread.run(WorkflowEngineThread.java:183)
16:26:04,125 INFO [STDOUT] )
In
order to upgrade Castor, I have changed the jdo-conf and also changed
maven dependencies. I cannot figure out what is the bug origin. It seems
Castor lost object reference when trying to persist it because this
error only happens when trying to update an object (create works well).
This code worked well in 1.2 Castor JDO version.
More over I cannot have more debug log because your link to configure castor log with log4j are dead (404).
Is
somebody having the same error and have fixed it ? I am already working
on an open source project so you can easily have access to the code if
you want more details...
Best regards,