3 Replies Latest reply on Mar 13, 2015 2:52 AM by Koen Aers

    How can I resolve a class cast exception when opening the persistence.xml editor

    Bruce Lombardi Newbie

      I just installed Eclipse Luna - specifically

      Version: Luna Service Release 2 (4.4.2)

      Build id: 20150219-0600


      I also just installed JBoss Tolls version 4.2.2.Final form the eclipse marketplace.


      When I try to open a persistence.xml file I get the following error:


      java.lang.ClassCastException: org.jboss.tools.hibernate.jpt.ui.internal.persistence.details.HibernatePersistenceXmlUiDefinition cannot be cast to org.eclipse.jpt.jpa.ui.PersistenceResourceUiDefinition


      If I uninstall the JBoss Tools the error goes away, but then I don't have the enhanced editing capability provided by JBoss Tools.


      Is there any way to fix this?


      Message was edited by: Bruce Lombardi In response to several posts, I have added a StackTrace, ScreenShot and zip of small Eclipse project. And I corrected the version to 4.2.2.Final. Note - The stack trace is from the original project, which I can't attache for many reasons. In the small project, the file does open without the stack trace, but only to a single pane editor (see screen shot).