Weblogic求教,大神们快来
项目在Tomcat中可以运行得很好,但是放到Weblogic上时就出现了以下异常:
Caused by:
java.lang.NoSuchMethodError: javax.persistence.OneToMany.orphanRemoval()Z
at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:1912) ~[hibernate-core-3.6.6.Final.jar:3.6.6.Final]
at org.hibernate.cfg.AnnotationBinder.processIdPropertiesIfNotAlready(AnnotationBinder.java:796) ~[hibernate-core-3.6.6.Final.jar:3.6.6.Final]
at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:707) ~[hibernate-core-3.6.6.Final.jar:3.6.6.Final]
at org.hibernate.cfg.Configuration$MetadataSourceQueue.processAnnotatedClassesQueue(Configuration.java:4035) ~[hibernate-core-3.6.6.Final.jar:3.6.6.Final]
at org.hibernate.cfg.Configuration$MetadataSourceQueue.processMetadata(Configuration.java:3989) ~[hibernate-core-3.6.6.Final.jar:3.6.6.Final]
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1398) ~[hibernate-core-3.6.6.Final.jar:3.6.6.Final]
at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1375) ~[hibernate-core-3.6.6.Final.jar:3.6.6.Final]
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:717) ~[spring-orm-3.1.0.M1.jar:3.1.0.M1]
at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211) ~[spring-orm-3.1.0.M1.jar:3.1.0.M1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1479) ~[spring-beans-3.1.0.M1.jar:3.1.0.M1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417) ~[spring-beans-3.1.0.M1.jar:3.1.0.M1]
百度、Google之,都说是包冲突,我估计是和Weblogic的包发生冲突,但是如何解决???
我尝试把weblogic关于persistence的包删除,但是它又报找不到类,如何是好???需要干掉那个包???
Weblogic的版本是WebLogic Server 10.3.5.0
------解决方案--------------------个人认为:应该是你weblogic下的javaee.jar与你工程lib中的javaee.jar冲突。你试下把weblogic启动.bat删掉javaee.jar.
------解决方案--------------------工程中根本就没有javaee.jar,怎么办,急死了
------解决方案--------------------你是用myeclipse启动tomcat吗?如果是就把myeclipse中的javaee.jar覆盖到weblogic下。