Hibernate MultiMap could not be found during code generation

While I'm trying to generate some classes on Hibernate using the existing db relation, it generates some error:

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: org/apache/commons/collections/MultiMap org/apache/commons/collections/MultiMap java.lang.ClassNotFoundException: org.apache.commons.collections.MultiMap cannot be found by org.jboss.tools.hibernate.runtime.v_5_1_5.0.1.Final-v20160331-1852-B88 org.apache.commons.collections.MultiMap cannot be found byorg.jboss.tools.hibernate.runtime.v_5_1_5.0.1.Final-v20160331-1852-B88 

My maven file:

 <build> <sourceDirectory>src</sourceDirectory> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>3.3</version> <configuration> <source>1.8</source> <target>1.8</target> </configuration> </plugin> </plugins> </build> <dependencies> <dependency> <groupId>org.firebirdsql.jdbc</groupId> <artifactId>jaybird-jdk18</artifactId> <version>2.2.10</version> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-core</artifactId> <version>5.1.0.Final</version> </dependency> <dependency> <groupId>commons-collections</groupId> <artifactId>commons-collections</artifactId> <version>3.2.2</version> </dependency> 

I see a collection of general apache collections in Maven Dependencies, and I can use apache MultiMap in my code.

+5
source share
2 answers

I had the same problem. Here's how I fixed it: Open the "Edit Configuration" dialog box and go to the "Class Path" tab, delete the project name (default path), click the "Add Projects ..." button to add the project. Then it works.

Or you can try using the previous version instead of v5.1. In hibernation mode “configuration” / “Change configuration”, change the version of hibernation mode to a previous version, for example v4.3.

+2
source

Just to listen: Eclipse Mars. Hibernate 5.1.0. JDK 8. As Gordon and Kevin mentioned, changing the version of Hibernate to 4.3 in configuration edit mode worked for me.

0
source

Source: https://habr.com/ru/post/1247830/


All Articles