无法导入org.hibernate.session

时间:2014-06-12 12:56:01

标签: java hibernate jboss wildfly

我在我的eclipse中安装了wildfly 8.1,并希望将我的旧项目从jboss 4.2移到新的项目中。在WildFly 8上存在无法解析import org.hibernate.Session;的问题。 有人可以建议任何可能的解决方案吗?

1 个答案:

答案 0 :(得分:2)

WildFly class loading与JBoss 4.2相比有所不同。如果你想使用Hibernate,那么你需要明确依赖org.hibernate模块。

定义此方法的一种方法是通过Dependencies中的MAINFEST.MF条目:

Manifest-Version: 1.0
...
Dependencies: org.hibernate

可以找到相关参考部分here