org.springframework.beans.MutablePropertyValues.add(Ljava /郎/字符串; Ljava /郎/对象;)Lorg / springframework的/豆类/ MutablePropertyValues

时间:2016-11-08 14:40:58

标签: java spring spring-4

我是Spring新手,我目前正在使用Spring 4

战争一旦部署到JCS-SaaS(云端),我就会出现以下错误:

  

[2016-11-08T12:50:06.686 + 00:00] [INCIDENT_ERROR] 1 [事件22   使用问题密钥创建" BEA-101216 [HTTP]"]   [2016-11-08T12:50:06.547 + 00:00] ERROR [失败发生在   使用ID' 3634255956252836'执行部署请求为了任务   ' 71&#39 ;.错误是:' weblogic.application.ModuleException:   [HTTP:101216] Servlet:" pepsiServlet"无法在启动时预加载   Web应用程序:" test4.war"。[   org.springframework.beans.factory.BeanDefinitionStoreException:   从类路径资源解析XML文档时发生意外异常   [pepsiServlet-context.xml中];嵌套异常是   java.lang.NoSuchMethodError:   org.springframework.beans.MutablePropertyValues.add(Ljava /郎/字符串; Ljava /郎/对象;)Lorg / springframework的/豆类/ MutablePropertyValues;

的pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.itc</groupId>
    <artifactId>pepsiIndIntegration</artifactId>
    <packaging>war</packaging>
    <version>0.0.1-SNAPSHOT</version>
    <name>pepsiIndIntegration Maven Webapp</name>
    <url>http://maven.apache.org</url>

    <properties>
        <jdk.version>1.7</jdk.version>
        <spring.version>4.3.3.RELEASE</spring.version>
        <slf4j.version>1.7.21</slf4j.version>
        <log4j.version>1.2.17</log4j.version>
        <apache.commons.version>3.5</apache.commons.version>
        <cxf.version>3.1.8</cxf.version>
    </properties>
    <dependencies>
        <!-- JUnit Dependency -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>

        <!-- Spring Dependencies -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</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-tx</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context-support</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-test</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <dependency>
            <groupId>cglib</groupId>
            <artifactId>cglib</artifactId>
            <version>3.2.4</version>
        </dependency>


        <!-- Logging Dependencies -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>${slf4j.version}</version>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>${log4j.version}</version>
        </dependency>

        <!-- Spring MVC -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</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-tx</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context-support</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-test</artifactId>
            <version>${spring.version}</version>
        </dependency>

        <!-- Org Apache Commons -->
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>${apache.commons.version}</version>
        </dependency>

        <!-- Oracle Driver Dependency -->
        <!-- <dependency> <groupId>oracle</groupId> <artifactId>ojdbc6</artifactId> 
            <version>1.0</version> <scope>system</scope> <systemPath>${oracle.driver.path}</systemPath> 
            </dependency> -->
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.5</version>
        </dependency>

        <!-- Dependency for common file upload -->
        <dependency>
            <groupId>commons-fileupload</groupId>
            <artifactId>commons-fileupload</artifactId>
            <version>1.3.1</version>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.4</version>
        </dependency>
        <dependency>
            <groupId>com.jcraft</groupId>
            <artifactId>jsch</artifactId>
            <version>0.1.54</version>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-frontend-jaxws</artifactId>
            <version>${cxf.version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-transports-http</artifactId>
            <version>${cxf.version}</version>
            <scope>runtime</scope>
        </dependency>
    </dependencies>
    <build>
        <finalName>pepsiIndIntegration</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.2</version>
                <configuration>
                    <source>${jdk.version}</source>
                    <target>${jdk.version}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>sonar-maven-plugin</artifactId>
                <version>2.5</version>
            </plugin>
            <plugin>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-xjc-plugin</artifactId>
                <version>${cxf.version}</version>
                <configuration>
                    <extensions>
                        <extension>org.apache.cxf.xjcplugins:cxf-xjc-dv:3.1.8</extension>
                    </extensions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-codegen-plugin</artifactId>
                <version>3.1.8</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>wsdl2java</goal>
                        </goals>
                        <configuration>
                            <sourceRoot>${basedir}/target/generated-sources/cxf/wsdl2java</sourceRoot>
                            <wsdlRoot>${wsdls}</wsdlRoot>
                            <wsdlOptions>
                                <wsdlOption>
                                    <wsdl>https://someurl/abc/xyz?wsdl</wsdl>
                                    <extraargs>
                                        <extraarg>-client</extraarg>
                                    </extraargs>
                                </wsdlOption>
                            </wsdlOptions>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>

下面是web.xml

<!DOCTYPE web-app PUBLIC
 "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
 "http://java.sun.com/dtd/web-app_2_3.dtd" >

<web-app>
  <display-name>Archetype Created Web Application</display-name>
  <!-- Loading Beans -->
    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>
            classpath:pepsiBeans.xml
        </param-value>
    </context-param>

    <!-- Spring Dispatched Servlet -->
    <servlet>
        <servlet-name>pepsiServlet</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <init-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>classpath:pepsiServlet-context.xml</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>pepsiServlet</servlet-name>
        <url-pattern>/</url-pattern>
    </servlet-mapping>
</web-app>

下面是我的pepsiServlet-context.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns:beans="http://www.springframework.org/schema/beans"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc"
    xmlns:tx="http://www.springframework.org/schema/tx" xmlns:task="http://www.springframework.org/schema/task"
    xmlns:util="http://www.springframework.org/schema/util"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd
        http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd
        http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.3.xsd
        http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-4.3.xsd
        http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.3.xsd">
    <context:component-scan base-package="com.itc.pepsi" />
    <!-- DispatcherServlet Context: defines this servlet's request-processing 
        infrastructure -->

    <!-- Enables the Spring MVC @Controller programming model -->
    <mvc:annotation-driven />

    <!-- Enable Annotation based Declarative Transaction Management -->
    <tx:annotation-driven proxy-target-class="true"
        transaction-manager="transactionManager" />

    <!-- Creating TransactionManager Bean, since JDBC we are creating of type 
        DataSourceTransactionManager -->
    <!-- <beans:bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> 
        <beans:property name="dataSource" ref="dataSource" /> </beans:bean> -->

    <!-- Handles HTTP GET requests for /resources/** by efficiently serving 
        up static resources in the ${webappRoot}/resources directory -->

    <mvc:resources mapping="/resources/**" location="/resources/"/>
    <!-- Initialization for data source -->
    <!-- <beans:bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> 
        <beans:property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" 
        /> <beans:property name="url" value="jdbc:oracle:thin@hostname:port:service/sid" 
        /> <beans:property name="username" value="USER_NAME" /> <beans:property name="password" 
        value="PASSWORD" /> </beans:bean> -->

    <beans:bean id="messageSource"
        class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
        <beans:property name="basename" value="classpath:ApplicationMessages" />
        <beans:property name="defaultEncoding" value="UTF-8" />
    </beans:bean>


    <task:annotation-driven scheduler="scheduler"
        executor="executor" />
    <task:scheduler id="scheduler" pool-size="10" />
    <task:executor id="executor" pool-size="10" />

    <beans:bean id="pepsiIntgService" class="com.itc.pepsi.bo.pepsiIntgService">
    </beans:bean>

    <task:scheduled-tasks scheduler="scheduler">
        <task:scheduled ref="pepsiIntgService" method="readFile"
            cron="${cronstring}" />
    </task:scheduled-tasks>

    <!-- <bean id="taskExecutor" class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor"> 
        <property name="corePoolSize" value="5" /> <property name="maxPoolSize" value="10" 
        /> <property name="queueCapacity" value="25" /> </bean> <bean id="taskExecutorExample" 
        class="TaskExecutorExample"> <constructor-arg ref="taskExecutor" /> </bean> -->
</beans:beans>

以下是部署到JCS-SaaS后的日志

  

[2016-11-08T12:50:06.686 + 00:00] [INCIDENT_ERROR] 1 [事件22   使用问题密钥创建&#34; BEA-101216 [HTTP]&#34;]   [2016-11-08T12:50:06.547 + 00:00] ERROR [失败发生在   使用ID&#39; 3634255956252836&#39;执行部署请求为了任务   &#39; 71&#39 ;.错误是:&#39; weblogic.application.ModuleException:   [HTTP:101216] Servlet:&#34; pepsiServlet&#34;无法在启动时预加载   Web应用程序:&#34; test4.war&#34;。[   org.springframework.beans.factory.BeanDefinitionStoreException:   从类路径资源解析XML文档时发生意外异常   [pepsiServlet-context.xml中];嵌套异常是   java.lang.NoSuchMethodError:   org.springframework.beans.MutablePropertyValues.add(Ljava /郎/字符串; Ljava /郎/对象;)Lorg / springframework的/豆类/ MutablePropertyValues;     在   org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:420)     在   org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)     在   org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)     在   org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)     在   org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)     在   org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)     在   org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)     在   org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92)     在   org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)     在   org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)     在   org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)     在   org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:402)     在   org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:316)     在   org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:282)     在   org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:126)     在javax.servlet.GenericServlet.init(GenericServlet.java:241)at   weblogic.servlet.internal.StubSecurityHelper $ ServletInitAction.run(StubSecurityHelper.java:283)     在   weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)     在   weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)     在   weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)     在   weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)     在   weblogic.servlet.internal.StubLifecycleHelper。(StubLifecycleHelper.java:48)     在   weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:539)     在   weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:2037)     在   weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:2011)     在   weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1930)     在   weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3226)     在   weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1529)     在   weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:488)     在   weblogic.application.internal.flow.ModuleStateDriver $ 3.next(ModuleStateDriver.java:425)     在   weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)     在   weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)     在   weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)     在   weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247)     在   weblogic.application.internal.flow.ModuleStateDriver $ 3.next(ModuleStateDriver.java:425)     在   weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)     在   weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)     在   weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)     在   weblogic.application.internal.BaseDeployment $ 2.next(BaseDeployment.java:671)     在   weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)     在   weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212)     在   weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:44)     在   weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)     在   weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:84)     在   weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:573)     在   weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150)     在   weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:116)     在   weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:327)     在   weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:849)     在   weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1273)     在   weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:441)     在   weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163)     在   weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:217)     在   weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access $ 100(DeploymentReceiverCallbackDeliverer.java:14)     在   weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer $ 2.run(DeploymentReceiverCallbackDeliverer.java:69)     在   weblogic.work.SelfTuningWorkManagerImpl $ WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:550)     在weblogic.work.ExecuteThread.execute(ExecuteThread.java:268)at   weblogic.work.ExecuteThread.run(ExecuteThread.java:226)引起:   java.lang.NoSuchMethodError:   org.springframework.beans.MutablePropertyValues.add(Ljava /郎/字符串; Ljava /郎/对象;)Lorg / springframework的/豆类/ MutablePropertyValues;     在   org.springframework.web.servlet.config.AnnotationDrivenBeanDefinitionParser.getContentNegotiationManager(AnnotationDrivenBeanDefinitionParser.java:388)     在   org.springframework.web.servlet.config.AnnotationDrivenBeanDefinitionParser.parse(AnnotationDrivenBeanDefinitionParser.java:186)     在   org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69)     在   org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1297)     在   org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1287)     在   org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)     在   org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92)     在   org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:507)     在   org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398)     ... 57更多&#39;:TRACE

以下是项目结构

project_structure

以下是为maven build下载的jar文件

maven_jars

0 个答案:

没有答案
相关问题