本文介绍了Tomcat但不是Jetty:NoSuchMethodError:javax.persistence.JoinColumn.foreignKey()Ljavax / persistence / ForeignKey的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近将我的Wicket 6应用程序从Spring 3升级到Spring 4.



当我在Jetty 7上本地运行应用程序时,它运行良好。



当我将它部署到Tomcat 7时,出现以下错误:
$ b

这是一个Tomcat问题或者我应该继续尝试解决嵌套异常java.lang.NoSuchMethodError:javax.persistence.JoinColumn.foreignKey()?



如果问题是确实与外键,那么为什么这个问题不会发生在Jetty上?



spring.version 4.0.4.RELEASE



hibernate.version 4.3.5.Final

dataSource:class =org.apache.commons.dbcp.BasicDataSourcedestroy-method =close p>

解决方案

嵌套异常是java.lang.NoSuchMethodError:javax.persistence.JoinColumn.foreignKey()Ljavax / persistence / ForeignKey



发生此异常的javax.persistence.ForeignKey类存在冲突版本。检查你的classpath,如果你正在使用maven检查依赖关系。


I have recently upgraded my Wicket 6 application from Spring 3 to Spring 4.

When I run the application locally on Jetty 7, it runs fine.

When I deploy it to Tomcat 7, I get the following error:

Is this a Tomcat issue or should I just go ahead and try to solve the nested exception java.lang.NoSuchMethodError: javax.persistence.JoinColumn.foreignKey()?

If the issue is indeed with the foreignKey, then why does the problem not occur on Jetty?

spring.version 4.0.4.RELEASE

hibernate.version 4.3.5.Final

dataSource: class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"

解决方案

nested exception is java.lang.NoSuchMethodError: javax.persistence.JoinColumn.foreignKey()Ljavax/persistence/ForeignKey

This exception occurs of there are conflicting version of javax.persistence.ForeignKey class. Check your classpath and if you are using maven check the dependencies.

这篇关于Tomcat但不是Jetty:NoSuchMethodError:javax.persistence.JoinColumn.foreignKey()Ljavax / persistence / ForeignKey的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-11 11:34