【发布时间】:2016-08-18 02:03:30
【问题描述】:
当我尝试使用现有的数据库关系通过 Hibernate 生成一些类时,它会产生一些错误:
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
我的 Maven 文件:
<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>
我在 Maven 依赖项中看到了 apache common-collections jar,我可以在我的代码中使用 apache 的 MultiMap。
【问题讨论】:
-
也许系统库有什么地方可以让 Eclipse 的 Hibernate 插件查找像 apache-common-collections 这样的 jars 吗?
-
问题报告hibernate.atlassian.net/browse/HBX-1256 ...等待zzzZZzzZZzz
-
现在好像解决了。我已经从 jboss mars 存储库重新安装了 Hibernate Tools,并且神奇地工作了! ;)
-
确认。为我工作。谢谢。
-
我遇到了同样的问题,重新安装并没有解决这个问题。
标签: java apache hibernate maven jpa