无法导入org.hibernate.session [英] cannot import org.hibernate.session

查看:297
本文介绍了无法导入org.hibernate.session的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

解决方案

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

通过 MAINFEST.MF 中的 Dependencies code $:b
$ b $ $ p $ $ $ $ $ $ $

依赖关系:org。 hibernate

相关参考章节可以在 here


I installed wildfly 8.1 to my eclipse and wanted to move my old project from jboss 4.2 to new one. There is a problem that import org.hibernate.Session; cannot be resolwed on WildFly 8. can someone suggest any possible solutions?

解决方案

WildFly class loading is different comparing to JBoss 4.2. If you want to use Hibernate, than you'll need an explicit dependency on org.hibernate module.

One way of defining this is via a Dependencies entry in MAINFEST.MF:

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

Related reference section can be found here.

这篇关于无法导入org.hibernate.session的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆