axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amila Suriarachchi <amilasuriarach...@gmail.com>
Subject Re: aar and hibernate
Date Mon, 28 Sep 2009 06:37:37 GMT
On Sat, Sep 26, 2009 at 2:11 AM, ANTHONY ENNIS <tony.ennis@insightbb.com>wrote:

> I have a web service that performs a simple database lookup. Unfortunately,
> Persistence.createEntityManagerFactory('xyzzy') fails in all cases.
>
> My aar looks like:
> /com
>        (class files in package format eg com/this/that/x.class)
> /META-INF
>     services.xml
> /lib
>     numerous jars
>
> I don't know where to put the persistence.xml file.  I have tried putting
> it everywhere.  I keep getting the following error:
>
>
try this as well.

create a jar file containing your clases and the persistence.xml file

eg a jar containing.

persistence.xml
com/this/that

and put under lib folder
eg
/lib
   other.jars
   your.jar

thanks,
Amila.




> javax.persistence.PersistenceException: No Persistence provider for
> EntityManager named xyzzy
>         at
> javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:56)
>         at
> javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:34)
>         at
> com.papajohns.snapshot.webservice.SurveySubmissionWebService.getSurvey(SurveySubmissionWebService.java:63)
>
> (etc)
>
> Or does that error mean something else?
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/

Mime
View raw message