Home » Fusion Middleware & Colab Suite » Weblogic & Application Server » Weblogic 12c - Deploy an ear twice
Weblogic 12c - Deploy an ear twice [message #679737] Fri, 20 March 2020 06:50
Messages: 1
Registered: March 2020
Junior Member
I'm trying to deploy an ear file twice on **Weblogic**. The applications are the same expect for context-root.

They have:

1. Same JPA models
2. Same persistance.xml (with same peristance-unit-name)
3. When I deploy "the second" ear and try to access to db from the first one I receive a

> java.lang.ClassCastException: com.myApplication.models.entityOne
> cannot be cast to com.myApplication.models.entityOne
It seem that the first ear use its own models but the EntityManager of second one ear.

Structure of my ear file is something like that:

      - lib
        - jar-with-my-models.jar
        - jar-with-persistance.jar
Persistence.xml is defined as following:

<persistence-unit name="my-persistance-unit" transaction-type="JTA">
Weblogic.xml is definied as following:
I'm deploy twice my ear file because I want to replicate an issue that I received during paralell deploy in weblogic
Previous Topic: weblogic and Mysql driver - Issue with JNDI configurartion
Next Topic: WEbLogic server ONS configuration error
Goto Forum:

Current Time: Sat Feb 24 19:25:41 CST 2024