简体   繁体   English

在Weblogic 12.1.3.0上部署Spring应用程序期间出错

[英]Error During deploying Spring application on Weblogic 12.1.3.0

I am trying to deploy an application consisting of apache CXF , Spring and Hibernate libraries on weblogic server, the application leverages the JMS and dataSource from weblogic server. 我正在尝试在weblogic服务器上部署一个由apache CXFSpringHibernate库组成的应用程序,该应用程序利用了weblogic服务器上的JMS和dataSource。

However when I am trying to deploy the application, the deployment is failing with error : 但是,当我尝试部署应用程序时,部署失败并显示错误:

java.lang.NoSuchMethodError: org.springframework.aop.framework.AopProxyUtils.getSingletonTarget(Ljava/lang/Object;)Ljava/lang/Object; java.lang.NoSuchMethodError:org.springframework.aop.framework.AopProxyUtils.getSingletonTarget(Ljava / lang / Object;)Ljava / lang / Object;

I have researched this error on google but got nothing relevant to fix this. 我已经在Google上研究了此错误,但没有相关的解决方法。 Please help me to fix this. 请帮助我解决此问题。 Below is my pom.xml and spring applicationContext.xml 下面是我的pom.xml和spring applicationContext.xml

<dependencies>

<!-- CXF Dependencies -->
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf.xjc-utils</groupId>
<artifactId>cxf-xjc-runtime</artifactId>
<version>${cxf.xjc-utils.version}</version>
</dependency>

<!-- Spring Dependencies -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-expression</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jms</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
</dependency>
<!-- Hibernate Dependencies -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>4.3.1.Final</version><!-- Use the same version for EHCache -->
</dependency>
<!-- Hibernate annotation -->
<dependency>
<groupId>org.hibernate.common</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
<version>4.0.4.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>4.3.1.Final</version>
</dependency>

<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.1-api</artifactId>
<version>1.0.0.Final</version>
</dependency>
<!-- Hibernate Dependencies Above -->
<dependency>
<groupId>antlr</groupId>
<artifactId>antlr</artifactId>
<version>2.7.7</version>
</dependency>


<dependency>
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.12.0.GA</version>
</dependency>

<!-- Servlet API -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>${servletapi.version}</version>
</dependency>

<!-- Active MQ, Weblogic JMS Dependencies -->
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-all</artifactId>
<version>5.15.3</version>
</dependency>

<dependency>
<groupId>com.oracle.weblogic</groupId>
<artifactId>weblogic-t3thinclient</artifactId>
<version>1.0</version>
</dependency>

</dependencies>  

===================ApplicationContext.xml======================== =================== applicationContext.xml中========================

<context:component-scan base-package="com.wls.deployable.cxf"/>

<jee:jndi-lookup id="devUserDatasource" jndi-name="jdbc/devUserDatasource" expected-type="javax.sql.DataSource"/> 


<bean id="stock" class="com.wls.deployable.cxf.stockquote.StockQuotePortTypeImpl" />

<jaxws:endpoint id="stockService" implementor="#stock" address="/StockService" />

<bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
<property name="environment">
<props>
<prop key="java.naming.factory.initial">weblogic.jndi.WLInitialContextFactory</prop>
<prop key="java.naming.provider.url">t3://localhost:7001</prop>
</props>
</property>
</bean>
<bean id="queueConnectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiTemplate">
<ref bean="jndiTemplate" />
</property>
<property name="jndiName">
<value>/com/jms/dev/cf</value>
</property>
</bean>

<bean id="jmsDestinationResolver" class="org.springframework.jms.support.destination.JndiDestinationResolver">
<property name="jndiTemplate">
<ref bean="jndiTemplate" />
</property>
<property name="cache">
<value>true</value>
</property>
</bean>
<bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
<property name="connectionFactory">
<ref bean="queueConnectionFactory" />
</property>
<property name="destinationResolver">
<ref bean="jmsDestinationResolver" />
</property>
</bean>

Please let me know if anything else is required. 如果需要其他任何条件,请告诉我。

java.lang.NoSuchMethodError主要是由于JAR版本冲突:另一个Spring AOP JAR在您的类路径上。

This error is because your web application is pulling in an older version of spring AOP, you need to pull spring-aop-5.0.5.RELEASE which contains the missing method. 该错误是因为您的Web应用程序正在拉入旧版本的spring AOP,所以您需要拉出包含缺少方法的spring-aop-5.0.5.RELEASE

How to get around the issue: 如何解决这个问题:

Spring AOP jar is being pulled into your application dependencies as a transitive dependency. Spring AOP jar被作为传递依赖项引入到您的应用程序依赖项中。 To see which dependency in your POM file is causing to pull spring AOP jar you can see dependency hierarchy for your web application by opening its pom file in eclipse(or other IDE) and then searching for spring-aop , once you have spotted the direct dependency in your application's POM that requires spring AOP, you need to then change its version to latest so that it would then pull correct version of sprint-aop ie the version which contains the missing method org.springframework.aop.framework.AopProxyUtils.getSingletonTarget 要查看POM文件中的哪个依赖关系导致拉出Spring AOP jar,可以通过在eclipse(或其他IDE)中打开其pom文件,然后搜索spring-aop来查看Web应用程序的依赖关系层次结构。依赖于需要Spring AOP的应用程序POM中的依赖项,然后需要将其版本更改为最新版本,以便随后将拉出sprint-aop的正确版本,即包含缺少方法org.springframework.aop.framework.AopProxyUtils.getSingletonTarget的版本

For example there is a dependency in your application's POM say abc which has dependency on spring AOP, you need to change the version of abc to latest to solve the problem. 例如,应用程序的POM中有一个依赖项abc ,它依赖于spring AOP,因此您需要将abc的版本更改为最新版本才能解决该问题。

Any queries/clarifications! 任何疑问/澄清! Please let me know! 请告诉我!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将Spring应用程序部署到Weblogic 12c时出错 - Error while deploying spring application to Weblogic 12c 将java应用程序部署到weblogic时出错 - Error deploying java application to weblogic 403 Forbidden-在Weblogic中部署Spring Boot应用程序 - 403 Forbidden - Deploying Spring Boot application in Weblogic 在weblogic 10.3中部署Web应用程序时出错 - Error while deploying web application in weblogic 10.3 将基于 Spring Boot 的应用程序部署到 WebLogic 时出现 IllegalArgumentException - IllegalArgumentException when deploying Spring Boot based application to WebLogic 在tomcat和weblogic 10服务器中部署spring应用程序之间的区别 - difference between deploying spring application in tomcat and weblogic 10 servers 将Spring Boot部署到Weblogic 10.3时出错-AppMerge流的进程异常 - Error deploying spring boot to weblogic 10.3 - Exception in AppMerge flows' progression 错误:无法从Oracle WebLogic Server 12.1.3.0开始两次加载此JVM TI代理 - ERROR: Cannot load this JVM TI agent twice starting Oracle WebLogic Server 12.1.3.0 在 WebLogic 12.1.3 上部署应用程序时出现“找不到 Struts 调度程序”错误 - "The Struts dispatcher cannot be found" error while deploying application on WebLogic 12.1.3 在weblogic 12.1.3.0中如何使用@ EJB,@ Inject和@Local? - How to use @EJB,@Inject and @ Local in weblogic 12.1.3.0?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM