- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
我有一个使用 spring、hibernate (3.6.4)、GWT(2.3)、drools 等的 Maven 项目。在我开始使用 hibernate OneToMany、ManyToMany 关系之前,一切都很好......
当我从“mvn jetty:run”运行该应用程序时,它可以运行,但是当我从 gwt 嵌入式 jetty 和我嵌入到我的应用程序中的 jetty 版本运行该应用程序时,我得到:
[INFO] Caused by: java.lang.NoSuchMethodError: javax.persistence.OneToMany.orphanRemoval()Z
[INFO] at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:1912)
[INFO] at org.hibernate.cfg.AnnotationBinder.processIdPropertiesIfNotAlready(AnnotationBinder.java:796)
[INFO] at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:707)
[INFO] at org.hibernate.cfg.Configuration$MetadataSourceQueue.processAnnotatedClassesQueue(Configuration.java:4035)
[INFO] at org.hibernate.cfg.Configuration$MetadataSourceQueue.processMetadata(Configuration.java:3989)
[INFO] at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1398)
[INFO] at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1375)
[INFO] at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:717)
[INFO] at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)
[INFO] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
[INFO] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
[INFO] ... 95 more
这些是 jar :
[INFO] +- org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.0.Final:compile
[INFO] +- junit:junit:jar:4.8.2:test
[INFO] +- log4j:log4j:jar:1.2.16:compile
[INFO] +- org.slf4j:slf4j-api:jar:1.6.1:compile
[INFO] +- org.slf4j:jcl-over-slf4j:jar:1.6.1:compile
[INFO] +- org.slf4j:slf4j-log4j12:jar:1.6.1:compile
[INFO] +- org.aspectj:aspectjrt:jar:1.6.11:compile
[INFO] +- org.aspectj:aspectjweaver:jar:1.6.11:compile
[INFO] +- javax.servlet:servlet-api:jar:2.5:compile
[INFO] +- net.sf.flexjson:flexjson:jar:2.1:compile
[INFO] +- org.apache.commons:commons-io:jar:1.3.2:compile
[INFO] +- org.springframework.roo:org.springframework.roo.annotations:jar:1.1.5.RELEASE:provided
[INFO] +- org.springframework:spring-core:jar:3.0.5.RELEASE:compile
[INFO] | \- org.springframework:spring-asm:jar:3.0.5.RELEASE:compile
[INFO] +- org.springframework:spring-test:jar:3.0.5.RELEASE:test (scope not updated to compile)
[INFO] +- org.springframework:spring-context:jar:3.0.5.RELEASE:compile
[INFO] | +- org.springframework:spring-beans:jar:3.0.5.RELEASE:compile
[INFO] | \- org.springframework:spring-expression:jar:3.0.5.RELEASE:compile
[INFO] +- org.springframework:spring-aop:jar:3.0.5.RELEASE:compile
[INFO] | \- aopalliance:aopalliance:jar:1.0:compile
[INFO] +- org.springframework:spring-aspects:jar:3.0.5.RELEASE:compile
[INFO] | \- org.springframework:spring-context-support:jar:3.0.5.RELEASE:compile
[INFO] +- org.springframework:spring-tx:jar:3.0.5.RELEASE:compile
[INFO] +- org.hsqldb:hsqldb:jar:1.8.0.10:compile
[INFO] +- org.hibernate:hibernate-core:jar:3.6.4.Final:compile
[INFO] | +- antlr:antlr:jar:2.7.6:compile
[INFO] | +- commons-collections:commons-collections:jar:3.1:compile
[INFO] | +- dom4j:dom4j:jar:1.6.1:compile
[INFO] | \- org.hibernate:hibernate-commons-annotations:jar:3.2.0.Final:compile
[INFO] +- org.hibernate:hibernate-entitymanager:jar:3.6.4.Final:compile
[INFO] | \- javassist:javassist:jar:3.12.0.GA:compile
[INFO] +- org.hibernate:hibernate-validator:jar:4.1.0.Final:compile
[INFO] +- javax.validation:validation-api:jar:1.0.0.GA:compile
[INFO] +- cglib:cglib-nodep:jar:2.2:compile
[INFO] +- javax.transaction:jta:jar:1.1:compile
[INFO] +- org.springframework:spring-jdbc:jar:3.0.5.RELEASE:compile
[INFO] +- org.springframework:spring-orm:jar:3.0.5.RELEASE:compile
[INFO] +- commons-pool:commons-pool:jar:1.5.4:compile
[INFO] +- commons-dbcp:commons-dbcp:jar:1.3:compile
[INFO] +- org.springframework:spring-web:jar:3.0.5.RELEASE:compile
[INFO] +- org.springframework:spring-webmvc:jar:3.0.5.RELEASE:compile
[INFO] +- org.springframework.webflow:spring-js-resources:jar:2.2.1.RELEASE:compile
[INFO] +- commons-digester:commons-digester:jar:2.0:compile
[INFO] | \- commons-beanutils:commons-beanutils:jar:1.8.0:compile
[INFO] +- commons-fileupload:commons-fileupload:jar:1.2.1:compile
[INFO] +- javax.servlet:jstl:jar:1.2:compile
[INFO] +- javax.servlet.jsp.jstl:jstl-api:jar:1.2:compile
[INFO] +- org.glassfish.web:jstl-impl:jar:1.2:compile
[INFO] +- javax.el:el-api:jar:1.0:provided
[INFO] +- joda-time:joda-time:jar:1.6:compile
[INFO] +- javax.servlet.jsp:jsp-api:jar:2.1:compile
[INFO] +- commons-codec:commons-codec:jar:1.4:compile
[INFO] +- com.google.gwt:gwt-servlet:jar:2.3.0:compile
[INFO] +- com.google.gwt:gwt-user:jar:2.3.0:provided
[INFO] +- org.json:json:jar:20090211:compile
[INFO] +- com.google.gwt.inject:gin:jar:1.5.0:compile
[INFO] | +- com.google.inject:guice:jar:3.0-rc2:compile
[INFO] | | \- javax.inject:javax.inject:jar:1:compile
[INFO] | \- com.google.inject.extensions:guice-assistedinject:jar:3.0-rc2:compile
[INFO] +- javax.validation:validation-api:jar:sources:1.0.0.GA:compile
[INFO] +- xalan:xalan:jar:2.7.1:compile
[INFO] | \- xalan:serializer:jar:2.7.1:compile
[INFO] | \- xml-apis:xml-apis:jar:1.3.04:compile
[INFO] +- mysql:mysql-connector-java:jar:5.1.17:compile
[INFO] +- proj.Dependencies:advancedComponents:jar:2.0.6:compile
[INFO] +- proj.Dependencies:gwtent:jar:2.0RC1:compile
[INFO] +- proj.Dependencies:gwtent-orm:jar:2.0RC1:compile
[INFO] +- proj.Dependencies:gwt-crypto:jar:3.0.0:compile
[INFO] +- javax.mail:mail:jar:1.4.4:compile
[INFO] | \- javax.activation:activation:jar:1.1:compile
[INFO] +- com.thoughtworks.paranamer:paranamer-generator:jar:2.3:compile
[INFO] | +- com.thoughtworks.qdox:qdox:jar:1.12:compile
[INFO] | \- asm:asm:jar:3.3:compile
[INFO] +- com.thoughtworks.paranamer:paranamer:jar:2.3:compile
[INFO] +- com.lowagie:itext:jar:2.0.8:compile
[INFO] | +- bouncycastle:bcmail-jdk14:jar:138:compile
[INFO] | \- bouncycastle:bcprov-jdk14:jar:138:compile
[INFO] +- proj.Dependencies:core-renderer:jar:8:compile
[INFO] +- proj.Dependencies:core-renderer-minimal:jar:8:compile
[INFO] +- proj.Dependencies:xml-apis-xerces:jar:2.9.1:compile
[INFO] +- org.apache.poi:poi:jar:3.8-beta4:compile
[INFO] +- org.apache.poi:poi-ooxml:jar:3.8-beta4:compile
[INFO] +- org.apache.poi:poi-ooxml-schemas:jar:3.8-beta4:compile
[INFO] | \- org.apache.xmlbeans:xmlbeans:jar:2.3.0:compile
[INFO] | \- stax:stax-api:jar:1.0.1:compile
[INFO] +- proj.Dependencies:gwt_i18n_server:jar:1.0:compile
[INFO] +- org.mortbay.jetty:jsp-api-2.1-glassfish:jar:2.1.v20100127:compile
[INFO] +- org.mortbay.jetty:jsp-2.1-glassfish:jar:2.1.v20100127:compile
[INFO] | +- org.eclipse.jdt.core.compiler:ecj:jar:3.5.1:compile
[INFO] | \- ant:ant:jar:1.6.5:compile
[INFO] +- org.eclipse.jetty:jetty-server:jar:7.2.2.v20101205:compile
[INFO] | +- org.eclipse.jetty:jetty-continuation:jar:7.2.2.v20101205:compile
[INFO] | \- org.eclipse.jetty:jetty-http:jar:7.2.2.v20101205:compile
[INFO] | \- org.eclipse.jetty:jetty-io:jar:7.2.2.v20101205:compile
[INFO] +- org.eclipse.jetty:jetty-webapp:jar:7.2.2.v20101205:compile
[INFO] | \- org.eclipse.jetty:jetty-xml:jar:7.2.2.v20101205:compile
[INFO] | \- org.eclipse.jetty:jetty-util:jar:7.2.2.v20101205:compile
[INFO] +- org.eclipse.jetty:jetty-servlet:jar:7.2.2.v20101205:compile
[INFO] | \- org.eclipse.jetty:jetty-security:jar:7.2.2.v20101205:compile
[INFO] +- org.drools:drools-core:jar:5.3.1.Final:compile
[INFO] | \- org.mvel:mvel2:jar:2.1.0.drools4:compile
[INFO] +- org.drools:droolsjbpm-knowledge:pom:5.3.1.Final:compile
[INFO] +- org.drools:droolsjbpm-integration:pom:5.3.1.Final:compile
[INFO] +- org.drools:droolsjbpm-tools:pom:5.3.1.Final:compile
[INFO] +- org.drools:droolsjbpm-parent:pom:5.3.1.Final:compile
[INFO] +- org.drools.planner:drools-planner:pom:5.3.1.Final:compile
[INFO] +- org.drools:drools-multiproject:pom:5.3.1.Final:compile
[INFO] +- org.drools:knowledge-api:jar:5.3.1.Final:compile
[INFO] +- org.jbpm:jbpm-flow-builder:jar:5.2.0-SNAPSHOT:compile
[INFO] | \- org.jbpm:jbpm-flow:jar:5.2.0-SNAPSHOT:compile
[INFO] \- org.drools:drools-compiler:jar:5.3.1.Final:compile
[INFO] +- org.antlr:antlr-runtime:jar:3.3:compile
[INFO] +- org.antlr:antlr:jar:3.3:compile
[INFO] \- org.antlr:stringtemplate:jar:3.2.1:compile
我发现有人建议这意味着有对 jpa 1.0 jar 的引用,但我似乎无法找到...我使用 maven 树、maven 类路径进行搜索,在整个目录中查找 jar..除了 hibernate jpa 2.0 v. 1.0 final 之外,我找不到任何与 jpa 或持久性相关的内容。我的类路径中没有 ejb3-persistance.jar...
我该怎么办?
非常感谢。
最佳答案
我遇到了同样的问题,我通过从类路径中删除 persistence-api-1.0.2.jar 来解决它
关于java.lang.NoSuchMethodError : javax. 持久性.OneToMany.orphanRemoval(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11376804/
在 Tomcat 6/Ubuntu 12.04 上启动 Grails 2.1.0 应用程序时出现以下错误。 Error 500 - Internal Server Error. groovy.lang
在运行 Storm 拓扑时,我收到此错误。拓扑完美运行 5 分钟,没有任何错误,然后失败。我正在使用 Config.TOPOLOGY_TICK_TUPLE_FREQ_SECS as 300 sec i
我有一个 jsp 代码在其中一台机器上运行良好。但是当我复制到另一台机器时,我得到了这个 no such method found 异常。我是 Spring 的新手。有人可以解释我错过了什么吗? 以下
已关闭。此问题需要 debugging details 。目前不接受答案。 编辑问题以包含 desired behavior, a specific problem or error, and the
我的代码在下面给出了一个错误; Exception in thread "main" java.lang.NoSuchMethodError: com/myApp/Client.cypherCBC(L
我正在尝试一个 Restful web 服务示例,所以当我要访问 url 时,我遇到了异常 java.lang.NoSuchMethodError: jersey.repackaged.com.goo
我正在将一个 Spring web 项目转换为一个 Maven 项目,但我收到了这个错误: java.lang.NoSuchMethodError: org.jboss.logging.Logger.
在我的项目中,我有一个像这样的枚举: public enum MyEnum { FIRST(1), SECOND(2); private int value; private MyEnum(int v
我创建了这个简单的示例,用于读取 Linux 正常运行时间: public String getMachineUptime() throws IOException { String[] di
我正在使用 Eclipse,并且正在使用 Java。我的目标是使用 bogoSort 方法对 vector 进行排序在一个 vector (vectorExample)中适应我的 vector 类型,
我正在运行以下查询。它显示一条错误消息。如何解决这个错误? ListrouteList=null; List companyList = session.createS
我有以下模型类: @Entity @Table(name="user_content") @org.hibernate.annotations.NamedQueries({ @org.
我有那个错误。这是我的代码: GmailSettingsService service = new GmailSettingsService(APPLICATION_NAME, DOMAIN_NAME
实际上我在执行我的java程序时遇到了下面提到的错误 Exception in thread "pool-1-thread-1" java.lang.ClassCastException: jav
java.lang.ClassCastException: java.lang.Float cannot be cast to java.lang.String 我在以下代码中遇到此异常: Strin
我正在尝试从 linkedhashset 中检索随机元素。下面是我的代码,但它每次都给我异常。 private static void generateRandomUserId(Set userIds
我已经完成了 Android 中的代码: List spinnerArray = new ArrayList(); for (int i = 0; i item = (LinkedTreeMap)
这个问题已经有答案了: Explanation of ClassCastException in Java (12 个回答) 已关闭 6 年前。 我已经编写了 java 到 Json 的代码,同时从页
这个问题在这里已经有了答案: ClassCastException java.lang.Long cannot be cast to clojure.lang.IFn (4 个答案) 关闭 6 年前
我在运行时遇到问题来编译这段代码,这给我一个错误,java.lang.Integer 无法转换为 Java.lang.Double。如果有人帮助我更正此代码,我将非常高兴 double x; pu
我是一名优秀的程序员,十分优秀!