weblogic.appmerge does not merge the change in deployment plan into persistence.xml

(Doc ID 2007290.1)

Last updated on NOVEMBER 05, 2016

Applies to:

Oracle WebLogic Server - Version 10.3.3 and later
Information in this document applies to any platform.

Symptoms

The weblogic.appmerge does not merge the change in deployment plan into persistence.xml.

The deployment plan contains:

<variable-definition>
    <variable>
        <name>NewDS</name>
        <value>mynewds</value>
    </variable>
</variable-definition>
<module-override>
    <module-name>MyEJB.jar</module-name>
    <module-type>ejb</module-type>
    <module-descriptor external="false">
        <root-element>persistence</root-element>
        <uri>META-INF/persistence.xml</uri>
        <variable-assignment>
            <name>NewDS</name>
            <xpath>/persistence/persistence-unit[name="MyEJB"]/jta-data-source</xpath>
            <operation>replace</operation>
        </variable-assignment>
    </module-descriptor>
</module-override>

The persistence.xml:

<persistence-unit name="MyEJB" transaction-type="JTA">
    <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
    <jta-data-source>jdbc/myds</jta-data-source>
    <class>de.entity.Emp</class>
</persistence-unit>

If you use weblogic.appmerge, such as: java weblogic.appmerge -verbose -output merged.ear -plan MyEJBApp\plan\plan.xml MyEJBApp\app\MyEJBEAR.ear, it should change the <jta-data-source>jdbc/myds</jta-data-source> into <jta-data-source>mynewds</jta-data-source>, but it does not.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms