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?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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.