Since you are a WebSphere user, have you opened a PMR for this problem? If you open a PMR, that will definitely raise the priority of getting this issue resolved and get a fix delivered in an iFix or fixpack. Literally, anybody can open a JIRA Issue against OpenJPA. The community only has so many cycles in a day, so we need some assistance with prioritizing the work. PMRs help the IBM-related developers properly prioritize... :-)
Related to getting Hibernate to work properly in WebSphere. It's definitely doable [1], but I would ask why you want to use yet another piece of software in your stack? I've been asked this question so many times that I recently wrote a Comment Lines to document my response [2]. Hope this information helps. Thanks! Kevin [1] https://www.ibm.com/developerworks/mydeveloperworks/wikis/form/anonymous/api/library/53181ccd-bcd4-431f-b968-0b5f6d46d652/document/192a432b-28bb-4080-b037-345e5d83da76/attachment/61e74f67-1d60-4120-ba25-ad7264c9f4f6/media/AlternateJPAProviders_TestReport.pdf [2] http://www.ibm.com/developerworks/websphere/techjournal/1008_col_sutter/1008_col_sutter.html On Thu, Sep 9, 2010 at 8:22 AM, Rick Curtis <[email protected]> wrote: > > At first someone knows a solution for that problem (workaround)? > > Does this comment from the JIRA apply to your situation? : Forgot to > mention > that one work around we found for this problem is that if both Lower > entities use LAZY fetches in stead of EAGER fetches, then the exception > won't be thrown. > > hth, > Rick > > On Thu, Sep 9, 2010 at 7:43 AM, mpf <[email protected]> wrote: > > > > > I am using a WAS7 with a DB2 and I want to change the persistence > provider > > from openjpa 1.2.2 (provided with WAS7) to hibernate 3.3.2.GA (the last > > JPA > > 1.0 implementation?). > > The reason is following: > > > > > https://issues.apache.org/jira/browse/OPENJPA-1508?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel > > > > > https://issues.apache.org/jira/browse/OPENJPA-1508?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel > > > > At first someone knows a solution for that problem (workaround)? > > Otherwise I need an alternative provider like Hibernate. > > > > Someone made experience with changing the WAS7 persistence provider? > > > > I tried it out and get following exception: > > > > Caused by: javax.ejb.EJBTransactionRolledbackException: nested exception > > is: > > javax.ejb.EJBException: Injection failure; nested exception is: > > java.lang.IllegalStateException: EntityManagerFactory has not been > created > > for PU : PuId=ZWREar#ZWRService.jar#zwr+ > > Caused by: javax.ejb.EJBException: Injection failure; nested exception > is: > > java.lang.IllegalStateException: EntityManagerFactory has not been > created > > for PU : PuId=ZWREar#ZWRService.jar#zwr+ > > Caused by: java.lang.IllegalStateException: EntityManagerFactory has not > > been created for PU : PuId=ZWREar#ZWRService.jar#zwr > > at > > > > > com.ibm.ws.jpa.management.JPAPUnitInfo.getEntityManagerFactory(JPAPUnitInfo.java:1352) > > > > I can't make head or tail of it: > > http://publib.boulder.ibm.com/infocente ... party.html > > http://www.ibm.com/developerworks/websp ... #hibernate > > > > My persistence.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="asdf" transaction-type="JTA"> > > <provider>org.hibernate.ejb.HibernatePersistence</provider> > > <jta-data-source>jdbc/asdf</jta-data-source> > > <class>at.gv.domain.impl.ClassA</class> > > <class>at.gv.domain.impl.ClassB</class> > > <properties> > > <property name="hibernate.dialect" > > value="org.hibernate.dialect.DB2Dialect" /> > > <property name="hibernate.show_sql" value="true" /> > > <property name="hibernate.format_sql" value="true" /> > > <property name="hibernate.connection.datasource" value=" > > java:/comp/env/jdbc/asdf" /> > > <property name="hibernate.transaction.factory_class" > > value="org.hibernate.transaction.CMTTransactionFactory" /> > > <property name="hibernate.transaction.manager_lookup_class" > > > > value="org.hibernate.transaction.WebSphereExtendedJTATransactionLookup" > /> > > </properties> > > </persistence-unit> > > </persistence> > > > > Could someone tell me what I have to do that an alternative persistence > > provider works? >
