Error after setting enable-batch-operations and order-database-operations elements in weblogic-cmp-rdbms-jar.xml

Abstract: Error after setting enable-batch-operations and order-database-operations elements in weblogic-cmp-rdbms-jar.xml

Problem:

After setting the <enable-batch-operations> and tag <order-database-operations> as false in weblogic-cmp-rdbms-jar.xml, the following error message was thrown:

� "EJBFooBar.jar": [EJB:011019]While reading META-INF/weblogic-cmp-rdbms-jar.xml, the persistence layer of the Entity EJB failed to deploy. The error was:
� "EJBFooBar.jar": Error in descriptor line 410: Error parsing file at line: 410 column: 22. The content of element type "weblogic-rdbms-jar" must match "(weblogic-rdbms-bean+,weblogic-rdbms-relation*,order-database-operations?,enable-batch-operations?,create-default-dbms-tables?,validate-db-schema-with?,database-type?,default-dbms-tables-ddl?,compatibility?)".

Here is a snippet from the XML:

...

</weblogic-rdbms-relation>

<enable-batch-operations>False</enable-batch-operations>

<order-database-operations>False</order-database-operations>

</weblogic-rdbms-jar>

According to the DTD, the placement looks correct, yet the XML still fails to validate. How should these tags be set?

Solution:

It turns out the order in which the two tags are placed makes a difference for the validation. The solution is simply to place the <order-database-operations> above <enable-batch-operations>, like so:

...

</weblogic-rdbms-relation>

<order-database-operations>False</order-database-operations>

<enable-batch-operations>False</enable-batch-operations>

</weblogic-rdbms-jar>