cascade delete fail for EJB2 CMP Entities after migration to EAP6

Solution Verified - Updated -


  • After migrate an EJB2 application from EAP4 or EAP5 to EAP6 we see issues during deletion of entities.
    If a relation is marked with cascade-delete it look like that the order of DELETE statements is not respected and therefore a database constraint is violated.
    Depend on the used database an Exception was shown, i.e.
Caused by: javax.ejb.RemoveException: JBAS010757: Could not remove 28dfa49b1835aae56b875a7680d56f43
Caused by: DB2 SQL Error: SQLCODE=-532, SQLSTATE=23504, 
  • Batch Cascade Delete is not working in JBoss EAP 6 as in Jboss AS 5.1
  • The jbosscmp-jdbc_4_1.dtd does not allow value true/false inside <batch-cascade-delete>, as it says it should be EMPTY.
<!ELEMENT batch-cascade-delete EMPTY>


  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content