Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-3404

In drools-camel-server-5.3.x.Final.war, there seems to be duplicate JPA persistence units

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

Details

    • Hide

      1) Deploy drools-camel-server-5.3.x.Final.war in weblogic after fixing the web.xml's syntax error
      2) Note exception thrown about duplicate persistence unit.

      Show
      1) Deploy drools-camel-server-5.3.x.Final.war in weblogic after fixing the web.xml's syntax error 2) Note exception thrown about duplicate persistence unit.

    Description

      There seems to be duplicate persistence units for persistence unit "org.drools.grid"

      One in: WEB-INF\classes\META-INF\persistence.xml
      Another in: WEB-INF\lib\drools-grid-impl-5.3.0.Final.jar\META-INF\persistence.xml

      In Tomcat, it doesn't seem to care and let's you deploy nicely.
      In WebLogic 10.x, it will throw an error: "Duplicate persistence unit" and won't let you deploy until you either rename one of them or remove it.

      Renaming the WEB-INF\classes\META-INF\persistence.xml's persistence unit another name causes this error:

      <Feb 25, 2012 9:07:39 PM GMT-07:00> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request w
      ith ID '1330229237884' for task '0'. Error is: 'weblogic.application.ModuleException: Failed to load webapp: 'drools-camel-ser
      ver-5.3.1.Final.war''
      weblogic.application.ModuleException: Failed to load webapp: 'drools-camel-server-5.3.1.Final.war'
      at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:404)
      at weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedModuleDriver.java:180)
      at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
      at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:508)
      at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
      Truncated. see log file for complete stacktrace

      Caused By: org.hibernate.HibernateException: The chosen transaction strategy requires access to the JTA TransactionManager
      at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:371)
      at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1341)
      at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)
      at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)
      at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:132)
      Truncated. see log file for complete stacktrace
      >

      The only way to get it to even deploy is to remove one of the duplicates.

      Which one can we remove? Why does this only happen in WebLogic and not in Tomcat? You'd figure the duplicate persistence unit should be complained about in all app server environments???

      Attachments

        Activity

          People

            gdesmet@redhat.com Geoffrey De Smet (Inactive)
            ndipiazza66 blah mcgee (Inactive)
            Archiver:
            rhn-support-ceverson Clark Everson

            Dates

              Created:
              Updated:
              Resolved:
              Archived:

              PagerDuty