2017-05-30 28 views
-3

我正在使用eclipse Mars來創建一個使用Hibernate和Jsp的動態Web應用程序。我得到一個錯誤註解使用jsp,hibernate,mysql和eclipse mars的web應用程序中的配置

An AnnotationConfiguration instance is required to use <mapping class="com.hibernate.bean.User"/> 
error 

這是我在程序中使用的代碼的link。請參考此鏈接查看代碼

任何人都可以解決我的問題嗎?

在此先感謝。

UPDATE

java.lang.NoSuchMethodError: org.objectweb.asm.ClassReader.accept(Lorg/objectweb/asm/ClassVisitor;I) 
(…) 
Caused by: java.lang.IllegalStateException: 
ContainerBase.addChild: 
start: LifecycleException: 
java.lang.NoSuchMethodError: org.objectweb.asm.ClassReader.accept(Lorg/objectweb/asm/ClassVisitor;I) 

現在我得到這些類型的異常

+0

Google是你的朋友:https://www.mkyong.com/hibernate/hibernate-error-an-annotationconfiguration-instance-is-required-to-use/ – Jens

+1

可能的重複[爲什麼我得到AnnotationConfiguration實例是AnnotationConfiguration被棄用時需要嗎?](https://stackoverflow.com/questions/19038907/why-am-i-getting-annotationconfiguration-instance-is-required-when-annotationcon) –

+0

這裏我沒有使用@ID或任何註釋,在上面的鏈接中,他們使用註釋 –

回答

0

的我錯過了添加jar文件休眠。現在我清除了所有例外。我從website得到了答案。

相關問題