首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2EE开发 >

hibernate annotation 有关问题

2012-09-28 
hibernate annotation 问题我原先加的是这三个包 [b] hibernate-annotations.jar,hibernate-commons-anno

hibernate annotation 问题
我原先加的是这三个包 [b]" hibernate-annotations.jar,hibernate-commons-annotations.jar,ejb3-persistence.jar"(hibernate-ejb3-persistence.jar我也试过),现在换成了"hibernate-annotations.jar,hibernate-commons-annotations.jar,hibernate-entitymanager.jar"三个包,依旧是我一输入@Entity(或是其他)都是出现"Syntax error, annotations are only available if source level is 1.5"(我的jdk是1.6,编译器也),而我原先可以运行成功的hibernate程序一旦我加入了这上面的不同的jar包后都是出现了"Exception in thread "main" org.hibernate.AnnotationException: java.lang.NoSuchMethodException: org"异常..我也在网上找了很久,也没有见什么相似或是可以解决的方法,初学者,诸多不会,望前辈们可以耐心点,多多指教

[解决办法]

探讨
我用的是 hibernate-distribution-3.6.1.Final 里面的jar,前面的包你说的包我也导进去了,,怎么还是会还有 Syntax error, annotations are only available if source level is 1.5 问题呢

热点排行
Bad Request.