简体   繁体   English

使用Maven配置休眠模式时出错-Eclipse中的Restful Webservices项目。

[英]Error while configuring hibernate with a maven - restful webservices project in eclipse.

I am new to maven and I have trouble setting up the required project environment. 我是Maven新手,无法设置所需的项目环境。 I created a maven project in eclipse and used jersey for restful web services. 我在eclipse中创建了一个maven项目,并使用jersey提供了宁静的Web服务。 I am not sure how to add the hibernate dependency. 我不确定如何添加休眠依赖项。 I added the required hibernate jars as a user library, but when I run to run my application, I get this error 我将所需的休眠jar添加为用户库,但是当我运行以运行我的应用程序时,出现此错误

MultiException stack 1 of 2 java.lang.NoClassDefFoundError: org/hibernate/cfg/Configuration MultiException stack 2 of 2 java.lang.IllegalStateException: Unable to perform operation: create on org.pro.resource.ExitReasonsResource MultiException堆栈2 of 1 java.lang.NoClassDefFoundError:org / hibernate / cfg / Configuration MultiException堆栈2 of 2 java.lang.IllegalStateException:无法执行操作:在org.pro.resource.ExitReasonsResource上创建

Try to right click on the project name and use the maven menu to "update project dependencies". 尝试右键单击项目名称,然后使用Maven菜单“更新项目依赖项”。 This might be a quick and easy fix. 这可能是一种快速简便的修复方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM