1 Reply Latest reply on Mar 20, 2012 1:51 PM by Scott Marlow

    Using Toplink for JPA with AS7.1.Final

    Michael G Novice



      I just wanted to try out Toplink on AS 7.1 for JPA and i was wondering if anyone has tried this as well.


      When i think i switch out everything that did used hibernate and deployed my app i get a classcast exception - cannot cast oracle.toplink.essentials.PersistenceProvider to javax.persistence.spi.PersistenceProvider.


      Any idea what i'm doing wrong here?



        • 1. Re: Using Toplink for JPA with AS7.1.Final
          Scott Marlow Master

          You probably would need to remove the javax.persistence classes from your deployment to avoid that error. 


          Having said that, I don't think that Toplink knows how to look up the TransactionSynchronizationRegistry (don't think they know how to use that yet) or to lookup the transaction manager on AS7.  So, you wouldn't be able to control the transactions with JTA (at least not for updating the database).


          Last I heard, most of the development is occuring in the EclipseLink project.  I submitted a patch for changing the transaction manager JNDI lookup string but don't really if that has been released yet.  If your able to build EclipseLink from source and find other changes that are needed in EclipseLink, I'd be interested in that.  I can get you the EclipseLink bug report link if your interested.