i totally redid the job with a clean entity bean and clean home and query 
components.

i have put log statements in the setters for the composite key fields and can 
CONFIRM that they are called

it should be noted that the 'not updating" issue only apears for changing field 
values. i can perfectly use the standard pages to CREATE a new entity.

more strange behaviour: when i update both a key field and another field at the 
same time : i DO get an exception:

Caused by: javax.persistence.OptimisticLockException: 
org.hibernate.StaleStateException: Batch update returned unexpected row count 
from update [0]; actual row
  | count: 0; expected: 1
  |         at 
org.hibernate.ejb.AbstractEntityManagerImpl.wrapStaleStateException(AbstractEntityManagerImpl.java:654)
  |         at 
org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:600)
  |         at 
org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:525)
  |         at 
com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:114)
  |         at 
com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:247)
  |         at 
com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:86)
  |         at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:177)
  |         at 
com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1382)
  |         ... 49 more
  | Caused by: org.hibernate.StaleStateException: Batch update returned 
unexpected row count from update [0]; actual row count: 0; expected: 1
  |         at 
org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched(Expectations.java:61)
  |         at 
org.hibernate.jdbc.Expectations$BasicExpectation.verifyOutcome(Expectations.java:46)
  |         at 
org.hibernate.jdbc.BatchingBatcher.checkRowCounts(BatchingBatcher.java:68)
  |         at 
org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
  |         at 
org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:246)
  |         at 
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:235)
  |         at 
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:140)
  |         at 
org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
  |         at 
org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
  |         at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
  |         at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
  |         at 
org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:516)
  |         ... 54 more

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4103914#4103914

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4103914
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to