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

Unable to generate entities when JPA 2.0 is used

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Blocker Blocker
    • 4.2.0.CR2
    • 4.2.0.CR2
    • hibernate
    • Hide

      STEP: Start JBDS and H2 db (https://github.com/maxandersen/sakila-h2)
      STEP: Create JPA 2.0. Project with Hibernate
      STEP: Convert to maven project
      STEP: Add dependencies (see pom file below)
      STEP: Project -> JPA Tools -> Generate Entities from Table
      ASSERT: Entities should be generated

      Pom file

      Pom 
      

      <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
      <modelVersion>4.0.0</modelVersion>
      <groupId>testjpa</groupId>
      <artifactId>testjpa</artifactId>
      <version>0.0.1-SNAPSHOT</version>
      <dependencies>
      <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-core</artifactId>
      <version>4.0.0.Final</version>
      </dependency>
      <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-entitymanager</artifactId>
      <version>4.0.0.Final</version>
      </dependency>
      <dependency>
      <groupId>org.hibernate.javax.persistence</groupId>
      <artifactId>hibernate-jpa-2.0-api</artifactId>
      <version>1.0.0.Final</version>
      </dependency>
      <dependency>
      <groupId>com.h2database</groupId>
      <artifactId>h2</artifactId>
      <version>1.3.161</version>
      </dependency>
      </dependencies>
      <build>
      <sourceDirectory>src</sourceDirectory>
      <resources>
      <resource>
      <directory>src</directory>
      <excludes>
      <exclude>*/.java</exclude>
      </excludes>
      </resource>
      </resources>
      <plugins>
      <plugin>
      <artifactId>maven-compiler-plugin</artifactId>
      <version>3.1</version>
      <configuration>
      <source>1.8</source>
      <target>1.8</target>
      </configuration>
      </plugin>
      </plugins>
      </build>
      </project>

      
      
      Show
      STEP: Start JBDS and H2 db ( https://github.com/maxandersen/sakila-h2 ) STEP: Create JPA 2.0. Project with Hibernate STEP: Convert to maven project STEP: Add dependencies (see pom file below) STEP: Project -> JPA Tools -> Generate Entities from Table ASSERT: Entities should be generated Pom file Pom <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd "> <modelVersion>4.0.0</modelVersion> <groupId>testjpa</groupId> <artifactId>testjpa</artifactId> <version>0.0.1-SNAPSHOT</version> <dependencies> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-core</artifactId> <version>4.0.0.Final</version> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-entitymanager</artifactId> <version>4.0.0.Final</version> </dependency> <dependency> <groupId>org.hibernate.javax.persistence</groupId> <artifactId>hibernate-jpa-2.0-api</artifactId> <version>1.0.0.Final</version> </dependency> <dependency> <groupId>com.h2database</groupId> <artifactId>h2</artifactId> <version>1.3.161</version> </dependency> </dependencies> <build> <sourceDirectory>src</sourceDirectory> <resources> <resource> <directory>src</directory> <excludes> <exclude>* / .java</exclude> </excludes> </resource> </resources> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <source>1.8</source> <target>1.8</target> </configuration> </plugin> </plugins> </build> </project>
    • Hide

      Use JPA 2.1 if you can

      Show
      Use JPA 2.1 if you can

      org.hibernate.console.HibernateConsoleRuntimeException: Received a NoClassDefFoundError, probably the console configuration classpath is incomplete or contains conflicting versions of the same class
      Received a NoClassDefFoundError, probably the console configuration classpath is incomplete or contains conflicting versions of the same class
      org.hibernate.console.HibernateConsoleRuntimeException: Received a NoClassDefFoundError, probably the console configuration classpath is incomplete or contains conflicting versions of the same class
      Received a NoClassDefFoundError, probably the console configuration classpath is incomplete or contains conflicting versions of the same class
      java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.tool.Version
      Could not initialize class org.hibernate.tool.Version

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

              Created:
              Updated:
              Resolved: