Configuring Hibernate in Eclipse Indigo

亡梦爱人 提交于 2019-12-11 17:54:48

问题


I am working on a web based project.

When I startup my tomcat server it redirects to an Login HTML page. On click of a login link a JSP Page is called. All the validation is done in the JSP page. Here Hibernate is used to interact with the database.

Problem:

On click of the login link, a ClassNotFoundException for the class MetadataProvider and ReflectionManager is thrown. Both the classes belong to the hibernate-annotations-common jar.

I have tried installing hibernate by updating my eclipse, by manually downloading the jar files and adding it to the web-inf/lib folder but still the same exception pops up.

Has it got anything to do with eclipse indigo 64 bit/windows 7 64 bit/tomcat 7? I found out previously that the eclipse is different for 32 bit and 64 bit. Is it the same for hibernate?


Added all the jars to the run configurations of the project and to my surprise it worked. I was of the opinion that the jars are pickup from the web-inf library. But I removed all the jars from there and added it on the run configurations and it works.

In the precious application I worked the jars were there in the web-inf lib folder and the run configurations had only the tomcat jars and it still worked. How was that possible?

来源:https://stackoverflow.com/questions/10598504/configuring-hibernate-in-eclipse-indigo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!