Duplicate persistence units in JPA weblogic

Hello, I'm cross-posting thsi question from weblogic forum as a suggestion from james.bayer.
I am using weblogic 10.3.
I am trying to deploy a spring web application with severaljars, that contain jpa entities with a persistence.xml. The persistence unit name in all persistence.xml are equal. That is for spring no problem, because i wrote a PersistenceUnitManager, that merges all persistence units into one.
So far so good. But weblogic cant't deploy the war, because while validation of the deployment, wls throws an exception, that there are two persistence unit with the same name.
Does anybody has an idea how to deploy this war?
Can i switch off the validation of the persistence.xml?
The full stack trace is:
weblogic.application.ModuleException: Failed to load webapp: 'sfw-poc-condicao-pagamento-web.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)
     at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:149)
     at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:47)
     at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:1223)
     at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
     at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:367)
     at weblogic.application.internal.SingleModuleDeployment.prepare(SingleModuleDeployment.java:43)
     at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:154)
     at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60)
     at weblogic.deploy.internal.targetserver.AppDeployment.prepare(AppDeployment.java:141)
     at weblogic.management.deploy.internal.DeploymentAdapter$1.doPrepare(DeploymentAdapter.java:40)
     at weblogic.management.deploy.internal.DeploymentAdapter.prepare(DeploymentAdapter.java:191)
     at weblogic.management.deploy.internal.AppTransition$1.transitionApp(AppTransition.java:22)
     at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:240)
     at weblogic.management.deploy.internal.ConfiguredDeployments.prepare(ConfiguredDeployments.java:166)
     at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:122)
     at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:181)
     at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:97)
     at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
     at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
     at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused By: weblogic.deployment.EnvironmentException: duplicate persistence units with name sfw-persistence-unit in scope sfw-poc-condicao-pagamento-web.war. First PU location: file:/C:/java/servers/Oracle/Middleware/user_projects/domains/base_domain/servers/softway/tmp/_WL_user/sfw-poc-condicao-pagamento-web/rrg25b/war/WEB-INF/lib/sfw-class-loader-0.0.1-SNAPSHOT.jar. Second PU location: file:/C:/java/servers/Oracle/Middleware/user_projects/domains/base_domain/servers/softway/tmp/_WL_user/sfw-poc-condicao-pagamento-web/rrg25b/war/WEB-INF/lib/sfw-custom-jar-0.0.1-20100622.030351-65.jar
     at weblogic.deployment.AbstractPersistenceUnitRegistry.assertNoDuplicate(AbstractPersistenceUnitRegistry.java:313)
     at weblogic.deployment.AbstractPersistenceUnitRegistry.processDescriptor(AbstractPersistenceUnitRegistry.java:291)
     at weblogic.deployment.AbstractPersistenceUnitRegistry.loadPersistenceDescriptor(AbstractPersistenceUnitRegistry.java:192)
     at weblogic.deployment.AbstractPersistenceUnitRegistry.loadPersistenceDescriptors(AbstractPersistenceUnitRegistry.java:101)
     at weblogic.deployment.ModulePersistenceUnitRegistry.<init>(ModulePersistenceUnitRegistry.java:58)
     at weblogic.servlet.internal.WebAppModule.setupPersistenceUnitRegistry(WebAppModule.java:1812)
     at weblogic.servlet.internal.WebAppModule.getWebClassLoader(WebAppModule.java:1604)
     at weblogic.servlet.internal.WebAppServletContext.initClassLoader(WebAppServletContext.java:2969)
     at weblogic.servlet.internal.WebAppServletContext.<init>(WebAppServletContext.java:438)
     at weblogic.servlet.internal.WebAppServletContext.<init>(WebAppServletContext.java:487)
     at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:418)
     at weblogic.servlet.internal.WebAppModule.registerWebApp(WebAppModule.java:976)
     at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:381)
     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)
     at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:149)
     at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:47)
     at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:1223)
     at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
     at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:367)
     at weblogic.application.internal.SingleModuleDeployment.prepare(SingleModuleDeployment.java:43)
     at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:154)
     at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60)
     at weblogic.deploy.internal.targetserver.AppDeployment.prepare(AppDeployment.java:141)
     at weblogic.management.deploy.internal.DeploymentAdapter$1.doPrepare(DeploymentAdapter.java:40)
     at weblogic.management.deploy.internal.DeploymentAdapter.prepare(DeploymentAdapter.java:191)
     at weblogic.management.deploy.internal.AppTransition$1.transitionApp(AppTransition.java:22)
     at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:240)
     at weblogic.management.deploy.internal.ConfiguredDeployments.prepare(ConfiguredDeployments.java:166)
     at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:122)
     at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:181)
     at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:97)
     at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
     at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
     at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Thanks a lot

They need to have different names.
James : http://www.eclipselink.org

Similar Messages

  • Problems with duplicate persistence units

    I suppose that Weblogic 10.3 do not support some locations of persistence.xml.
    For example. On Jboss server I can succesfully deploy ear with this structure
    -services-ejb.jar
    -services-ws.jar
    -/APP-INF/lib
    -/APP-INF/lib/services-jpa.jar with persistence.xml i META-INF
    -/META-INF/application.xml
    But on Weblogic 10.3 it is impossible. Weblogic got an error with duplicate PU in the same location...
    <2009-06-04 16:06:18 CEST> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
    weblogic.management.DeploymentException:
    at weblogic.application.internal.flow.JpaFlow.prepare(JpaFlow.java:59)
    weblogic.deployment.EnvironmentException: duplicate persistence units with name servicesJPA in scope services-ear.
    First PU location: file:D:/apache/bea10.3/wlserver_10.3/samples/domains/wl_server/servers/examplesServer/tmp/_WL_user/services-ear/skzpn4/APP-INF/lib/services-jpa.jar.
    Second PU location: file:D:/apache/bea10.3/wlserver_10.3/samples/domains/wl_server/servers/examplesServer/tmp/_WL_user/services-ear/skzpn4/APP-INF/lib/services-jpa.jar
    My application.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd" version="5">
    <description>services ear</description>
    <display-name>services-ear</display-name>
    <module>
    <ejb>services-ejb.jar</ejb>
    </module>
    <module>
    <web>
    <web-uri>services-ws.war</web-uri>
    <context-root>/services-ws</context-root>
    </web>
    </module>
    <library-directory>APP-INF/lib</library-directory>
    </application>
    Is any solution to keep persistence in library directory?

    Edwin,
    I have tried the same thing that you describe in question one in the attached VI. If you change the data ranges and then run the VI, you will note that the numeric value will only ba allowed in the new range. (If the current value is outside of the range that you have set, then you will need to change the value of the cotrol to be in the new range before the new range properties will take effect.)
    As for your second question, can you expand upon this? I am not sure that I understand what you mean. Is an example VI possible? Thanks
    Randy Hoskin
    Applications Engineer
    National Instruments
    http://www.ni.com/ask
    Attachments:
    Data_Range_with_Units.vi ‏22 KB

  • Duplicate Persistence Unit error msg?

    Deploying my ear on Weblogic 10 has given me a strange error. It is saying that I am deploying two Persistence Units with the same name, even though I only have one Persistence Uni. As you can see from the stack trace, it's complaining about the same jar for the "First PU and Second PU", even though this jar only has one persistence.xml file. How is this possible?
    <5-Sep-2008 3:56:36 o'clock PM EDT> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1220644591734' for task '26'. Error is: 'weblogic.management.DeploymentException: '
    weblogic.management.DeploymentException:
         at weblogic.application.internal.flow.JpaFlow.prepare(JpaFlow.java:47)
         at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:615)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
         at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191)
         at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147)
         Truncated. see log file for complete stacktrace
    weblogic.deployment.EnvironmentException: duplicate persistence units with name default in scope appsdirservices-ear-1.111-SNAPSHOT_ear. First PU location: file:C:/oats/bea/user_projects/domains/base_domain/servers/AdminServer/tmp/_WL_user/_appsdir_services-ear-1.111-SNAPSHOT_ear/230cqk/APP-INF/lib/model-jar-1.111-SNAPSHOT.jar. Second PU location: file:C:/oats/bea/user_projects/domains/base_domain/servers/AdminServer/tmp/_WL_user/_appsdir_services-ear-1.111-SNAPSHOT_ear/230cqk/APP-INF/lib/model-jar-1.111-SNAPSHOT.jar
    Here is my persistence.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence xmlns="http://java.sun.com/xml/ns/persistence"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    version="1.0">
    <persistence-unit name="default" transaction-type="RESOURCE_LOCAL">
              <provider>
    org.apache.openjpa.persistence.PersistenceProviderImpl
    </provider>
              <class>com.base.address.Contact</class>
              <class>com.common.address.USAddress</class>          
              <properties>
                   <property name="openjpa.jdbc.DBDictionary" value="oracle(DriverVendor=oracle)"/>
                   <property name="openjpa.Log" value="DefaultLevel=WARN,SQL=TRACE"/>
                   <property name="openjpa.ConnectionURL" value=" jdbc:oracle:thin:@XX.XX.XXX.54:1542:XXXR33"/>
                   <property name="openjpa.ConnectionDriverName" value="oracle.jdbc.driver.OracleDriver"/>
                   <property name="openjpa.ConnectionUserName" value="XXX_XX "/>
                   <property name="openjpa.ConnectionPassword" value="XX_XXX "/>
    </properties>
    </persistence-unit>
    </persistence>

    You should try into a more appropriate forum : [WebLogic Server - General|http://forums.oracle.com/forums/forum.jspa?forumID=570]
    Nicolas.

  • Duplicate persistence units

    I'm trying to install an EAR file generated by jDeveloper to a Weblogic server, but I get the following error messages from weblogic while trying to deploy:
    Failed to load webapp: 'ichipscreens',
    duplicate persistence units with name JpsDBDataManagerV2 in scope ichipscreens. First PU location: file:/home/weblogic/middleware/user_projects/domains/middleware_domain/servers/AdminServer/tmp/_WL_user/ichipscreens/l4qn3z/lib/jps-internal.jar. Second PU location: file:/home/weblogic/middleware/user_projects/domains/middleware_domain/servers/AdminServer/tmp/_WL_user/ichipscreens/wo22a/war/WEB-INF/lib/jps-internal.jar
    What does this mean? When I deploy to jDeveloper's integrated weblogic server it doesn't have this error.

    It looks to me that as part of the JDeveloper packaging step, it's putting the same module (jps-internal.jar) with the same persistence-unit defined, into two different locations within the application being deployed, that are considered to be of the same scope. When you deploy it, WLS is telling you it considers this to be an error.
    I'm not a regular user of JDeveloper, but I'd perhaps look at the project properties or the packaging configuration to see if there is a duplicate entry for jps-internal.jar. When you deploy to the embedded WLS in JDeveloper, I'm guessing that JDeveloper an exploded directory deployment approach so the actual packaging that is causing the problem isn't performed.
    -steve-

  • Duplicate persistence unit name in war

    Hi!
    I am using weblogic 10.3.
    I am trying to deploy a spring web application with two jars, that contain jpa entities with a persistence.xml. The persistence unit name in both persistence.xml is equal. That is for spring no problem, because i wrote a PersistenceUnitManager, that merges both persistence units into one.
    So far so good. But weblogic cant't deploy the war, because while validation of the deployment, wls throws an exception, that there are two persistence unit with the same name.
    Does anybody has an idea how to deploy this war?
    Can i switch off the validation of the persistence.xml?

    Thanks for the response James.
    I'm using hibernate as my JPA provider. I'm not sure if weblogic is first loading it's own jpa implementation and management, and getting confused with mine. How could I check this ?
    I did however create a weblogic.xml in my web-inf folder, with the following property
    <weblogic-web-app>
    <container-descriptor>
    <prefer-web-inf-classes>true</prefer-web-inf-classes>
    </container-descriptor>
    </weblogic-web-app>
    Here is the full stack trace:
    Hi!
    I am using weblogic 10.3.
    I am trying to deploy a spring web application with two jars, that contain jpa entities with a persistence.xml. The persistence unit name in both persistence.xml is equal. That is for spring no problem, because i wrote a PersistenceUnitManager, that merges both persistence units into one.
    So far so good. But weblogic cant't deploy the war, because while validation of the deployment, wls throws an exception, that there are two persistence unit with the same name.
    Does anybody has an idea how to deploy this war?
    Can i switch off the validation of the persistence.xml?
    Any ideas ?
    Thanks,
    John

  • Java.lang.AssertionError when opening persistence unit info on Weblogic 10.3.6

    Hello everyone!
    Any idea of what could be causing this internal error in WLS 10.3.6.0 OOTB? It raises whenever I try to access to any persistence unit information on any deployed web application:
    Error opening /jsp/persistence/PersistenceUnitGeneral.jsp.
    The source of this error is:
    javax.servlet.ServletException: java.lang.AssertionError at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:342) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:184) at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:526) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:447) at org.apache.beehive.netui.pageflow.scoping.internal.ScopedRequestDispatcher.include(ScopedRequestDispatcher.java:119) at com.bea.netuix.servlets.controls.content.JspContent.beginRender(JspContent.java:552) at com.bea.netuix.servlets.controls.content.NetuiContent.beginRender(NetuiContent.java:365) at com.bea.netuix.nf.ControlLifecycle$7.visit(ControlLifecycle.java:485) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:518) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:220) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:395) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:352) at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:326) at com.bea.netuix.nf.UIControl.render(UIControl.java:582) at com.bea.netuix.servlets.controls.PresentationContext.render(PresentationContext.java:486) at com.bea.netuix.servlets.util.RenderToolkit.renderChild(RenderToolkit.java:146) at com.bea.netuix.servlets.jsp.taglib.skeleton.Child.doTag(Child.java:63) at jsp_servlet._framework._skeletons._wlsconsole.__nolayout._jspService(__nolayout.java:119) at weblogic.servlet.jsp.JspBase.service(JspBase.java:34) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:184) at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:529) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:447) at com.bea.netuix.servlets.controls.application.laf.JspTools.renderJsp(JspTools.java:130) at com.bea.netuix.servlets.controls.application.laf.JspControlRenderer.beginRender(JspControlRenderer.java:72) at com.bea.netuix.servlets.controls.application.laf.PresentationControlRenderer.beginRender(PresentationControlRenderer.java:65) at com.bea.netuix.nf.ControlLifecycle$7.visit(ControlLifecycle.java:481) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:518) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:220) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:395) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:352) at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:326) at com.bea.netuix.nf.UIControl.render(UIControl.java:582) at com.bea.netuix.servlets.controls.PresentationContext.render(PresentationContext.java:486) at com.bea.netuix.servlets.util.RenderToolkit.renderChild(RenderToolkit.java:146) at com.bea.netuix.servlets.jsp.taglib.skeleton.Child.doTag(Child.java:63) at jsp_servlet._framework._skeletons._wlsconsole.__nolayout._jspService(__nolayout.java:119) at weblogic.servlet.jsp.JspBase.service(JspBase.java:34) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:184) at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:529) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:447) at com.bea.netuix.servlets.controls.application.laf.JspTools.renderJsp(JspTools.java:130) at com.bea.netuix.servlets.controls.application.laf.JspControlRenderer.beginRender(JspControlRenderer.java:72) at com.bea.netuix.servlets.controls.application.laf.PresentationControlRenderer.beginRender(PresentationControlRenderer.java:65) at com.bea.netuix.nf.ControlLifecycle$7.visit(ControlLifecycle.java:481) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:518) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:220) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:395) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:352) at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:326) at com.bea.netuix.nf.UIControl.render(UIControl.java:582) at com.bea.netuix.servlets.controls.PresentationContext.render(PresentationContext.java:486) at com.bea.netuix.servlets.util.RenderToolkit.renderChild(RenderToolkit.java:146) at com.bea.netuix.servlets.jsp.taglib.skeleton.Child.doTag(Child.java:63) at jsp_servlet._framework._skeletons._wlsconsole.__twocollayout._jspService(__twocollayout.java:205) at weblogic.servlet.jsp.JspBase.service(JspBase.java:34) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:184) at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:529) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:447) at com.bea.netuix.servlets.controls.application.laf.JspTools.renderJsp(JspTools.java:130) at com.bea.netuix.servlets.controls.application.laf.JspControlRenderer.beginRender(JspControlRenderer.java:72) at com.bea.netuix.servlets.controls.application.laf.PresentationControlRenderer.beginRender(PresentationControlRenderer.java:65) at com.bea.netuix.nf.ControlLifecycle$7.visit(ControlLifecycle.java:481) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:518) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:220) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:395) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361) at com.bea.netuix.nf.Lifecycle.runOutbound(Lifecycle.java:208) at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:162) at com.bea.netuix.servlets.manager.UIServlet.runLifecycle(UIServlet.java:388) at com.bea.netuix.servlets.manager.UIServlet.doPost(UIServlet.java:258) at com.bea.netuix.servlets.manager.UIServlet.doGet(UIServlet.java:211) at com.bea.netuix.servlets.manager.UIServlet.service(UIServlet.java:196) at com.bea.netuix.servlets.manager.SingleFileServlet.service(SingleFileServlet.java:251) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at com.bea.console.utils.MBeanUtilsInitSingleFileServlet.service(MBeanUtilsInitSingleFileServlet.java:64) at weblogic.servlet.AsyncInitServlet.service(AsyncInitServlet.java:130) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60) at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3738) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3704) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2281) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2180) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1491) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256) at weblogic.work.ExecuteThread.run(ExecuteThread.java:221) Caused by: java.lang.AssertionError at org.apache.beehive.netui.tags.template.Section.doEndTag(Section.java:251) at jsp_servlet._jsp._persistence.__persistenceunitgeneral._jsp__tag17(__persistenceunitgeneral.java:922) at jsp_servlet._jsp._persistence.__persistenceunitgeneral._jspService(__persistenceunitgeneral.java:182) at weblogic.servlet.jsp.JspBase.service(JspBase.java:34) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301) ... 127 more
    Caused by:
    java.lang.AssertionError at org.apache.beehive.netui.tags.template.Section.doEndTag(Section.java:251) at jsp_servlet._jsp._persistence.__persistenceunitgeneral._jsp__tag17(__persistenceunitgeneral.java:922) at jsp_servlet._jsp._persistence.__persistenceunitgeneral._jspService(__persistenceunitgeneral.java:182) at weblogic.servlet.jsp.JspBase.service(JspBase.java:34) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:184) at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:526) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:447) at org.apache.beehive.netui.pageflow.scoping.internal.ScopedRequestDispatcher.include(ScopedRequestDispatcher.java:119) at com.bea.netuix.servlets.controls.content.JspContent.beginRender(JspContent.java:552) at com.bea.netuix.servlets.controls.content.NetuiContent.beginRender(NetuiContent.java:365) at com.bea.netuix.nf.ControlLifecycle$7.visit(ControlLifecycle.java:485) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:518) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:220) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:395) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:352) at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:326) at com.bea.netuix.nf.UIControl.render(UIControl.java:582) at com.bea.netuix.servlets.controls.PresentationContext.render(PresentationContext.java:486) at com.bea.netuix.servlets.util.RenderToolkit.renderChild(RenderToolkit.java:146) at com.bea.netuix.servlets.jsp.taglib.skeleton.Child.doTag(Child.java:63) at jsp_servlet._framework._skeletons._wlsconsole.__nolayout._jspService(__nolayout.java:119) at weblogic.servlet.jsp.JspBase.service(JspBase.java:34) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:184) at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:529) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:447) at com.bea.netuix.servlets.controls.application.laf.JspTools.renderJsp(JspTools.java:130) at com.bea.netuix.servlets.controls.application.laf.JspControlRenderer.beginRender(JspControlRenderer.java:72) at com.bea.netuix.servlets.controls.application.laf.PresentationControlRenderer.beginRender(PresentationControlRenderer.java:65) at com.bea.netuix.nf.ControlLifecycle$7.visit(ControlLifecycle.java:481) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:518) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:220) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:395) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:352) at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:326) at com.bea.netuix.nf.UIControl.render(UIControl.java:582) at com.bea.netuix.servlets.controls.PresentationContext.render(PresentationContext.java:486) at com.bea.netuix.servlets.util.RenderToolkit.renderChild(RenderToolkit.java:146) at com.bea.netuix.servlets.jsp.taglib.skeleton.Child.doTag(Child.java:63) at jsp_servlet._framework._skeletons._wlsconsole.__nolayout._jspService(__nolayout.java:119) at weblogic.servlet.jsp.JspBase.service(JspBase.java:34) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:184) at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:529) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:447) at com.bea.netuix.servlets.controls.application.laf.JspTools.renderJsp(JspTools.java:130) at com.bea.netuix.servlets.controls.application.laf.JspControlRenderer.beginRender(JspControlRenderer.java:72) at com.bea.netuix.servlets.controls.application.laf.PresentationControlRenderer.beginRender(PresentationControlRenderer.java:65) at com.bea.netuix.nf.ControlLifecycle$7.visit(ControlLifecycle.java:481) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:518) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:220) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:395) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:352) at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:326) at com.bea.netuix.nf.UIControl.render(UIControl.java:582) at com.bea.netuix.servlets.controls.PresentationContext.render(PresentationContext.java:486) at com.bea.netuix.servlets.util.RenderToolkit.renderChild(RenderToolkit.java:146) at com.bea.netuix.servlets.jsp.taglib.skeleton.Child.doTag(Child.java:63) at jsp_servlet._framework._skeletons._wlsconsole.__twocollayout._jspService(__twocollayout.java:205) at weblogic.servlet.jsp.JspBase.service(JspBase.java:34) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:184) at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:529) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:447) at com.bea.netuix.servlets.controls.application.laf.JspTools.renderJsp(JspTools.java:130) at com.bea.netuix.servlets.controls.application.laf.JspControlRenderer.beginRender(JspControlRenderer.java:72) at com.bea.netuix.servlets.controls.application.laf.PresentationControlRenderer.beginRender(PresentationControlRenderer.java:65) at com.bea.netuix.nf.ControlLifecycle$7.visit(ControlLifecycle.java:481) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:518) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:220) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:395) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361) at com.bea.netuix.nf.Lifecycle.runOutbound(Lifecycle.java:208) at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:162) at com.bea.netuix.servlets.manager.UIServlet.runLifecycle(UIServlet.java:388) at com.bea.netuix.servlets.manager.UIServlet.doPost(UIServlet.java:258) at com.bea.netuix.servlets.manager.UIServlet.doGet(UIServlet.java:211) at com.bea.netuix.servlets.manager.UIServlet.service(UIServlet.java:196) at com.bea.netuix.servlets.manager.SingleFileServlet.service(SingleFileServlet.java:251) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at com.bea.console.utils.MBeanUtilsInitSingleFileServlet.service(MBeanUtilsInitSingleFileServlet.java:64) at weblogic.servlet.AsyncInitServlet.service(AsyncInitServlet.java:130) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60) at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3738) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3704) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2281) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2180) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1491) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256) at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

    Hi Renny,
    i just wanted to chime in as in WLS-Version: 12.1.3.0.0 i am currently having kind of the same stacktrace starting with
    <09.04.2015 12:41 Uhr MESZ> <Error> <Console> <BEA-240003> <Administration Console encountered the following error: Exception during RequestDispatcher.include().
    Throwable: java.lang.AssertionError
    Stack Trace:
    java.lang.AssertionError
            at org.apache.beehive.netui.tags.template.Section.doEndTag(Section.java:251)
            at jsp_servlet._jsp._persistence.__persistenceunitgeneral._jsp__tag17(__persistenceunitgeneral.java:930)[...]
    In my case this happens when following the steps of http://docs.oracle.com/cd/E28280_01/doc.1111/e25034/tlandwls.htm#TLADG154
    I am also looking for a solution ... is there maybe a more recent version of beehive which we can use? (//edit: no, there isnt: 2010/01/11 - Apache Beehive has been retired. 1.0.2 is latest)

  • Duplicate persistence error -- deploying GlassFish application in Weblogic

    Hi,
    I am using NetBeans to deploy a web application which has RESTful web services. I am using Weblogic 12c and MySQL database. The NBproject MyAppServer includes another NB project MyAppLibrary. Both MyAppServer and MyAppLibrary have their own perisitence.xml files. Both projects are referencing the same database. The application was previously deployed in GlassFish and worked perfectly. However, migrating to Weblogic gives me the following error:
    "Deployment failed. The message was: weblogic.application.naming.EnvironmentException: duplicate persistence units with name MyAppLibraryPU in scope web. First PU location: file:/C:/cygwin/home/test/myfolder/apps/MyApp/MyAppServer/build/web/WEB-INF/classes/. Second PU location: file:/C:/Oracle/Middleware/user_projects/domains/base_domain/servers/AdminServer/tmp/_WL_user/MyAppServer/ub3nr6/war/WEB-INF/lib/MyAppLibrary.jar"
    I changed the name of the persistence unit in persistence.xml of MyAppServer, which resulted in no error being logged, but the server-side of the application doesn't run correctly now i.e. apparently no data was retrieved from the database.
    Any help will be appreciated.
    Thanks.

    Nothing to do with WebLogic JDBC so far...

  • Weblogic 10.3.0 not picking up persistence unit

    Hello,
    I am facing a problem where Weblogic does not seem to pickup the persistence unit:
    [wldeploy] Target state: deploy failed on Server examplesServer
    [wldeploy] java.lang.IllegalArgumentException: No persistence unit named 'dao' is available in scope ejb-app. Available persistence units: []OS: Windows XP (Development Environemnt)
    WebLogic Server Version: 10.3.0.0
    Though I'm working via Eclipse Helios, I am using Weblogic generated (and later modified) Ant scripts to compile, build and deploy to my local Weblogic install, in a 'split development' setup.
    Following is the file strutcture:
    source
    +---build.xml (Ant script)
    +---APP-INF
    |    +---lib
    |         +--- * (shared libraries)
    |
    +---META-INF
    |    +---application.xml
    |    +---weblogic-application.xml
    |
    +---web-app
    |    +---WEB-INF
    |         +---src
    |         +---lib
    |
    +---ejb-app
         +---com.example.ejb.data (Contains Entity annotations)
          |    +---Pojo1.java
          |    +---Pojo2.java
          |
          +---com.example.ejb.ctrl (Contains business logic and services)
          |    +---MyService.java
          |
          +---META-INF
               +---ejb-jar.xml
                +---weblogic-ejb-jar.xml
                +---persistence.xml     Here is my persistence.xml:
    <?xml version="1.0"?>
    <persistence xmlns="http://java.sun.com/xml/ns/persistence"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
        http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
         version="1.0">
         <persistence-unit name="dao" transaction-type="RESOURCE_LOCAL">
              <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
              <jta-data-source>OraDS</jta-data-source>
              <non-jta-data-source>OraDS</non-jta-data-source>
              <class>com.example.ejb.data.Pojo1</class>
              <class>com.example.ejb.data.Pojo2</class>
              <properties>
                   <property name="eclipselink.target-server" value="WebLogic_10" />
                   <property name="eclipselink.logging.level" value="FINEST" />
              </properties>
         </persistence-unit>
    </persistence>            I am attempting to inject the persistence unit via annotation in MyService.java (a @Stateless session bean):
    @PersistenceContext(unitName = "dao")
    private EntityManager entityManager;     I had done the same with 10.3.0's default Kodo provider and was getting the same issue.
    I've moved the persistence.xml to source/APP-INF, source/APP-INF/lib, source/META-INF and run deploys, it still gives me the error.
    The whole EAR is built with wlcompile and appc as per Split Directory development flow.
    For some reason, Weblogic does not seem to pick up the "dao" persistence unit into its JNDI tree, application wide or 'ejb-app' module scoped.
    Any direction on what next should I be looking at would be helpful.
    Edited by: Vyoma on May 25, 2011 10:15 PM
    Fixed code formatting.

    Pierluigi Vernetto, thanks for that link. Though it was for a web module consumption of the persistence package, I was able to adapt it for use by my ejb module.
    Here is my solution, under split-directory development workflow.
    Create the persistence module, place the persistence.xml in that module's META-INF.
    Create an Ant task in the build.xml to 'wlcompile' and JAR it to the EAR direcotries APP-INF/lib directory.
    Exclude the persistence module from the rest of the 'wlcompile' and 'appc' tasks.
    I was then able to inject it with annotation in my EJB module.
    dvohra16, thanks for that pointer. Now that I've been able to solve, the pressure is off (and shifted to other things). But I will surely check your option out. If I can get that working, it will be much easier than tinkering around with the build.xml and would be the normal flow of split-directory development workflow.
    As of now, I will say this thread as 'solved', but if I get it working the way you mention (on my sandbox project), I will surely come back and update this thread.
    Edited by: Vyoma on May 27, 2011 11:21 AM

  • Weblogic 12c not picking up persistence unit in WAR

    I'm trying to get an example CRUD application to run on WebLogic 12c (for the app see: http://henk53.wordpress.com/2012/04/15/jsf2-primefaces3-ejb3-jpa2-integration-project/)
    So far the applications runs on JBoss AS 7.1, GlassFish 3.1.2 and TomEE beta 2. In all those application servers persistence.xml is picked-up, and processed so I'm at a loss what's wrong with WebLogic. I'm using Eclipse 3.7.2 and the Oracle WebLogic 12C WTP server adapter for the deployment.
    I'm getting the following exception:
    java.lang.IllegalArgumentException: No persistence unit named 'entityManager' is available in scope jsf_ejb_jpa. Available persistence units: []
         at weblogic.persistence.ModulePersistenceUnitRegistry.getPersistenceUnit(ModulePersistenceUnitRegistry.java:130)
         at weblogic.persistence.BasePersistenceContextProxyImpl.<init>(BasePersistenceContextProxyImpl.java:40)
         at weblogic.persistence.TransactionalEntityManagerProxyImpl.<init>(TransactionalEntityManagerProxyImpl.java:31)
         at weblogic.persistence.EntityManagerInvocationHandlerFactory.createTransactionalEntityManagerInvocationHandler(EntityManagerInvocationHandlerFactory.java:20)
         at weblogic.persistence.PersistenceManagerObjectFactory.createPersistenceContextProxy(PersistenceManagerObjectFactory.java:66)
         at weblogic.persistence.PersistenceManagerObjectFactory.getObjectInstance(PersistenceManagerObjectFactory.java:31)
         at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
         at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:251)
         at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:406)
         at weblogic.j2eeclient.java.ClientReadOnlyContextWrapper.lookup(ClientReadOnlyContextWrapper.java:35)
         at weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.java:130)
         at javax.naming.InitialContext.lookup(InitialContext.java:392)
         at javax.naming.InitialContext.doLookup(InitialContext.java:265)
         at com.oracle.pitchfork.inject.Jsr250Metadata.jndiLookup(Jsr250Metadata.java:307)
         at com.oracle.pitchfork.inject.Jsr250Metadata.resolveByName(Jsr250Metadata.java:303)
         at com.oracle.pitchfork.inject.Jsr250Metadata.resolve(Jsr250Metadata.java:266)
         at com.oracle.pitchfork.inject.Jsr250Metadata.applyInjections(Jsr250Metadata.java:228)
         at com.oracle.pitchfork.inject.Jsr250Metadata.inject(Jsr250Metadata.java:219)
         at com.oracle.pitchfork.spi.BaseComponentBrokerImpl.getBean(BaseComponentBrokerImpl.java:63)
         at com.oracle.pitchfork.spi.EjbComponentCreatorBrokerImpl.getBean(EjbComponentCreatorBrokerImpl.java:33)
         at weblogic.ejb.container.injection.EjbComponentCreatorImpl.getBean(EjbComponentCreatorImpl.java:76)
         at weblogic.ejb.container.manager.BaseEJBManager.createNewBeanInstance(BaseEJBManager.java:209)
         at weblogic.ejb.container.manager.BaseEJBManager.allocateBean(BaseEJBManager.java:235)
         at weblogic.ejb.container.manager.StatelessManager.createBean(StatelessManager.java:293)
         at weblogic.ejb.container.pool.StatelessSessionPool.createBean(StatelessSessionPool.java:185)
         at weblogic.ejb.container.pool.StatelessSessionPool.getBean(StatelessSessionPool.java:114)
         at weblogic.ejb.container.manager.StatelessManager.preInvoke(StatelessManager.java:174)
         at weblogic.ejb.container.internal.BaseLocalObject.getBeanInstance(BaseLocalObject.java:146)
         at weblogic.ejb.container.internal.BaseLocalObject.preInvoke(BaseLocalObject.java:103)
         at weblogic.ejb.container.internal.BaseLocalObject.__WL_preInvoke(BaseLocalObject.java:67)
         at weblogic.ejb.container.internal.SessionLocalMethodInvoker.invoke(SessionLocalMethodInvoker.java:20)
         at com.example.dao.jpa.JpaUserDAO_wrkew_UserDAOImpl.add(Unknown Source)
         at com.example.backing.IndexBacking.addUser(IndexBacking.java:38)
    Notice that "entityManager" is the name of the instance variable in which injection is being performed:
    @PersistenceContext(name="example")
    private EntityManager entityManager;
    If I rename this variable to "em: as follows:
    @PersistenceContext(name="example")
    private EntityManager em;
    Then, lo and behold, the exception changes into:
    java.lang.IllegalArgumentException: No persistence unit named 'em' is available in scope jsf_ejb_jpa. Available persistence units: []
    As the example uses a data-source defined in web.xml, which is only marginally supported in most application servers, I tried to define a WebLogic specific application scoped data-source instead and let the persistence unit use that. I couldn't find a way to do this in a .war (is this even possible?), so I created an .ear archive instead. When deploying the EAR, the data-source is clearly being created, but I'm getting the same exception again.
    I finally created an EJB module with a persistence.xml and a simple Singleton that's injected with the entityManager, and added that to the EAR. This works for the EJB module, but in the web module injection of the other entity manager still fails.
    Any idea what might be the problem?

    After some more fiddling, I discovered it's not WebLogic itself that's at fault here, but most likely Oracle's WTP adapter. Apparently it doesn't include persistence.xml in the archive that gets deployed. When I export the project as an .ear archive and copy this to WebLogic's autodeploy directly, things do work.
    I tried to find out what the main difference was between the deployments, but I could not find where the Oracle WTP adapter creates the deployment. I tried to test where a resource inside the EAR resides on the filesystem via the following code inside a backing bean:
    URL url = Thread.currentThread().getContextClassLoader().getResource("com/example/backing");
    It looks like there isn't a real .war or .ear being created and deployed, but there's a link back to the workspace, as the URL resolves to:
    file:/Users/henk/eclipse37ee/workspace/jsf_ejb_jpa/build/classes/com/example/backing/
    If I execute the same code for the ear in the autodeploy folder, the URL resolves to some jar inside:
    /Users/henk/eclipse37ee/wls1211_dev/mydomain/servers/myserver/tmp/_WL_user/_appsdir_jsf_ejb_jpa_ear_ear/2jzks6/war/WEB-INF/lib/
    In case of the WTP 'deployment' linking back to the Eclipse workspace, META-INF/persistence.xml is actually there too, but for some reason Weblogic can't find it there?
    Edited by: Henk on Apr 29, 2012 2:57 PM

  • Changing Persistence Unit (JPA)

    I’m developing a Java SE application using JPA.
    At runtime, the application needs to connect to different databases, each one with the same structure but different data (for example one database for each company).
    I can’t define in advance different Persistence Units in the persistence.xml file, because the user decides when and how many db will create.
    Is there some way to manipulate de persistence.xml file at runtime (for example change the PU name) without recompile the application?
    Thanks for your help.

    Yes, I found the solution.
    I use the method to obtain a EntityManager with a HashMap parameter, where I can put the name of the database. Example:
    String dbURL = "jdbc:mysql://localhost:3306/" + "myDataBaseName";
    HashMap<String, String> propMap;
    propMap = new HashMap<String, String>();
    propMap.put("toplink.jdbc.url", dbURL);
    EntityManager em = Persistence.createEntityManagerFactory("myPU", propMap).createEntityManager();
    This overrides de property in the persistence.xml file.
    Hope it help you.
    Regards

  • Problems with NWDS 7.1 EHP1 and JPA persistence unit

    In EJB project with JPA Facet Iu2019m working without any problem for several days. But, after two weeks, JPA plug-in of Eclipse is not working fine.
    When I try to generate DDL Iu2019m getting the following error window:  There isnu2019t a registered persistence unit in the project. But this is not true. Curiously sometimes it works fine.
    Can any body has any suggestion for correcting this issue?
    Thanks in advanced.

    Hi,
    I had the same problem and luckily stumbled upon the solution today.
    1. File persistence.xml is located in /ejbModule/META-INF. Path /build/classes is empty.
    2. Right-click on the DC/project and select "Properties".
    3. In "JPA", change parameter "Platform" or "Connection", then restore the original value. The purpose is to set a dirty flag which will make the IDE generate the missing stuff in path build/classes.
    4. A copy of resource branch META-INF and the .classes files will appear below /build.
    5. Right-click on the DC/Project and select "JPA-Tools -> Generate DDL".
    Please let me know if it works for you.
    Cheers,
    Thorsten

  • Toplink JPA properties in persistence unit are ignored

    I'm trying to make some EJB3 stateless session bean webservices, using the toplink essentials (build b41 beta 2) shipped with OC4J stand-alone 10.1.3.3.0.
    Basically I have a 'model' project with my EJB3 entity beans, and a persistence.xml. Then I have a webservice project, that has the model project as a dependency. Both projects are in the same application in JDeveloper. I use a deployment profile to deploy to my seperate OC4J stand-alone instance.
    My service runs and deploys fine. The persistence unit is read, and the correct datasource is selected and logged in on. However I notice two things:
    - the container complains during deployment, telling me property toplink.server.platform.class.name is deprecated and I should use toplink.target-server. However, I've set the property toplink.target-server as a property in my persistence.xml file...
    - I don't see any Toplink logging, although I've set the property toplink.logging.level to FINE in the persistence.xml.
    This leads me to believe that the properties are somehow ignored. Has anyone experienced this as well? Any hints/tips/suggestions on how to fix this?
    Cheers,
    Bas
    My persistence.xml:
    <?xml version="1.0" encoding="windows-1252" ?>
    <persistence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                 xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
                 version="1.0" xmlns="http://java.sun.com/xml/ns/persistence">
      <persistence-unit name="VervoerPublicatiesPU" transaction-type="JTA">
        <provider>oracle.toplink.essentials.PersistenceProvider</provider>
        <jta-data-source>jdbc/SQLPUBDS</jta-data-source>
        <class>a.b.c.A</class>      
        <class>a.b.c.B</class>
        <properties>
            <property name="toplink.logging.level" value="FINE"/>
            <property name="oracle.toplink.essentials.config.CacheType" value="SoftWeak"/>
            <property name="toplink.target-database" value="SQLServer"/>
            <property name="toplink.target-server" value="OC4J_10_1_3"/>
        </properties>
      </persistence-unit>
    </persistence>

    I debugged this problem a few weeks ago. There are 2 things going on:
    1. The EJB3 container is automatically adding the property 'toplink.server.platform.class.name' into what is passed to TopLink to ensure the proper container is configured. I have had a bug filed to get this changed to toplink.target-server in the 10.1.3.4 patch-set.
    2. The logging by default goes into the OC4J log found in <HOME>\j2ee\home\log\oc4j
    You can re-configure OC4J to also log these messages to stdout or if you only want them to stdout you can simply set the logging-type in the persistence unit properties.
          <property name="toplink.logging.logger" value="DefaultLogger"/>Doug

  • EclipseLink persistence provider issue with weblogic 10.3

    Hi All,
    I have been trying to deploy and run an EAR in weblogic but when I run the application I get the following warning: WARNING: Found unrecognized persistence provider "org.eclipse.persistence.jpa.PersistenceProvider" in place of OpenJPA provider. This provider's properties will not be used.
    The following is my persistence.xml:
    <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence persistence_1_0.xsd" version="1.0">
    <persistence-unit name="default" transaction-type="JTA">
    <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
    <jta-data-source>DataSourceName</jta-data-source>
    <class>oracle.communications.platform.entity.impl.CharacteristicSpecificationDAO</class>
    <properties>
    <property name="eclipselink.logging.level" value="FINEST" />
    <property name="eclipselink.target-database" value="org.eclipse.persistence.platform.database.oracle.OraclePlatform" />
    <property name="eclipselink.target-server" value="WebLogic_10" />
    <property name="eclipselink.session-event-listener" value="oracle.communications.platform.persistence.impl.PomsSessionEventListener" />
    <property name="eclipselink.session.customizer" value="oracle.communications.platform.util.EclipseLinkSessionCustomizer" />
    <property name="poms.cache.coordination.implementation" value="jms" />
    <property name="poms.cache.coordination.ipaddress" value="10.178.139.64" />
    <property name="poms.cache.coordination.port" value="7101" />
    <property name="poms.cache.coordination.multicast.group.address" value="226.10.12.64" />
    <property name="poms.cache.coordination.multicast.port" value="3121" />
    <property name="poms.cache.coordination.topic.connection.factory.name" value="EclipseLinkTopicConnectionFactory" />
    <property name="poms.cache.coordination.topic.name" value="EclipseLinkTopic" />
    <property name="poms.cache.coordination.username" value="weblogic" />
    <property name="poms.cache.coordination.password" value="weblogic" />
    <property name="poms.cache.coordination.password.encrypted" value="false" />
    </properties>
    </persistence-unit>
    </persistence>
    I have written a session customizer that reads properties from the persistence.xml and initializes stuff. But because of the warning i mentioned earlier... I am getting null for all property entries.
    I moved the eclipselink jar entry up ahead of openjpa jar entry in weblogic.server.modules_10.3.1.0.xml and refcount.xml in /modules/features directory. I am still getting the same problem.
    I read in many posts for workarounds for this issue but didnt find anything which worked for me. I would be grateful if someone could provide me a hint as to how to make it work.
    Thanks in advance,
    Prashanth.

    Prashanth,
    Hi, there should be no issue running EclipseLink on WebLogic while you see this warning. If you are getting null properties it may be the result of another issue, could you post specific exceptions and the part of your client code that is having a problem.
    1) The warning below normally appears only when running your persistence unit with an "application managed" JTA datasource as opposed to a "globally defined server scoped datasource". Even then it can be ignored as there are still parts of WebLogic that depend on OpenJPA. Even though the warning states that properties are ignored - they are not and you should see your persistence unit loaded properly.
    I encountered this issue when running an "application managed" JTA - here is an extract of the log showing the warning and the full functioning of the pu later - the persistence unit and example code can be found on the weblogic tutorial examples link below
    "[EL Finer]: 2008.10.29 13:03:55.565--ClientSession(30346337)--Thread(Thread[[ACTIVE] ExecuteThread: '20' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--client released
    WARNING: Found unrecognized persistence provider "org.eclipse.persistence.jpa.PersistenceProvider" in place of OpenJPA provider. This provider's properties will not be used.
    [EL Info]: 2008.10.29 13:03:56.079--ServerSession(14772987)--EclipseLink, version: Eclipse Persistence Services - 1.1.0 (Build 20081023)
    [EL Info]: 2008.10.29 13:03:56.391--ServerSession(14772987)--file:/C:/view_w34r1a/examples/org.eclipse.persistence.example.jpa.server.weblogic.enterpriseEJB/build/classes/-exampleLocal login successful
    15 Entities in storage: 15
    [EL ExampleLocal EM]: enterprise: Object: [email protected]( id: 6 state: null parent: HashSet@15794734 references: HashSet@15794734)
    [EL ExampleLocal EM]: enterprise: Object: [email protected]( id: 26 state: null parent: HashSet@8800655 references: HashSet@8800655)
    I raised the following minor issue with our WebLogic Server team in Oct for reference - however this warning did not affect proper functioning of EclipseLink JPA.
    https://bug.oraclecorp.com/pls/bug/webbug_edit.edit_info_top?rptno=7520161
    You may reference the following tutorial on running EclipseLink JPA on WebLogic 10.3, it details all the steps necessary to get a JTA container managed persistence unit running via a stateless session bean and a servlet client. It also details and links to application managed datasource configuration details.
    http://wiki.eclipse.org/EclipseLink/Examples/JPA/WebLogic_Web_Tutorial
    2) eclipselink.jar location in WebLogic?
    The eclipselink.jar library should stay in the modules or patch_* directory depending on whether you are running a standalone WebLogic server or as part of a Fusion Middleware JDeveloper environment.
    See the following link that details deployment options for WebLogic and EclipseLink
    http://wiki.eclipse.org/EclipseLink/Examples/JPA/WebLogic_Web_Tutorial#EclipseLink_JAR_location
    Note: I have not modified the load order of EclipseLink, OpenJPA or Kodo, I am running all including this version of OpenJPA in my modules directory. [org.apache.openjpa_1.0.0.0_1-1-1-SNAPSHOT.jar]
    3) I noticed that you are defining the target-database property in your persistence unti but you are running as JTA not RESOURCE_LOCAL. This property can be removed if your JTA datasource is defined as a Transactional server scoped datasource via the WebLogic console.
    thank you
    /michael
    http://www.eclipselink.org

  • Application Client Enity Manager cannot find Persistence Unit with JWS

    I have an Enterprise Application Project in Netbeans 6.7.1.
    The enterprise application client module has the business code and the
    persistence unit (TopLink) defined in the app-client.jar. I can run this
    application clinet from NB without a problem. I can also run it with JWS
    if I remove the EnityManager.
    I'm using JPA (EnityManager) in a Java SE environment.
    When I try and run the app-client from Java Web Start I get an error
    that the EnityManager cannot find the PU. The persistence unit is packaged in the app.ear->app-client.jar->META-INF->persistence.xml.
    There's not a wealth of information, that I could find on the net, but this
    seems to be correct.
    The error I get is:
    INFO: ACC009: Load Application Class: [jws.Main]
    hello world! From JWS
    Dec 3, 2009 11:44:21 AM com.sun.enterprise.appclient.MainWithModuleSupport <init>
    WARNING: ACC003: Application threw an exception.
    javax.persistence.PersistenceException: No Persistence provider for EntityManager named JWS-app-clientPU: The following providers:
    oracle.toplink.essentials.PersistenceProvider
    oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider
    Returned null to createEntityManagerFactory.
    Any ideas on what I need to do to properly package the PU for an Enterprise Application Client ??
    Thanks,
    David

    I solved this problem.
    When we call resources from EAR application, WebLogic adds "Cache-Control=private, no-cache, no-store, s-maxage=0, must-revalidate" to all responses header.
    It was the reason of error occurence.
    I used filter from http://flavio.tordini.org/http-headers-filter to remove Cache-Control from header when calling jar resources.
    After that, applicatiom started to work again.

  • Unit Test code using wrong persistence unit

    In the midst of learning Maven, I created a simple application in which I am using JPA (Java Persistence 1.0.2) with EclipseLink implementation (2.0.2).
    Note: This is an Application Managed environment. So I manually control EntityManager's life cycle.
    The persistence.xml file used by the main source code is different from the one that unit test code uses. Main code uses an Oracle DB and the test code uses an in-memory Derby.
    Running unit tests was updating the Oracle DB (!) and I eventually managed to fix that by using two different persistence-units in the XML files.
    However, I don't understand why that fixed the problem. I manually create and shut down the entity managers and they are not running concurrently. I'm pretty sure Maven (or the way I set it up) doesn't mess up the resources (XML files). In fact by looking at Maven's debug output I can see it's using the right XML file for unit tests.
    Could someone enlighten me, please?

    Do you have both persistence.xml files on your classpath? If so, and they contain the same name for their respective persistence units, you should be getting a warning or error since they must have unique names. There is no way to tell which one you want to access otherwise.
    Best Regards,
    Chris

Maybe you are looking for

  • Data not showing up on report

    Hi I have an Infocube that has data (ready for reporting) loaded from APO Livecache. I'm running a BEX report that gets data from that cube, and for some reason the value for one Key figure is not showing up. It's there in the infocube, but is not sh

  • Why can't I purchase apps for my university?

    Seriously Apple you need to pull-finger and get the App Store working. I have computers that need software that can't be purchased anywhere but the App Store yet universitys and businesses outside the US still can't purchase lisences. I have money I

  • Empty row using decode

    when I use the decode function I always get extra empty rows in my results. Why is this? Is it because I don't use a default value? I always have to use a where statement to eliminate those empty rows, like in the following statement. select decode(t

  • Syncing itouch libary to itunes

    How can I reverse sync all music and playlists that I have on my itouch to my itunes?  Every time I try to sync when I attached the sync cord to itunes i lose all my music.  I would like to have all the music on my itouch become my library.  Is there

  • Printer does not show a PPD

    When I select a printer in Illustrator CS6, the PPD doesn't not populate.  I am running on Windows 7 64-bit.  I have tried several different printers and none of them will show the PPD.   I've downloaded the latest drivers for this operating system.