Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-10470

Hibernate configuration is not able to use Hibernate Configuration File referenced in persistence.xml

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 3.3.0.Beta1
    • 3.3.0.M4
    • hibernate
    • None
    • Hide

      Just don't use Hibernate Configuration file field and instead define database connection below on Hibernate page directly in persistence.xml and it works

      Show
      Just don't use Hibernate Configuration file field and instead define database connection below on Hibernate page directly in persistence.xml and it works

    Description

      1. Create JPA Project
      2. Add JPA/Hibernate(4.0) libs
      3. Open persitence.xml
      4. On Hibernate page use Configuration file, create it
      5. Try to use Hibernate Console
      ERROR: org.hibernate.console.HibernateConsoleRuntimeException: Could not create JPA based Configuration
      Could not create JPA based Configuration
      <No message>
      java.lang.reflect.InvocationTargetException
      java.lang.reflect.InvocationTargetException: <no message>
      java.lang.reflect.InvocationTargetException
      javax.persistence.PersistenceException: [PersistenceUnit: jpahibernate40] Unable to configure EntityManagerFactory
      [PersistenceUnit: jpahibernate40] Unable to configure EntityManagerFactory
      org.hibernate.HibernateException: /jpahibernate40/src/hibernate.cfg.xml not found
      /jpahibernate40/src/hibernate.cfg.xml not found

      In persistence.xml is:
      <property name="hibernate.ejb.cfgfile" value="/jpahibernate40/src/hibernate.cfg.xml"/>

      Attachments

        Activity

          People

            dgeraskov Dmitry Geraskov (Inactive)
            jpeterka_jira Jiri Peterka (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: