Caused by: java.lang.NoSuchMethodError: javax.persistence.JoinColumn.foreignKey()Ljavax/persistence/

Caused by: Java.lang.NoSuchMethodError: javax.persistence.JoinColumn.foreignKey()Ljavax/persistence/ForeignKey;

报错原因:

myeclipse中

JAVAEE6.0中的  javax.persistence.jar与 hibernate中的hibernate-jpa-2.1-api-1.0.0.Final.jar冲突

而我采取的措施是删除了JAVAEE6.0的库,运行就正常了,然后在加进来有正常了 。

我用eclipse可以的代码放到myeclipse就报错,非常感谢

时间: 2024-10-13 20:47:42

Caused by: java.lang.NoSuchMethodError: javax.persistence.JoinColumn.foreignKey()Ljavax/persistence/的相关文章

异常:Caused by: java.lang.NoSuchMethodError: javax.persistence.OneToMany.orphanRemoval()Z/Caused by: java.lang.NoSuchMethodError: javax.persistence.JoinColumn.foreign

Spring3.0 + Hibernate3.5:启动服务器报:Caused by: java.lang.NoSuchMethodError: javax.persistence.OneToMany.orphanRemoval()Z 在hibernate3.5之前,我们运用hibernate开发J2EE项目通常会引以下几个jar包:hibernate核心包:hibernate3.jar持久化:ejb3-persistence.jar则javax.persistence.OneToMany.cla

Caused by: java.lang.NoSuchMethodError: javax.persistence.spi.PersistenceUnitInfo.getValidationMode

进行 spring mvc jpa整合时.Junit方法测试时. 异常: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested excep

异常:Caused by: java.lang.NoSuchMethodError: javax.persistence.OneToMany.orphanRemoval()Z

Spring3.0 + Hibernate3.5:启动服务器报:Caused by: java.lang.NoSuchMethodError: javax.persistence.OneToMany.orphanRemoval()Z 在hibernate3.5之前,我们运用hibernate开发J2EE项目通常会引以下几个jar包:hibernate核心包:hibernate3.jar持久化:ejb3-persistence.jar则javax.persistence.OneToMany.cla

Caused by java lang NoSuchMethodError javax persistence Ta

1.错误描述 WARN:2015-05-01 16:45:37[main] - Exception encountered during context initialization - cancelling refresh attempt org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'baseDaoImpl': Injection of resource depen

报错org.apache.catalina.LifecycleException caused by java.lang.NoSuchMethodError: javax.servlet.ServletContext.getClassLoader()Ljava/lang/ClassLoader

今天将tomcat6更换成了tomcat7,报错的内容 严重: A child container failed during startjava.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/webandr

Caused by: java.lang.NoSuchMethodError:javax.servlet.http.HttpServletRequest.getServletContext()L

在做项目的时候,出现Caused by: java.lang.NoSuchMethodError: javax.servlet.http.HttpServletRequest.getServletContext()L这个问题,也就是使用request.getServletContext().getRealPath("/")这个报错,感觉好郁闷,看了别人写的文章,可能是tomcat版本过低,我之前用的是tomcat6,现在我改成tomcat7,问题解决了,故分享给大家

【原】tomcat 7 启动报错:java.lang.NoSuchMethodError: javax.servlet.ServletContext.getSessionCookieConfig()Ljavax/servlet/SessionCookieConfig的解决

现象: tomcat 7 启动报错:java.lang.NoSuchMethodError: javax.servlet.ServletContext.getSessionCookieConfig()Ljavax/servlet/SessionCookieConfig 解决: 把tomcat目录下的lib/servlet-api.jar文件拷贝到$JAVA_HOME/jre/lib/ext目录下,再启动tomcat问题解决

【Hibernate异常处理-1】java.lang.NoSuchMethodError: javax.persistence.JoinColumn.foreignKey()Ljavax/persistence/ForeignKey;

http://blog.csdn.net/mexican_jacky/article/details/44907705 说明:其他几个涉及到:NoSuchMethodError: javax.persistence.xxx的处理方法和这相同. JAVAEE6.0中的  javax.persistence.jar与 hibernate4.3.8中的hibernate-jpa-2.1-api-1.0.0.Final.jar冲突 : 而我采取的措施是删除了JAVAEE6.0的库,运行就正常了,然后在加

Mingyang.net:java.lang.NoSuchMethodError: javax.el.ExpressionFactory.newInstance()

使用hibernate-validator校验数据模型时报出如下异常: java.lang.NoSuchMethodError: javax.el.ExpressionFactory.newInstance()Ljavax/el/ExpressionFactory; at org.hibernate.validator.internal.engine.messageinterpolation.InterpolationTerm.<clinit>(InterpolationTerm.java:5