I get a noclassdeffounderror when trying to create pojos or map using sleep mode tools

I try to generate pojos from my database, but I get the following errors: eclipse indigo 3.7.2 with installed plugins 3.4.3, as well as dormant access to libraries 3.6.10 (seems to be all) in my assembly path

SHORT VERSION:

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.cfg.reveng.OverrideRepository Could not initialize class org.hibernate.cfg.reveng.OverrideRepository java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.cfg.reveng.OverrideRepository Could not initialize class org.hibernate.cfg.reveng.OverrideRepository 

My jars are from the project building path (if that matters):

  • hibernate-distribution-3.6.10.Final \ hibernate3.jar
  • hibernate-distribution-3.6.10.Final \ Lib \ required \ ANTLR-2.7.6.jar
  • hibernate-distribution-3.6.10.Final \ Lib \ required \ Wikimedia Commons-3.1.jar
  • hibernate-distribution-3.6.10.Final \ Lib \ required \ dom4j-1.6.1.jar
  • hibernate-distribution-3.6.10.Final \ Lib \ required \ Javassist-3.12.0.GA.jar
  • hibernate-distribution-3.6.10.Final \ Lib \ required \ JTA-1.1.jar
  • hibernate-distribution-3.6.10.Final \ Lib \ required \ SLF4J-api-1.6.1.jar
  • PostgreSQL-9.0-802.jdbc3.jar

I noticed that in the plugin for sleep mode there are several old cans in the folder with BTW plugins (slf4j, for example, version 1.5.8) In the meantime, I will try friendship

NORMAL STACKTRACE

 ENTRY org.hibernate.eclipse.console 4 666 2012-06-25 04:23:55.946 !MESSAGE org.hibernate.console.HibernateConsoleRuntimeException: Received a NoClassDefFoundError, probably the console configuration classpath is incomplete or contains conflicting versions of the same class !STACK 0 org.hibernate.console.HibernateConsoleRuntimeException: Received a NoClassDefFoundError, probably the console configuration classpath is incomplete or contains conflicting versions of the same class at org.jboss.tools.hibernate3_6.console.ConsoleExtension3_6.launchExporters(ConsoleExtension3_6.java:149) at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.launch(CodeGenerationLaunchDelegate.java:270) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:854) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:703) at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:928) at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1132) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.cfg.reveng.OverrideRepository at org.jboss.tools.hibernate3_6.console.ConsoleExtension3_6$3.execute(ConsoleExtension3_6.java:249) at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:63) at org.jboss.tools.hibernate3_6.HibernateExtension3_6.execute(HibernateExtension3_6.java:201) at org.jboss.tools.hibernate3_6.console.ConsoleExtension3_6.buildConfiguration(ConsoleExtension3_6.java:239) at org.jboss.tools.hibernate3_6.console.ConsoleExtension3_6.runExporters(ConsoleExtension3_6.java:169) at org.jboss.tools.hibernate3_6.console.ConsoleExtension3_6.launchExporters(ConsoleExtension3_6.java:126) ... 6 more !SUBENTRY 1 org.hibernate.eclipse.console 4 666 2012-06-25 04:23:55.946 !MESSAGE org.hibernate.console.HibernateConsoleRuntimeException: Received a NoClassDefFoundError, probably the console configuration classpath is incomplete or contains conflicting versions of the same class !STACK 0 org.hibernate.console.HibernateConsoleRuntimeException: Received a NoClassDefFoundError, probably the console configuration classpath is incomplete or contains conflicting versions of the same class at org.jboss.tools.hibernate3_6.console.ConsoleExtension3_6.launchExporters(ConsoleExtension3_6.java:149) at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.launch(CodeGenerationLaunchDelegate.java:270) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:854) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:703) at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:928) at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1132) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.cfg.reveng.OverrideRepository at org.jboss.tools.hibernate3_6.console.ConsoleExtension3_6$3.execute(ConsoleExtension3_6.java:249) at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:63) at org.jboss.tools.hibernate3_6.HibernateExtension3_6.execute(HibernateExtension3_6.java:201) at org.jboss.tools.hibernate3_6.console.ConsoleExtension3_6.buildConfiguration(ConsoleExtension3_6.java:239) at org.jboss.tools.hibernate3_6.console.ConsoleExtension3_6.runExporters(ConsoleExtension3_6.java:169) at org.jboss.tools.hibernate3_6.console.ConsoleExtension3_6.launchExporters(ConsoleExtension3_6.java:126) ... 6 more !SUBENTRY 1 org.hibernate.eclipse.console 4 666 2012-06-25 04:23:55.946 !MESSAGE java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.cfg.reveng.OverrideRepository !STACK 0 java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.cfg.reveng.OverrideRepository at org.jboss.tools.hibernate3_6.console.ConsoleExtension3_6$3.execute(ConsoleExtension3_6.java:249) at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:63) at org.jboss.tools.hibernate3_6.HibernateExtension3_6.execute(HibernateExtension3_6.java:201) at org.jboss.tools.hibernate3_6.console.ConsoleExtension3_6.buildConfiguration(ConsoleExtension3_6.java:239) at org.jboss.tools.hibernate3_6.console.ConsoleExtension3_6.runExporters(ConsoleExtension3_6.java:169) at org.jboss.tools.hibernate3_6.console.ConsoleExtension3_6.launchExporters(ConsoleExtension3_6.java:126) at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.launch(CodeGenerationLaunchDelegate.java:270) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:854) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:703) at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:928) at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1132) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) 

The first time I tried to use code generation, I got something like this:

 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: org/objectweb/asm/Type org/objectweb/asm/Type java.lang.NoClassDefFoundError: org/objectweb/asm/Type org/objectweb/asm/Type java.lang.ClassNotFoundException: org.objectweb.asm.Type org.objectweb.asm.Type 

After that, I received only [...]cfg.reveng.OverrideRepository error .

+4
source share
3 answers

After a lot of suffering with NoclassDefFoundError for Hours, I finally found a solution.

The main attention: the libraries of the hibernate version must match the selected configuration of the Hibernate console (point 3).

Checklist:

  • Make sure you download the latest version of the Hibernate plugin (which matches your version of eclipse). To do this, go to Help-> Eclipse Marketplace-> type: hibernate (name of the eclipse version, for example, luna). Select the latest JBoss tools and for minimal functionality select Hibernate and JBoss Maven Hibernate Configurator.

  • Download the latest jar files from http://hibernate.org/orm/downloads/ . Store these files in a folder that is in your build path.

  • When creating your Hibernate console configuration, make sure you select the latest Hibernate Version from the drop-down list. For example, In my case, when I had a Hibernate 4.x jar file in the build path, choosing version 4.3. solved the problem.

Try changing the versions of Hibernate from the console configuration drop-down list. This can solve the problem.

+6
source

Correct answer: https://community.jboss.org/thread/201634?tstart=0
If someone has something to add, please take a moment and do it, just like me.

thanks

And BTW I can’t believe that anyone from the community has ever encountered this error / problem

+3
source

I also ran into this problem while working on a sleeping reverse engineer, and I experienced almost 3 days, but I finally got a solution.

  • To work with reverse hibernate engineering, you do not need to explicitly add jarernate-jar, as it comes with hibernation plugins, only you need to add jdbc-jar for the corresponding database.

  • After creating the project, you select the hibernation option in the eclipse perspective, and then select File => New =>Hibernate Console Configuration

  • Here you need to configure the hibernate console configuration in which you have a " hibernate version ", make sure that any version you select here you must select when creating the hibernate configuration file , which is nothing more than hibernate.cfg. xml , if you do the same, you will not get this error:

org.hibernate.console.HibernateConsoleRuntimeException: received NoClassDefFoundError, perhaps the console configuration configuration pool is incomplete or contains conflicting versions of the same class

-2
source

All Articles