I have a manyToMany-Relation between two Entites..when I wanna delete some entities then I get the following error:
Code:
10:44:52,764 WARN [JDBCExceptionReporter] SQL Error: -99999, SQLState: null
10:44:52,764 ERROR [JDBCExceptionReporter] 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.
10:44:52,764 WARN [JDBCExceptionReporter] SQL Error: -204, SQLState: 42704
10:44:52,764 ERROR [JDBCExceptionReporter] Error for batch element #0: DB2 SQL error: SQLCODE: -204, SQLSTATE: 42704, SQLERRMC: DB.ROLES
10:44:52,764 WARN [JDBCExceptionReporter] SQL Error: -727, SQLState: 56098
10:44:52,764 ERROR [JDBCExceptionReporter] Error for batch element #0: DB2 SQL error: SQLCODE: -727, SQLSTATE: 56098, SQLERRMC: 2;-204;42704;DB.ROLES
10:44:52,764 WARN [JDBCExceptionReporter] SQL Error: -727, SQLState: 56098
10:44:52,764 ERROR [JDBCExceptionReporter] Error for batch element #0: DB2 SQL error: SQLCODE: -727, SQLSTATE: 56098, SQLERRMC: 2;-204;42704;DB.ROLES
10:44:52,764 WARN [JDBCExceptionReporter] SQL Error: -727, SQLState: 56098
10:44:52,764 ERROR [JDBCExceptionReporter] Error for batch element #1: DB2 SQL error: SQLCODE: -727, SQLSTATE: 56098, SQLERRMC: 2;-204;42704;DB.ROLES
10:44:52,764 ERROR [AbstractFlushingEventListener] Could not synchronize database state with session
org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:253)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:237)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:143)
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:515)
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:1389)
at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTran
...
The table "DB.ROLES" still exists in my Database. I have no explicit Java-Entity as I mapped it with the ManyToMany-Relationship.
Any Ideas?