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

Unable to generate entities for JPA 2.0 project when moving project from JPA 2.1 to JPA 2.0

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • 4.2.x, 4.3.x
    • 4.2.0.CR2
    • hibernate
    • None
    • 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

      <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 <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
    • -

    Description

      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

      Attachments

        Issue Links

          Activity

            People

              kaers@redhat.com Koen Aers
              jpeterka_jira Jiri Peterka (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: