2

I recently updated an app i'm working on from glassfish 3.1.2 to glassfish 4.0, and in the process updated my hibernate to 4.3.5.

after getting everything together, when i try to actually deploy my app and hit the front page, on the first database requests, i get errors like this:

WARNING: StandardWrapperValve[Jersey Web Application]: Servlet.service() for servlet Jersey Web Application threw exception
java.lang.NoSuchMethodError: com.fasterxml.classmate.TypeResolver.resolve(Ljava/lang/reflect/Type;[Ljava/lang/reflect/Type;)Lcom/fasterxml/classmate/ResolvedType;

I looked this error up on google and am unable to find anyone with a similar problem, and i'm wondering if i am doing something wrong with my annotations? I am using entity manager, and persistence methods to annotate Entity beans as my method of db access, and it was working fine before the upgrade. Unfortunatey, the documentation for fasterxml.classmate seems to have moved or disappeared, and i don't know if there is something i'm supposed to be doing to enable it to work properly. Alternately, there may be something i need to change in the way things are set up that i'm unaware of....

Any help appreciated....has anyone seen something like this before?

4

2 回答 2

3

我有类似的问题。在我的情况下,解决方案是将 classmate-1.0.0.jar 添加到类路径中。以前我有 0.5.3 版本,但还不够。

于 2015-02-17T21:01:16.400 回答
1

所以显然我已经在我的项目中包含了hibernate的验证器jar,虽然我已经删除了它,但在eclipse中执行“清理”未能从部署目录中删除jar。由于我没有以任何方式设置验证,当我移除 jar 时,它导致我停止收到此错误。我不确定一个解决方案对其他人来说有多棒,但它解决了我的问题,所以我在这里包括了答案。

于 2014-05-28T04:13:01.620 回答