0 Replies Latest reply on Jul 19, 2010 3:33 PM by Betsy Barker

    JBOSS 6 M3 PersistenceUnit fail due to ClassCastException

    Betsy Barker Newbie

      Our company is currently evaluating using JBoss 6 for our new SOA development. However, I am unable to communicate with the database due to the following error:

       

      DEPLOYMENTS IN ERROR:
        Deployment "persistence.unit:unitName=myapp.ear/myEJB-standalone.jar#free_radius" is in error due to the following reason(s): java.lang.ClassCastException: oracle.toplink.essentials.PersistenceProvider cannot be cast to javax.persistence.spi.PersistenceProvider

       

      I have been working on this problem for several days. First I was getting a CNFE, but found out the class was being blacklisted because there were some spaces in my persistence.xml file. Fixed that after several days of trying to figure out how classes were getting blacklisted.

       

      Now both classes are there, both javax.persistence.spi.PersistenceProvider and oracle.toplink.essentials.PersistenceProvider are contained in the toplink-essentials.jar and I have verified both have been loaded using the jmx-console.

       

      Someone please help, because I am all out of ideas on how to solve this problem, and I am unable to go any further with my evaluation.

       

      Thank you,

      Betsy