I moved my classes under WEB-INF/classes and the application no longer deploys. I get
org.apache.axis2.deployment.DeploymentException: Processing Operations Modules with an error of The following error occurred during schema generation: java.lang.ClassNotFoundException: Class Not found : com.company.snapshot.webservice.MyWebService ----- Original Message ----- From: robert lazarski <[email protected]> Date: Friday, September 25, 2009 17:07 Subject: Re: aar and hibernate To: [email protected] > On Fri, Sep 25, 2009 at 5:41 PM, ANTHONY ENNIS > <[email protected]> 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: > > > > 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? > > > > The only thing really required in your aar is a services.xml . Put > your classes under WEB-INF/classes and you should have no problems. > Hibernate uses the TCCL (Thread context classloader) so you > can't load > hibernate there without some tricks - for example what the spring > support docs show for hibernate. > > - R >
