java - Tomcat启动时Hibernate异常(升级到hibernate-3.5.0后)

标签 java hibernate tomcat annotations upgrade

升级到 Hibernate 3.5.0 后,使用我的 Web 应用程序启动 Tomcat 实例时出现以下异常:

org.hibernate.annotations.common.AssertionFailure: Fail to process type argument in a generic declaration. Type: class sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl
 at org.hibernate.ejb.metamodel.AttributeFactory$PluralAttributeMetadataImpl.getClassFromGenericArgument(AttributeFactory.java:836)
 at org.hibernate.ejb.metamodel.AttributeFactory$PluralAttributeMetadataImpl.getClassFromGenericArgument(AttributeFactory.java:833)
 at org.hibernate.ejb.metamodel.AttributeFactory$PluralAttributeMetadataImpl.<init>(AttributeFactory.java:748)
 at org.hibernate.ejb.metamodel.AttributeFactory$PluralAttributeMetadataImpl.<init>(AttributeFactory.java:723)
 at org.hibernate.ejb.metamodel.AttributeFactory.determineAttributeMetadata(AttributeFactory.java:518)
 at org.hibernate.ejb.metamodel.AttributeFactory.buildAttribute(AttributeFactory.java:93)

因为这发生在 Tomcat 启动时,我不知道在哪里查看我的代码来防止这种情况 :-(

最佳答案

将该错误消息放入 google 会向您显示任何数量的解释,包括这个 JIRA 问题:

http://opensource.atlassian.com/projects/hibernate/browse/HHH-5098

关于java - Tomcat启动时Hibernate异常(升级到hibernate-3.5.0后),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3054522/

相关文章:

java - 如何将从控制台添加的字符串中的元素添加到java中的列表中

java - Gson:将 double 值格式化为小数点后 4 位

java - Spring 中的 ResponseEntity 和 HttpEntity 有什么区别?

authentication - 使用 Tomcat 实现自定义身份验证

tomcat - 了解 Tomcat 中的 servlet 路径扩展

java - 通过计算数组结果来做到这一点是明智的方法吗?

java - 为什么 Hibernate 在使用 @Fetch(FetchMode.JOIN) 时执行多个 SELECT 查询而不是一个

java - 如何使用 Spring+Hibernate 将实体持久化到两个不同的表

hibernate - 使用maven更新c3p0

eclipse - 更改了 Tomcat 中的 JSF 实现。从 Mojarra 到 MyFaces。托管 Bean 不起作用