Ich需要使用Hibernate 4.3.5。但是我的Jboss提供了Hibernate 4.0.1,我不需要它。我像这样配置了我的pom.xml:
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<scope>compile</scope>
<version>4.3.5.Final</version>
<exclusions>
<exclusion>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<artifactId>hibernate-core</artifactId>
<groupId>org.hibernate</groupId>
<scope>compile</scope>
<version>4.3.5.Final</version>
<exclusions>
<exclusion>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-search</artifactId>
<version>5.0.0.Alpha3</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.hibernate.common</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
<version>4.0.4.Final</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-search</artifactId>
<version>5.0.0.Alpha3</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>5.1.0.Final</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.1.0.Final</version>
<scope>compile</scope>
</dependency>
但是我注意到我的jboss仍然部署了Hibernate 4.0.1。如果我在Eclipse中检查我的依赖项,Eclipse告诉我:Hibernate-core:4.3.5 Final [compile] managed:4.2.0 CR1。这里“管理”是什么意思?如何配置我使用最新的Hibernate版本部署的jboss?
谢谢!
答案 0 :(得分:1)
您可能必须更新jboss 7服务器安装中的相应模块。 备份当前的hibernate模块后,将从hibernate站点下载的相关模块复制到/ modules / org / hibernate / ...下的相应位置,然后编辑它们指向新的hibernate jar的相应module.xml文件。 / p>