org.hibernate.console.HibernateConsoleRuntimeException: Could not create JPA based Configuration

Hibernate JIRA | Donatas Ciuksys | 9 years ago
  1. 0

    [HBX-1032] HibernateConsoleRuntimeException: "Could not load JPA Configuration" for JavaSE JPA project - Hibernate JIRA

    atlassian.net | 8 months ago
    org.hibernate.console.HibernateConsoleRuntimeException: Could not create JPA based Configuration
  2. 0

    I have Java SE (not EE) project in Eclipse with standard structure like: /src /META-INF/persistence.xml /bin ... I try to create new Hibernate Configuration in "Hibernate Configurations" pannel. I choose project, select JPA (jdk 1.5+) option, fill in persistence unit "InventorizacijaPU", check whether Classpath tab is OK (it contains my project). Press OK. Trying to expand configuration created, I get this exception: org.hibernate.console.HibernateConsoleRuntimeException: Could not create JPA based Configuration at org.hibernate.console.ConsoleConfiguration.buildJPAConfiguration(ConsoleConfiguration.java:142) at org.hibernate.console.ConsoleConfiguration.buildConfiguration(ConsoleConfiguration.java:496) at org.hibernate.console.ConsoleConfiguration.access$0(ConsoleConfiguration.java:484) at org.hibernate.console.ConsoleConfiguration$2.execute(ConsoleConfiguration.java:203) at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:65) at org.hibernate.console.ConsoleConfiguration.buildWith(ConsoleConfiguration.java:185) at org.hibernate.console.ConsoleConfiguration.build(ConsoleConfiguration.java:106) at org.hibernate.eclipse.console.workbench.ConsoleConfigurationWorkbenchAdapter.getChildren(ConsoleConfigurationWorkbenchAdapter.java:38) at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.getChildren(BasicWorkbenchAdapter.java:97) at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:103) at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:196) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Caused by: org.hibernate.console.HibernateConsoleRuntimeException: Persistence unit not found: 'InventorizacijaPU'. at org.hibernate.console.ConsoleConfiguration.buildJPAConfiguration(ConsoleConfiguration.java:134) ... 11 more This is my persistence.xml: <?xml version="1.0" encoding="UTF-8"?> <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"> <persistence-unit name="InventorizacijaPU" transaction-type="RESOURCE_LOCAL"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <class>lt.mitsoft.inventorizacija.domain.BuvimoVieta</class> <class>lt.mitsoft.inventorizacija.domain.Inventorizacija</class> <class>lt.mitsoft.inventorizacija.domain.Irasas</class> <class>lt.mitsoft.inventorizacija.domain.IrasuBlokas</class> <class>lt.mitsoft.inventorizacija.domain.Preke</class> <class>lt.mitsoft.inventorizacija.domain.Skanuotojas</class> <properties> <property name="hibernate.dialect" value="org.hibernate.dialect.DerbyDialect" /> <!-- <property name="hibernate.connection.url" value="jdbc:derby:InventorizacijaDB" /> --> <property name="hibernate.connection.url" value="jdbc:derby://localhost:1527/InventorizacijaDB" /> <!-- <property name="hibernate.connection.driver_class" value="org.apache.derby.jdbc.EmbeddedDriver"/> --> <property name="hibernate.connection.driver_class" value="org.apache.derby.jdbc.ClientDriver" /> <property name="hibernate.connection.username" value="admin" /> <property name="hibernate.connection.password" value="admin" /> <property name="hibernate.cache.provider_class" value="org.hibernate.cache.NoCacheProvider" /> <!-- <property name="hibernate.show_sql" value="true" /> --> </properties> </persistence-unit> </persistence>

    Hibernate JIRA | 9 years ago | Donatas Ciuksys
    org.hibernate.console.HibernateConsoleRuntimeException: Could not create JPA based Configuration
  3. 0

    I have Java SE (not EE) project in Eclipse with standard structure like: /src /META-INF/persistence.xml /bin ... I try to create new Hibernate Configuration in "Hibernate Configurations" pannel. I choose project, select JPA (jdk 1.5+) option, fill in persistence unit "InventorizacijaPU", check whether Classpath tab is OK (it contains my project). Press OK. Trying to expand configuration created, I get this exception: org.hibernate.console.HibernateConsoleRuntimeException: Could not create JPA based Configuration at org.hibernate.console.ConsoleConfiguration.buildJPAConfiguration(ConsoleConfiguration.java:142) at org.hibernate.console.ConsoleConfiguration.buildConfiguration(ConsoleConfiguration.java:496) at org.hibernate.console.ConsoleConfiguration.access$0(ConsoleConfiguration.java:484) at org.hibernate.console.ConsoleConfiguration$2.execute(ConsoleConfiguration.java:203) at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:65) at org.hibernate.console.ConsoleConfiguration.buildWith(ConsoleConfiguration.java:185) at org.hibernate.console.ConsoleConfiguration.build(ConsoleConfiguration.java:106) at org.hibernate.eclipse.console.workbench.ConsoleConfigurationWorkbenchAdapter.getChildren(ConsoleConfigurationWorkbenchAdapter.java:38) at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.getChildren(BasicWorkbenchAdapter.java:97) at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:103) at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:196) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Caused by: org.hibernate.console.HibernateConsoleRuntimeException: Persistence unit not found: 'InventorizacijaPU'. at org.hibernate.console.ConsoleConfiguration.buildJPAConfiguration(ConsoleConfiguration.java:134) ... 11 more This is my persistence.xml: <?xml version="1.0" encoding="UTF-8"?> <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"> <persistence-unit name="InventorizacijaPU" transaction-type="RESOURCE_LOCAL"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <class>lt.mitsoft.inventorizacija.domain.BuvimoVieta</class> <class>lt.mitsoft.inventorizacija.domain.Inventorizacija</class> <class>lt.mitsoft.inventorizacija.domain.Irasas</class> <class>lt.mitsoft.inventorizacija.domain.IrasuBlokas</class> <class>lt.mitsoft.inventorizacija.domain.Preke</class> <class>lt.mitsoft.inventorizacija.domain.Skanuotojas</class> <properties> <property name="hibernate.dialect" value="org.hibernate.dialect.DerbyDialect" /> <!-- <property name="hibernate.connection.url" value="jdbc:derby:InventorizacijaDB" /> --> <property name="hibernate.connection.url" value="jdbc:derby://localhost:1527/InventorizacijaDB" /> <!-- <property name="hibernate.connection.driver_class" value="org.apache.derby.jdbc.EmbeddedDriver"/> --> <property name="hibernate.connection.driver_class" value="org.apache.derby.jdbc.ClientDriver" /> <property name="hibernate.connection.username" value="admin" /> <property name="hibernate.connection.password" value="admin" /> <property name="hibernate.cache.provider_class" value="org.hibernate.cache.NoCacheProvider" /> <!-- <property name="hibernate.show_sql" value="true" /> --> </properties> </persistence-unit> </persistence>

    Hibernate JIRA | 9 years ago | Donatas Ciuksys
    org.hibernate.console.HibernateConsoleRuntimeException: Could not create JPA based Configuration
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [JBoss Tools (users)] - Re: Hibernate Configurations problem

    narkive.com | 8 months ago
    org.hibernate.console.HibernateConsoleRuntimeException: Persistence unit not found: 'boBETS'.
  6. 0

    Hibernate Configurations problem | JBoss Developer

    jboss.org | 8 months ago
    org.hibernate.console.HibernateConsoleRuntimeException: Persistence unit not found: 'null'.

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.hibernate.console.HibernateConsoleRuntimeException

      Persistence unit not found: 'InventorizacijaPU'.

      at org.hibernate.console.ConsoleConfiguration.buildJPAConfiguration()
    2. org.hibernate.console
      ConsoleConfiguration.build
      1. org.hibernate.console.ConsoleConfiguration.buildJPAConfiguration(ConsoleConfiguration.java:134)
      2. org.hibernate.console.ConsoleConfiguration.buildConfiguration(ConsoleConfiguration.java:496)
      3. org.hibernate.console.ConsoleConfiguration.access$0(ConsoleConfiguration.java:484)
      4. org.hibernate.console.ConsoleConfiguration$2.execute(ConsoleConfiguration.java:203)
      5. org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:65)
      6. org.hibernate.console.ConsoleConfiguration.buildWith(ConsoleConfiguration.java:185)
      7. org.hibernate.console.ConsoleConfiguration.build(ConsoleConfiguration.java:106)
      7 frames
    3. org.hibernate.eclipse
      BasicWorkbenchAdapter.fetchDeferredChildren
      1. org.hibernate.eclipse.console.workbench.ConsoleConfigurationWorkbenchAdapter.getChildren(ConsoleConfigurationWorkbenchAdapter.java:38)
      2. org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.getChildren(BasicWorkbenchAdapter.java:97)
      3. org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:103)
      3 frames
    4. Workbench
      DeferredTreeContentManager$1.run
      1. org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:196)
      1 frame
    5. Eclipse Jobs
      Worker.run
      1. org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
      1 frame