3 Replies Latest reply on Aug 18, 2015 8:12 AM by Max Rydahl Andersen

    Hibernate Configurations/HQL Editor Not Detecting JPA Configurations

    Ari King Newbie

      Hi,

       

      When I attempt to add a new hibernate configuration for my project that uses JPA 2.1 -- I get the error message: Project 'myproject' must be a JPA project

       

      The persistence.xml file contains the db connection properties (javax.persistence...), and while hibernate tools does NOT identify these properties it oddly identifies the persistence unit. Does anyone know how to resolve this?

       

      I'm using hibernate version 4.3.10.Final, hibernate tools 4.0.1.Final, with Eclipse Luna.

       

      Thanks.

        • 1. Re: Hibernate Configurations/HQL Editor Not Detecting JPA Configurations
          Max Rydahl Andersen Master

          Do you have JPA facet enabled on the project ?

           

          That said, I can't think of a reason why we should *require* your project to be JPA to create a console configuration so would be good to know a bit more about what steps you are specifically doing ?

          • 2. Re: Hibernate Configurations/HQL Editor Not Detecting JPA Configurations
            Ari King Newbie

            Do you have JPA facet enabled on the project ?

            No, JPA facet is not enabled on the project.

             

            That said, I can't think of a reason why we should *require* your project to be JPA to create a console configuration so would be good to know a bit more about what steps you are specifically doing ?

            Let me clarify, hibernate tool does not *require* my project to be JPA to create a console configuration -- it does give me the option of using hibernate configuration(s). With that explained, since my project is JPA based I thought it would be easiest/best to use the JPA configurations to setup the console configuration/HQL editor.

             

            In the configuration window, under the "Main" tab, I select "type" of JPA (jdk 1.5+), hibernate version 4.3, my project path, and JPA configured connection, and lastly the persistence unit I want to work with. The combination of these choices results in the error: Project 'myproject' must be a JPA project.

            • 3. Re: Hibernate Configurations/HQL Editor Not Detecting JPA Configurations
              Max Rydahl Andersen Master

              Does it work if you go and enable JPA facet on the project ?

               

              Can you open a jira with this, it definitely does not sound right we should *require* JPA facet on this - if there is a reason the error message should at least explain why/how.