openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dick <michael.d.d...@gmail.com>
Subject Re: PersistenceUnit null not found
Date Thu, 15 Jul 2010 18:58:08 GMT
Nothing else is jumping out at me so I'm cross-posting to users@openejb. I'm
not sure what PersistenceUnit 'null' means in this context - they might be
able to shed some light on the message though.

-mike

On Thu, Jul 15, 2010 at 10:01 AM, Michael Simons <michael.simons@optitool.de
> wrote:

> Hello Mike,
>
> It's in the META-INF directory of the ejb.jar that I deploy.
> We are deploying to a Geronimo AS (2.1.4) that uses openejb-3.0.1. Might
> this have been a bug in
> that version that has been solved since then.
>
> Regards, Michael
>
> Michael Dick schrieb:
> > Hi,
> >
> > Where is the persistence.xml file in your ejb.jar? It should be in the
> > META-INF directory.
> >
> > The container will look for persistence.xml files in the following places
> > (per JPA spec):
> > In Java EE environments, the root of a persistence unit must be one of
> the
> > following:
> > • an EJB-JAR file
> > • the WEB-INF/classes directory of a WAR file[80]
> > • a jar file in the WEB-INF/lib directory of a WAR file
> > • a jar file in the EAR library directory
> > • an application client jar file
> >
> > In this case the root of the persistence unit is the directory that
> contains
> > META-INF/persistence.xml, not the directory that contains
> persistence.xml.
> >
> > If you have it in one of the places listed above the OpenEJB should be
> able
> > to find it.
> >
> > Regards,
> > -mike
> >
> > On Thu, Jul 15, 2010 at 8:13 AM, Michael Simons
> > <michael.simons@optitool.de>wrote:
> >
> >> Hello,
> >>
> >> I've declared a persistence-unit named "AtlantisWest" in my
> >> persistence.xml, that I reference in
> >> my bean by
> >>    @PersistenceContext(name="AtlantisWest",
> >> type=PersistenceContextType.EXTENDED)
> >>    protected EntityManager     entityManager;
> >>
> >> Can anybody please tell me what might cause the following exception when
> >> deploying my bean:
> >>
> >> Caused by: org.apache.openejb.OpenEJBException: Error building bean
> >> 'MapAuxiliaryServiceBw'.
> >> Exception: class org.apache.openejb.OpenEJBException: PersistenceU
> >> nit 'null' not found for EXTENDED ref 'AtlantisWest': PersistenceUnit
> >> 'null' not found for
> >> EXTENDED ref 'AtlantisWest'
> >>        at
> >>
> org.apache.openejb.assembler.classic.EjbJarBuilder.build(EjbJarBuilder.java:64)
> >>        at
> >>
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:489)
> >>        ... 52 more
> >> Caused by: org.apache.openejb.OpenEJBException: PersistenceUnit 'null'
> not
> >> found for EXTENDED
> >> ref 'AtlantisWest'
> >>        at
> >>
> >>
> org.apache.openejb.assembler.classic.EnterpriseBeanBuilder.build(EnterpriseBeanBuilder.java:198)
> >>        at
> >>
> org.apache.openejb.assembler.classic.EjbJarBuilder.build(EjbJarBuilder.java:52)
> >>
> >>
> >> Kind Regards, Michael
> >>
> >>
> >
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message