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

Could not create JPA based configuration when hibernate configuration is referenced in persistence.xml as absolute path

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Critical Critical
    • 3.3.0.Beta3
    • 3.3.0.Beta3
    • hibernate
    • None
    • Hide

      EXECUTE: Have general project with hibernate configuration inside
      EXECUTE: Create JPA project (Hibernate JPA 2.x)
      EXECUTE: In persitence.xml reference hibernate cfg file from another project, absolute path is set
      EXECUTE: Rebuild hibernate console configuration
      EXECUTE: Try to expand console configuration
      ERROR: org.hibernate.console.HibernateConsoleRuntimeException: Could not create JPA based Configuration

      Show
      EXECUTE: Have general project with hibernate configuration inside EXECUTE: Create JPA project (Hibernate JPA 2.x) EXECUTE: In persitence.xml reference hibernate cfg file from another project, absolute path is set EXECUTE: Rebuild hibernate console configuration EXECUTE: Try to expand console configuration ERROR: org.hibernate.console.HibernateConsoleRuntimeException: Could not create JPA based Configuration

      org.hibernate.console.HibernateConsoleRuntimeException: Could not create JPA based Configuration
      at org.hibernate.console.ConfigurationFactory.buildJPAConfiguration(ConfigurationFactory.java:245)
      at org.hibernate.console.ConfigurationFactory.buildConfiguration(ConfigurationFactory.java:174)
      at org.hibernate.console.ConfigurationFactory.createConfiguration(ConfigurationFactory.java:96)
      at org.hibernate.console.ConsoleConfiguration$3.execute(ConsoleConfiguration.java:240)
      at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:63)
      at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:107)
      at org.hibernate.console.ConsoleConfiguration.buildWith(ConsoleConfiguration.java:237)
      at org.hibernate.console.ConsoleConfiguration.build(ConsoleConfiguration.java:188)
      at org.hibernate.eclipse.console.workbench.ConsoleConfigurationWorkbenchAdapter.getChildren(ConsoleConfigurationWorkbenchAdapter.java:39)
      at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.getChildren(BasicWorkbenchAdapter.java:100)
      at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:106)
      at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:235)
      at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
      Caused by: java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.hibernate.console.ConfigurationFactory.buildJPAConfiguration(ConfigurationFactory.java:231)
      ... 12 more
      Caused by: javax.persistence.PersistenceException: [PersistenceUnit: unifieddb-jpa] Unable to configure EntityManagerFactory
      at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:376)
      ... 17 more
      Caused by: org.hibernate.HibernateException: /home/jpeterka/workspace/prj/unifieddb/hibernatelib/cfg/hibernate-localhost.cfg.xml not found
      at org.hibernate.util.ConfigHelper.getResourceAsStream(ConfigHelper.java:170)
      at org.hibernate.cfg.Configuration.getConfigurationInputStream(Configuration.java:1497)
      at org.hibernate.cfg.Configuration.configure(Configuration.java:1519)
      at org.hibernate.cfg.AnnotationConfiguration.configure(AnnotationConfiguration.java:1194)
      at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:985)
      at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:280)
      at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:364)
      ... 17 more

        1. jpa-hb-conf1.png
          97 kB
          Jiri Peterka
        2. jpa-hb-conf2.png
          22 kB
          Jiri Peterka
        3. jpa-hb-conf3.png
          24 kB
          Jiri Peterka

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

                Created:
                Updated:
                Resolved: