persistence@glassfish.java.net

RE: Persistence unit ref:

From: Eve Pokua <gorgeous65_at_msn.com>
Date: Sat, 5 Dec 2009 14:43:50 +0000

Marina,

 

I am using netbeans to build and deploy my application. Netbeans

already packages entity classes as well as the per.xml inside the

META-INF dir. According to the following thread. When it's package

this way, it is ignored-

 

> http://old.nabble.com/PersistenceContext-and-the-verifier-td15864706.html
>
> and
>
> "
> Verifier is correct, *thee* message *could* be better though. Having said
> that, where did you read that it is OK *to* put *persistence*.xml in
> META-INF directory of *the* ear file. If you put *persistence*.xml in
> META-INF of ear, it is simply ignored. If you want your
> *persistence*-*units* *to* be visible *all* modules in *the* ear file,
> *then* put in
> *a* library jar. *The* easiest way of doing it is *add* *all* entity
> classes *and*
> META-INF/*persistence*.xml into *a* jar file (say) entities.jar *and*
> package
> it in lib directory of *the* ear file.
>
> Thanks,
> Sahoo "


 

Sahoo wrote this. Fixing such problem is in bold.

 

Thanking you.

 

eve
 
> Date: Fri, 4 Dec 2009 17:10:32 -0800
> From: Marina.Vatkina_at_Sun.COM
> To: users_at_glassfish.dev.java.net
> CC: persistence_at_glassfish.dev.java.net; ejb_at_glassfish.dev.java.net
> Subject: Re: Persistence unit ref:
>
> If you are saying that the persistence.xml is not packaged correctly, then you
> need to fix it. In v2 you can put it into META-INF directory of the ejb jar if
> this is the place where your entities are packaged.
>
> Regards,
> -marina
>
> Eve Pokua wrote:
> > marina,
> >
> > Yes it does-
> >
> > Deploying application in domain failed; Could not resolve a persistence
> > unit corresponding to the persistence-context-ref-name
> > [persistence/TestingUN] in the scope of the module called
> > [gfdeploy#C:\jee\Testingapp2\dist\gfdeploy\Testingapp2-war_war]. Please
> > verify your application.
> > C:\jee\Testingapp2\nbproject\build-impl.xml:275: The module has not been
> > deployed.
> >
> > Thanks
> >
> > eve
> > ------------------------------------------------------------------------
> > From: gorgeous65_at_msn.com
> > To: users_at_glassfish.dev.java.net; persistence_at_glassfish.dev.java.net;
> > ejb_at_glassfish.dev.java.net
> > Date: Sat, 5 Dec 2009 00:49:46 +0000
> > Subject: FW: Persistence unit ref:
> >
> > Marina, Ralp,
> >
> > I think I have found where the problem lies
> >
> > I read this thread -
> >
> > http://old.nabble.com/PersistenceContext-and-the-verifier-td15864706.html
> >
> > and
> >
> > "
> > Verifier is correct, *thee* message *could* be better though. Having said
> > that, where did you read that it is OK *to* put *persistence*.xml in
> > META-INF directory of *the* ear file. If you put *persistence*.xml in
> > META-INF of ear, it is simply ignored. If you want your
> > *persistence*-*units* *to* be visible *all* modules in *the* ear file,
> > *then* put in
> > *a* library jar. *The* easiest way of doing it is *add* *all* entity
> > classes *and*
> > META-INF/*persistence*.xml into *a* jar file (say) entities.jar *and*
> > package
> > it in lib directory of *the* ear file.
> >
> > Thanks,
> > Sahoo "
> >
> > I checked my application and found that netbeans is packaging the per.xml
> > in a jar dir under build/jar/META-INF
> >
> > which is ignored. This' why my war does not see my per.xml in my ear.
> >
> > I will have to find out how to package per.xml so my war can see it.
> >
> > I heard this is resolved in JEE6.
> >
> > Thanks
> >
> > eve
> >
> >
> > ------------------------------------------------------------------------
> > From: gorgeous65_at_msn.com
> > To: users_at_glassfish.dev.java.net
> > Date: Sat, 5 Dec 2009 00:23:48 +0000
> > Subject: RE: Persistence unit ref:
> >
> > marina,
> >
> > There is no problem with jdbc
> >
> > reference as tables are created and application is deployed if
> > I take away this from my web.xml -
> >
> > <persistence-unit-ref>
> >
> > <persistence-unit-ref-name>persistence/TestingUN</persistence-unit-ref-name>
> > <persistence-unit-name>TestingUN</persistence-unit-name>
> > </persistence-unit-ref>
> >
> > As long as the above is in my web.xml, I have the error.
> >
> > eve
> >
> >
> >
> > > Date: Fri, 4 Dec 2009 15:56:34 -0800
> > > From: Marina.Vatkina_at_Sun.COM
> > > To: users_at_glassfish.dev.java.net
> > > Subject: Re: FW: Persistence unit ref:
> > >
> > > Check if the PU had been processed correctly - are you sure there is
> > jdbc_/ not
> > > jdbc/ in the datasource name?
> > >
> > > -marina
> > >
> > > Eve Pokua wrote:
> > > > Marina, Ralph,
> > > >
> > > > I am reading this thread.
> > > >
> > > > http://forums.java.net/jive/message.jspa?messageID=207860
> > > >
> > > > It looks like the web is not seeing my persistence in my ear.
> > > >
> > > > But I also tested this in just a web application and placed
> > > > the per.xml in the web dir then in the web/web-inf
> > > >
> > > > still same error-
> > > >
> > > > Thanking you.
> > > >
> > > > eve
> > > >
> > ------------------------------------------------------------------------
> > > > From: gorgeous65_at_msn.com
> > > > To: users_at_glassfish.dev.java.net
> > > > Date: Fri, 4 Dec 2009 23:28:54 +0000
> > > > Subject: FW: Persistence unit ref:
> > > >
> > > >
> > > >
> > > > Here,
> > > >
> > > > Deploying application in domain failed; Deployment Error -- Could not
> > > > resolve a persistence unit corresponding to the
> > > > persistence-unit-ref-name [persistence/TestingUN2] in scope of the
> > > > module called [C:\jee\WebApplication2\build\web]. Please verify your
> > > > application.
> > > >
> > > >
> > > >
> > > >
> > ------------------------------------------------------------------------
> > > > From: gorgeous65_at_msn.com
> > > > To: users_at_glassfish.dev.java.net
> > > > Subject: RE: Persistence unit ref:
> > > > Date: Fri, 4 Dec 2009 23:26:23 +0000
> > > >
> > > > Marina,
> > > >
> > > > I am using Gv 2. gluster profile. I really don't understand why
> > > > I am having this problem. I have even created another test
> > > > war application. but still similar error.
> > > >
> > > > Thanking you.
> > > >
> > > > eve
> > > >
> > > > > Date: Fri, 4 Dec 2009 15:23:41 -0800
> > > > > From: Marina.Vatkina_at_Sun.COM
> > > > > To: users_at_glassfish.dev.java.net
> > > > > Subject: Re: Persistence unit ref:
> > > > >
> > > > > Eve,
> > > > >
> > > > > Are you deploying it to GF v2.x or v3? In v3 you need to package
> > > > shared parts
> > > > > into the ear's lib/myjar.jar to be available to all components.
> > > > >
> > > > > Regards,
> > > > > -marina
> > > > >
> > > > > Eve Pokua wrote:
> > > > > > Ralph,
> > > > > >
> > > > > > My application is a full enterprise application.
> > > > > > No the persistence.xml is in my ejb
> > > > > > mobule section where all my entity files are.
> > > > > >
> > > > > > eve
> > > > > >
> > > >
> > ------------------------------------------------------------------------
> > > > > > From: ralph.winzinger_at_senacor.de
> > > > > > To: users_at_glassfish.dev.java.net
> > > > > > Date: Sat, 5 Dec 2009 00:01:29 +0100
> > > > > > Subject: Re: Persistence unit ref:
> > > > > >
> > > > > > but persistence.xml is not contained in your war, is it?
> > > > > >
> > > > > >
> > > > > > Am 04.12.2009 um 23:53 schrieb Eve Pokua:
> > > > > >
> > > > > > Ralph see attached
> > > > > >
> > > > > > Hope that helps. This testing is also giving error.
> > > > > >
> > > > > > Thanks
> > > > > >
> > > > > > eve
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > >
> > ------------------------------------------------------------------------
> > > > > > From: gorgeous65_at_msn.com <mailto:gorgeous65_at_msn.com>
> > > > > > To: users_at_glassfish.dev.java.net
> > > > > > <mailto:users_at_glassfish.dev.java.net>; ejb_at_glassfish.dev.java.net
> > > > > > <mailto:ejb_at_glassfish.dev.java.net>;
> > persistence_at_glassfish.dev.java.net
> > > > > > <mailto:persistence_at_glassfish.dev.java.net>
> > > > > > Date: Fri, 4 Dec 2009 22:32:26 +0000
> > > > > > Subject: RE: Persistence unit ref:
> > > > > >
> > > > > > Ralph,
> > > > > >
> > > > > > My application is very big.
> > > > > >
> > > > > > Do you have spring?
> > > > > >
> > > > > > In Marina's example
> > > > > >
> > > > > > This is what the JavaEE spec gives as an example:
> > > > > > *<persistence-unit-ref>
> > > > > > <persistence-unit-ref-name>
> > > > > > persistence/InventoryAppDB
> > > > > > *</persistence-unit-ref-name>
> > > > > > <persistence-unit-name>
> > > > > > InventoryManagement
> > > > > > </persistence-unit-name>
> > > > > > *</persistence-unit-ref>
> > > > > > *
> > > > > >
> > > > > >
> > > > > > I do not have what is bold in my per.xml
> > > > > >
> > > > > > Shouldn't it be why I am getting an error? The web.xml can not
> > > > > > resolve -
> > > > > >
> > > > > > Deploying application in domain failed; Could not resolve a
> > > > > > persistence unit corresponding to the persistence-unit-ref-name
> > > > > > [persistence/ENTERPRISE-ejbPU] in scope of the module called
> > > > > > [gfdeploy#C:\jee\ENTERPRISE\dist\gfdeploy\ENTERPRISE-war_war].
> > > > > > Please verify your application.
> > > > > >
> > > > > > IT's complaining about the per-unit-ref-name which is not in my
> > > > per.xml.
> > > > > >
> > > > > >
> > > > > > How do I put that in? I tried to add it in but has been getting
> > error.
> > > > > > Could you add it in and send it over?
> > > > > >
> > > > > > I will try and see if I can send over a test app.
> > > > > >
> > > > > > Thanking you.
> > > > > >
> > > > > > eve
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > >
> > ------------------------------------------------------------------------
> > > > > > From: ralph.winzinger_at_senacor.de
> > <mailto:ralph.winzinger_at_senacor.de>
> > > > > > To: users_at_glassfish.dev.java.net
> > <mailto:users_at_glassfish.dev.java.net>
> > > > > > Date: Fri, 4 Dec 2009 23:00:35 +0100
> > > > > > Subject: Re: Persistence unit ref:
> > > > > >
> > > > > > well, I tried various constellations to test whether your error
> > will
> > > > > > show up (renaming persistence.xml, changing the value
> > > > > > in <persistence-unit-ref-name> (web.xml), changing
> > <persistence-unit
> > > > > > name=...> (persistence.xml)). But the error only occurred when the
> > > > > > unit-names in persistence.xml and web.xml did not match.
> > > > > >
> > > > > > If your project is some kind of test-project, you might send your
> > > > > > WAR (if it is not too big of course) - I will try to throw it at my
> > > > > > container ...
> > > > > >
> > > > > >
> > > > > > Am 04.12.2009 um 22:51 schrieb Eve Pokua:
> > > > > >
> > > > > > Ralph,
> > > > > >
> > > > > > I have recreated my persistence.xml.
> > > > > >
> > > > > > Please, note that I am using netbeans 6.7 to create my
> > > > > > persistence.xml.
> > > > > >
> > > > > > Here is the new file-
> > > > > >
> > > > > > <?xml version="1.0" encoding="UTF-8"?>
> > > > > > <persistence version="1.0"
> > > > > > 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/persistencehttp://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
> > > > > > <persistence-unit name="ENTERPRISE-ejbPU" transaction-type="JTA">
> > > > > >
> > > > > > <provider>oracle.toplink.essentials.PersistenceProvider</provider>
> > > > > > <jta-data-source>jdbc_/EnterpriseDB2</jta-data-source>
> > > > > > <properties>
> > > > > > <property name="toplink.ddl-generation"
> > > > > > value="create-tables"/>
> > > > > > </properties>
> > > > > > </persistence-unit>
> > > > > > </persistence>
> > > > > >
> > > > > >
> > > > > > My problem comes when I have to
> > > > > >
> > > > > > this to my web.xml-
> > > > > >
> > > > > > <persistence-unit-ref>
> > > > > >
> > > > > >
> > > >
> > <persistence-unit-ref-name>persistence/ENTERPRISE-ejbPU</persistence-unit-ref-name>
> > > > > >
> > > > > > <persistence-unit-name>ENTERPRISE-ejbPU</persistence-unit-name>
> > > > > > </persistence-unit-ref>
> > > > > >
> > > > > > when I comment it out of my web.xml, my application deploys.
> > > > > >
> > > > > > Ralph, could you please, double check your per.xml to see if you
> > > > > > have the
> > > > > >
> > > > > > persistence-unit-ref>
> > > > > > <persistence-unit-ref-name>
> > > > > >
> > > > > > tag and also please, do reproduce my error by changing the per.
> > > > > > name.
> > > > > >
> > > > > > I'm sure you will reproduce the error.
> > > > > >
> > > > > >
> > > > > > This is what the JavaEE spec gives as an example:
> > > > > > <persistence-unit-ref>
> > > > > > <persistence-unit-ref-name>
> > > > > > persistence/InventoryAppDB
> > > > > > </persistence-unit-ref-name>
> > > > > > <persistence-unit-name>
> > > > > > InventoryManagement
> > > > > > </persistence-unit-name>
> > > > > > </persistence-unit-ref>
> > > > > >
> > > > > > Mar. I am using netbeans to create the per.xml.
> > > > > >
> > > > > >
> > > > > >
> > > > > > Thanking you for all your help.
> > > > > >
> > > > > > eve
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > >
> > ------------------------------------------------------------------------
> > > > > >
> > > > > > From: ralph.winzinger_at_senacor.de
> > <mailto:ralph.winzinger_at_senacor.de>
> > > > > > To: users_at_glassfish.dev.java.net
> > > > > > <mailto:users_at_glassfish.dev.java.net>
> > > > > > Date: Fri, 4 Dec 2009 22:05:39 +0100
> > > > > > Subject: Re: Persistence unit ref:
> > > > > >
> > > > > > Eve,
> > > > > >
> > > > > > the only way, how I can reproduce your error is to change the
> > > > > > value of <persistence-unit-name> to something not matching the
> > > > > > name in the persistence.xml. But thatseems to be ok in the
> > > > > > snippets you sent. So I would go on and look for old files that
> > > > > > might be still around - maybe there's another persistence.xml
> > > > > > that is read by accident. Look inside the WAR and make sure that
> > > > > > everything is as expected.
> > > > > >
> > > > > > Bye,
> > > > > > Ralph
> > > > > >
> > > > > >
> > > > > >
> > > > > > Am 04.12.2009 um 19:48 schrieb Eve Pokua:
> > > > > >
> > > > > > Ralph,
> > > > > >
> > > > > > Here is my per.xml
> > > > > >
> > > > > >
> > > > > >
> > > > > > <?xml version="1.0" encoding="UTF-8"?>
> > > > > > <persistence version="1.0"
> > > > > > 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">
> > > > > > <persistence-unit name="ENTERPRISE-ejbPU"
> > > > > > transaction-type="JTA">
> > > > > > <jta-data-source>jdbc_/EnterpriseDB2</jta-data-source>
> > > > > > <exclude-unlisted-classes>false</exclude-unlisted-classes>
> > > > > > <properties>
> > > > > > </properties>
> > > > > > </persistence-unit>
> > > > > > </persistence>
> > > > > >
> > > > > >
> > > > > > regards
> > > > > >
> > > > > > eve
> > > > > >
> > > > > >
> > > >
> > ------------------------------------------------------------------------
> > > > > > From: ralph.winzinger_at_senacor.de
> > > > > > <mailto:ralph.winzinger_at_senacor.de>
> > > > > > To: users_at_glassfish.dev.java.net
> > > > > > <mailto:users_at_glassfish.dev.java.net>
> > > > > > Date: Fri, 4 Dec 2009 15:20:16 +0100
> > > > > > Subject: Re: Persistence unit ref:
> > > > > >
> > > > > > hi,
> > > > > >
> > > > > > what does your persistence.xml look like?
> > > > > >
> > > > > >
> > > > > > Am 04.12.2009 um 13:50 schrieb Eve Pokua:
> > > > > >
> > > > > > Ralph,
> > > > > >
> > > > > > Thank you for your reply.
> > > > > >
> > > > > > I did as you said.
> > > > > >
> > > > > > i added the following to my web.xml
> > > > > >
> > > > > >
> > > > > >
> > > > > > <persistence-unit-ref>
> > > > > >
> > > >
> > <persistence-unit-ref-name>persistence/ENTERPRISE-ejbPU</persistence-unit-ref-name>
> > > > > > <persistence-unit-name>ENTERPRISE-ejbPU</persistence-unit-name>
> > > > > > </persistence-unit-ref>
> > > > > >
> > > > > >
> > > > > >
> > > > > > in my applicationContext.xml
> > > > > >
> > > > > > <bean
> > > > > >
> > > >
> > class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"
> > > > > > >
> > > > > > <property name="persistenceUnits">
> > > > > > <map>
> > > > > > <entry key="MyPU"
> > > > > > value="persistence/ENTERPRISE-ejbPU"/>
> > > > > > </map>
> > > > > > </property>
> > > > > > </bean>
> > > > > >
> > > > > > <!--
> > > > > > see
> > > >
> > http://static.springsource.org/spring/docs/2.5.x/api/org/springframework/transaction/jta/JtaTransactionManager.html
> >
> > > > -->
> > > > > > <tx:jta-transaction-manager/>
> > > > > > <!--
> > > > > > see
> > > >
> > http://static.springsource.org/spring/docs/2.5.x/reference/transaction.html
> > > > -->
> > > > > > <tx:annotation-driven/>
> > > > > >
> > > > > >
> > > > > > But I still get the error -
> > > > > >
> > > > > >
> > > >
> > [#|2009-12-04T12:34:05.536+0000|SEVERE|sun-appserver2.1|javax.enterprise.system.tools.deployment|_ThreadID=20;_ThreadName=Thread-48;_RequestID=3fb89f4d-e8ef-403f-a422-9e5442bf9b3a;|Exception
> > > > > > occured in J2EEC Phase
> > > > > > com.sun.enterprise.deployment.backend.IASDeploymentException:
> > > > > > Could not resolve a persistence unit corresponding to
> > > > > > the persistence-unit-ref-name
> > > > > > [persistence/ENTERPRISE-ejbPU] in scope of the module
> > > > > > called
> > > > > > [gfdeploy#C:\jee\ENTERPRISE\dist\gfdeploy\ENTERPRISE-war_war].
> > > > > > Please verify your application.
> > > > > > at
> > > > > >
> > > >
> > com.sun.enterprise.deployment.BundleDescriptor.findReferencedPUsViaPURefs(BundleDescriptor.java:711)
> > > > > > at
> > > > > >
> > > >
> > com.sun.enterprise.deployment.WebBundleDescriptor.findReferencedPUs(WebBundleDescriptor.java:727)
> > > > > > at
> > > > > >
> > > >
> > com.sun.jdo.spi.persistence.support.ejb.ejbc.PersistenceProcessor.getAllPersistenceUnitDescriptors(PersistenceProcessor.java:214)
> > > > > > at
> > > > > >
> > > >
> > com.sun.jdo.spi.persistence.support.ejb.ejbc.PersistenceProcessor.processApplication(PersistenceProcessor.java:175)
> > > > > > at
> > > > > >
> > > >
> > com.sun.jdo.spi.persistence.support.ejb.ejbc.DeploymentEventListenerImpl.processApplication(DeploymentEventListenerImpl.java:211)
> > > > > > at
> > > > > >
> > > >
> > com.sun.jdo.spi.persistence.support.ejb.ejbc.DeploymentEventListenerImpl.processEvent(DeploymentEventListenerImpl.java:172)
> > > > > > at
> > > > > >
> > > >
> > com.sun.jdo.spi.persistence.support.ejb.ejbc.DeploymentEventListenerImpl.notifyDeploymentEvent(DeploymentEventListenerImpl.java:122)
> > > > > > at
> > > > > >
> > > >
> > com.sun.enterprise.deployment.backend.DeploymentEventManager.notifyDeploymentEvent(DeploymentEventManager.java:79)
> > > > > > at
> > > > > >
> > > >
> > com.sun.enterprise.deployment.backend.AppDeployer.postDeploy(AppDeployer.java:401)
> > > > > > at
> > > > > >
> > > >
> > com.sun.enterprise.deployment.backend.AppDeployer.deploy(AppDeployer.java:260)
> > > > > > at
> > > > > >
> > > >
> > com.sun.enterprise.deployment.backend.AppDeployer.doRequestFinish(AppDeployer.java:148)
> > > > > > at
> > > > > >
> > > >
> > com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:208)
> > > > > > at
> > > > > >
> > > >
> > com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108)
> > > > > > at
> > > > > >
> > > >
> > com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:966)
> > > > > > at
> > > > > >
> > > >
> > com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:283)
> > > > > > at
> > > > > >
> > > >
> > com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:835)
> > > > > > at
> > > > > >
> > > >
> > com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:187)
> > > > > > at
> > > > > >
> > > >
> > com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:225)
> > > > > > |#]
> > > > > >
> > > >
> > [#|2009-12-04T12:37:03.074+0000|INFO|sun-appserver2.1|javax.enterprise.resource.webcontainer.jsf.config|_ThreadID=21;_ThreadName=httpWorkerThread-4848-1;;|Initializing
> > > > > > Sun's JavaServer Faces implementation (1.2_04-b22-p05)
> > > > > > for context ''|#]
> > > > > >
> > > >
> > [#|2009-12-04T12:37:58.729+0000|INFO|sun-appserver2.1|com.sun.jbi.framework|_ThreadID=21;_ThreadName=httpWorkerThread-4848-1;|JBIFW0012:
> > > > > > JBI framework startup complete.|#]
> > > > > >
> > > > > >
> > > > > > sO MY QUESTION AGAIN IS - WHERE CAN I FIND A REFERENCE
> > > > > > TO MY persistence-unit-ref-name????
> > > > > >
> > > > > > I'VE CHECKED MY domain.xml but no details.
> > > > > >
> > > > > > thanks
> > > > > >
> > > > > > eve
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > >
> > ------------------------------------------------------------------------
> > > > > > From: ralph.winzinger_at_senacor.com
> > > > > > <mailto:ralph.winzinger_at_senacor.com>
> > > > > > To: users_at_glassfish.dev.java.net
> > > > > > <mailto:users_at_glassfish.dev.java.net>
> > > > > > Date: Fri, 4 Dec 2009 00:42:46 +0100
> > > > > > Subject: Re: Persistence unit ref:
> > > > > >
> > > > > > Hi,
> > > > > >
> > > > > > I got this working just about an ago ...
> > > > > >
> > > > > > web.xml:
> > > > > >
> > > > > > <persistence-unit-ref>
> > > > > >
> > > > > >
> > <persistence-unit-ref-name>persistence/hd</persistence-unit-ref-name>
> > > > > > <persistence-unit-name>hd</persistence-unit-name>
> > > > > > </persistence-unit-ref>
> > > > > >
> > > > > > application-context.xml:
> > > > > >
> > > > > > <bean
> > > >
> > class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"
> >
> > > > >
> > > > > > <property name="persistenceUnits">
> > > > > > <map>
> > > > > > <entry key="MyPU" value="persistence/hd"/>
> > > > > > </map>
> > > > > > </property>
> > > > > > </bean>
> > > > > >
> > > > > > <!-- see
> > > > > >
> > > >
> > <http://static.springsource.org/spring/docs/2.5.x/api/org/springframework/transaction/jta/JtaTransactionManager.html>http://static.springsource.org/spring/docs/2.5.x/api/org/springframework/transaction/jta/JtaTransactionManager.html
> >
> > > > -->
> > > > > > <tx:jta-transaction-manager/>
> > > > > > <!-- see
> > > > > >
> > > >
> > <http://static.springsource.org/spring/docs/2.5.x/reference/transaction.html>http://static.springsource.org/spring/docs/2.5.x/reference/transaction.html
> >
> > > > -->
> > > > > > <tx:annotation-driven/>
> > > > > >
> > > > > > Hope this helps ...
> > > > > >
> > > > > > Bye,
> > > > > > Ralph
> > > > > >
> > > > > >
> > > > > > Kurz gehalten, da vom iPhone gesendet
> > > > > >
> > > > > > Am 04.12.2009 um 00:16 schrieb "Eve Pokua"
> > > > > > <gorgeous65_at_msn.com <mailto:gorgeous65_at_msn.com>>:
> > > > > >
> > > > > > Hello,
> > > > > >
> > > > > > Below is my persistence.xml-
> > > > > >
> > > > > > <?xml version="1.0" encoding="UTF-8"?>
> > > > > > <persistence version="1.0" xmlns="
> > > > > >
> > > >
> > <http://java.sun.com/xml/ns/persistence>http://java.sun.com/xml/ns/persistence"
> > > > > > xmlns:xsi="
> > > > > >
> > > >
> > <http://www.w3.org/2001/XMLSchema-instance>http://www.w3.org/2001/XMLSchema-instance"
> > > > > > xsi:schemaLocation="
> > > > > >
> > > >
> > <http://java.sun.com/xml/ns/persistence>http://java.sun.com/xml/ns/persistence
> >
> > > >
> > > > > >
> > > >
> > <http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd>http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
> > > > > > <persistence-unit name="ENTERPRISE-ejbPU"
> > > > > > transaction-type="JTA">
> > > > > >
> > > > > > <jta-data-source>jdbc_/EnterpriseDB2</jta-data-source>
> > > > > >
> > > > > > <exclude-unlisted-classes>false</exclude-unlisted-classes>
> > > > > > <properties>
> > > > > > </properties>
> > > > > > </persistence-unit>
> > > > > > </persistence>
> > > > > >
> > > > > >
> > > > > > How do I find the name of my -persistence-unit-ref-name?
> > > > > >
> > > > > > I use the following and I get deployment error
> > > > > >
> > > > > >
> > <persistence-unit-ref-name>ENTERPRISE-ejbPU</persistence-unit-ref-name>
> > > > > >
> > > > > > Deploying application in domain failed; Could not
> > > > > > resolve a persistence unit corresponding to the
> > > > > > persistence-unit-ref-name [ENTERPRISE-ejbPU] in
> > > > > > scope of the module called
> > > > > > [gfdeploy#C:\jee\ENTERPRISE\dist\gfdeploy\ENTERPRISE-war_war].
> > > > > > Please verify your application.
> > > > > >
> > > > > > I need to specify it within my web.xml in-order to
> > > > > > use @Persistence in my spring JEE
> > > > > > application.
> > > > > >
> > > > > > Thanking you.
> > > > > >
> > > > > > eve
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > >
> > ------------------------------------------------------------------------
> > > > > > Use Hotmail to send and receive mail from your
> > > > > > different email accounts. Find out how.
> > > > > > <http://clk.atdmt.com/UKM/go/186394592/direct/01/>
> > > > > >
> > > > > >
> > > > > >
> > > >
> > ------------------------------------------------------------------------
> > > > > > New! Receive and respond to mail from other email
> > > > > > accounts from within Hotmail Find out how.
> > > > > > <http://clk.atdmt.com/UKM/go/186394593/direct/01/>
> > > > > >
> > > > > >
> > > > > > Ralph Winzinger
> > > > > > Principal Architect
> > > > > > ______________________________
> > > > > > Senacor Technologies AG
> > > > > > Vordere Cramergasse 11
> > > > > > 90478 Nürnberg
> > > > > >
> > > > > > Telefon: +49 (0)911 4244-202
> > > > > > Telefax: +49 (0)911 4244-100
> > > > > >
> > > > > > ralph.winzinger_at_senacor.com <mailto:ralph.winzinger_at_senacor.com>
> > > > > > www.senacor.com <http://www.senacor.com/>
> > > > > >
> > > > > > Senacor Technologies Aktiengesellschaft - Sitz: Nürnberg -
> > > > > > Amtsgericht Nürnberg - Reg.-Nr.: HRB 23098
> > > > > > Vorstand: Matthias Tomann, Marcus Purzer -
> > > > > > Aufsichtsratsvorsitzender: Mathias J. Lindermeir
> > > > > >
> > > > > >
> > > > > >
> > > >
> > ------------------------------------------------------------------------
> > > > > > Add other email accounts to Hotmail in 3 easy steps. Find
> > > > > > out how. <http://clk.atdmt.com/UKM/go/186394593/direct/01/>
> > > > > >
> > > > > >
> > > > > > Ralph Winzinger
> > > > > > Principal Architect
> > > > > > ______________________________
> > > > > > Senacor Technologies AG
> > > > > > Vordere Cramergasse 11
> > > > > > 90478 Nürnberg
> > > > > >
> > > > > > Telefon: +49 (0)911 4244-202
> > > > > > Telefax: +49 (0)911 4244-100
> > > > > >
> > > > > > ralph.winzinger_at_senacor.com <mailto:ralph.winzinger_at_senacor.com>
> > > > > > www.senacor.com <http://www.senacor.com/>
> > > > > >
> > > > > > Senacor Technologies Aktiengesellschaft - Sitz: Nürnberg -
> > > > > > Amtsgericht Nürnberg - Reg.-Nr.: HRB 23098
> > > > > > Vorstand: Matthias Tomann, Marcus Purzer -
> > > > > > Aufsichtsratsvorsitzender: Mathias J. Lindermeir
> > > > > >
> > > > > >
> > > > > >
> > > >
> > ------------------------------------------------------------------------
> > > > > > View your other email accounts from your Hotmail inbox. Add them
> > > > > > now. <http://clk.atdmt.com/UKM/go/186394592/direct/01/>
> > > > > >
> > > > > >
> > > > > > Ralph Winzinger
> > > > > > Principal Architect
> > > > > > ______________________________
> > > > > > Senacor Technologies AG
> > > > > > Vordere Cramergasse 11
> > > > > > 90478 Nürnberg
> > > > > >
> > > > > > Telefon: +49 (0)911 4244-202
> > > > > > Telefax: +49 (0)911 4244-100
> > > > > >
> > > > > > ralph.winzinger_at_senacor.com <mailto:ralph.winzinger_at_senacor.com>
> > > > > > www.senacor.com <http://www.senacor.com/>
> > > > > >
> > > > > > Senacor Technologies Aktiengesellschaft - Sitz: Nürnberg -
> > > > > > Amtsgericht Nürnberg - Reg.-Nr.: HRB 23098
> > > > > > Vorstand: Matthias Tomann, Marcus Purzer -
> > > > > > Aufsichtsratsvorsitzender: Mathias J. Lindermeir
> > > > > >
> > > > > >
> > > > > >
> > > >
> > ------------------------------------------------------------------------
> > > > > > View your other email accounts from your Hotmail inbox. Add them
> > > > > > now. <http://clk.atdmt.com/UKM/go/186394592/direct/01/>
> > > > > >
> > > >
> > ------------------------------------------------------------------------
> > > > > > Have more than one Hotmail account? Link them together to easily
> > > > > > access
> > > > > > both.
> > > >
> > <persistence.xml><web.xml><BaleBean2.java><BaleBeanRemote2.java><Baleent2.java><Testingapp2-war.war>---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> > > > > > <mailto:users-unsubscribe_at_glassfish.dev.java.net>
> > > > > > For additional commands, e-mail: users-help_at_glassfish.dev.java.net
> > > > > > <mailto:users-help_at_glassfish.dev.java.net>
> > > > > >
> > > > > >
> > > > > > Ralph Winzinger
> > > > > > Principal Architect
> > > > > > ______________________________
> > > > > > Senacor Technologies AG
> > > > > > Vordere Cramergasse 11
> > > > > > 90478 Nürnberg
> > > > > >
> > > > > > Telefon: +49 (0)911 4244-202
> > > > > > Telefax: +49 (0)911 4244-100
> > > > > >
> > > > > > ralph.winzinger_at_senacor.com <mailto:ralph.winzinger_at_senacor.com>
> > > > > > www.senacor.com <http://www.senacor.com/>
> > > > > >
> > > > > > Senacor Technologies Aktiengesellschaft - Sitz: Nürnberg -
> > Amtsgericht
> > > > > > Nürnberg - Reg.-Nr.: HRB 23098
> > > > > > Vorstand: Matthias Tomann, Marcus Purzer -
> > Aufsichtsratsvorsitzender:
> > > > > > Mathias J. Lindermeir
> > > > > >
> > > > > >
> > > > > >
> > > >
> > ------------------------------------------------------------------------
> > > > > > Add other email accounts to Hotmail in 3 easy steps. Find out how.
> > > > > > <http://clk.atdmt.com/UKM/go/186394593/direct/01/ >
> > > > >
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> > > > > For additional commands, e-mail: users-help_at_glassfish.dev.java.net
> > > > >
> > > >
> > > >
> > ------------------------------------------------------------------------
> > > > Add other email accounts to Hotmail in 3 easy steps. Find out how.
> > > > <http://clk.atdmt.com/UKM/go/186394593/direct/01/>
> > > >
> > ------------------------------------------------------------------------
> > > > Have more than one Hotmail account? Link them together to easily
> > access
> > > > both.
> > > >
> > ------------------------------------------------------------------------
> > > > Have more than one Hotmail account? Link them together to easily
> > access
> > > > both. < http://clk.atdmt.com/UKM/go/186394591/direct/01/>
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> > > For additional commands, e-mail: users-help_at_glassfish.dev.java.net
> > >
> >
> > ------------------------------------------------------------------------
> > Use Hotmail to send and receive mail from your different email accounts.
> > Find out how. <http://clk.atdmt.com/UKM/go/186394592/direct/01/>
> > ------------------------------------------------------------------------
> > Use Hotmail to send and receive mail from your different email accounts.
> > Find out how. <http://clk.atdmt.com/UKM/go/186394592/direct/01/>
> > ------------------------------------------------------------------------
> > Add other email accounts to Hotmail in 3 easy steps. Find out how.
> > <http://clk.atdmt.com/UKM/go/186394593/direct/01/ >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ejb-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: ejb-help_at_glassfish.dev.java.net
>
                                               
_________________________________________________________________
Add your Gmail and Yahoo! Mail email accounts into Hotmail - it's easy
http://clk.atdmt.com/UKM/go/186394592/direct/01/