title: cxf upgrade throw NoSuchFieldError: REFLECTION
body: <p>I want to upgrade my Spring from 2.5.6 to 4.X , then I have to upgrade my cxf also.
  after I upgraded them together , I have this problem</p>
  
  <pre><code>org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [applicationContext.xml]; nested exception is java.lang.NoSuchFieldError: REFLECTION
  at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:414)
  at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336)
  at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:304)
  at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:181)
  at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:217)
  at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:188)
  at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:125)
  at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)
  at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:129)
  at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:537)
  at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:452)
  at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:434)
  at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
  at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
  at com.caucho.server.webapp.WebApp.start(WebApp.java:1866)
  at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:667)
  at com.caucho.server.deploy.StartAutoRedeployManualStrategy.startOnInit(StartAutoRedeployManualStrategy.java:74)
  at com.caucho.server.deploy.DeployController.startOnInit(DeployController.java:549)
  at com.caucho.server.deploy.DeployContainer.start(DeployContainer.java:160)
  at com.caucho.server.webapp.WebAppContainer.start(WebAppContainer.java:659)
  at com.caucho.server.host.Host.start(Host.java:450)
  at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:667)
  at com.caucho.server.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:72)
  at com.caucho.server.deploy.DeployController.startOnInit(DeployController.java:549)
  at com.caucho.server.deploy.DeployContainer.start(DeployContainer.java:160)
  at com.caucho.server.host.HostContainer.start(HostContainer.java:484)
  at com.caucho.server.cluster.Server.start(Server.java:1319)
  at com.caucho.server.cluster.Cluster.startServer(Cluster.java:710)
  at com.caucho.server.cluster.ClusterServer.startServer(ClusterServer.java:542)
  at com.caucho.server.resin.Resin.start(Resin.java:703)
  at com.caucho.server.resin.Resin.initMain(Resin.java:1162)
  at com.caucho.server.resin.Resin.main(Resin.java:1365)
  Caused by: java.lang.NoSuchFieldError: REFLECTION
  at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.&lt;init&gt;(RuntimeModelBuilder.java:49)
  at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:372)
  at com.sun.xml.bind.v2.runtime.JAXBContextImpl.&lt;init&gt;(JAXBContextImpl.java:236)
  at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:76)
  at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:55)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  at java.lang.reflect.Method.invoke(Unknown Source)
  at javax.xml.bind.ContextFinder.newInstance(Unknown Source)
  at javax.xml.bind.ContextFinder.newInstance(Unknown Source)
  at javax.xml.bind.ContextFinder.find(Unknown Source)
  at javax.xml.bind.JAXBContext.newInstance(Unknown Source)
  at org.apache.cxf.common.jaxb.JAXBContextCache$2.run(JAXBContextCache.java:347)
  at org.apache.cxf.common.jaxb.JAXBContextCache$2.run(JAXBContextCache.java:345)
  at java.security.AccessController.doPrivileged(Native Method)
  at org.apache.cxf.common.jaxb.JAXBContextCache.createContext(JAXBContextCache.java:345)
  at org.apache.cxf.common.jaxb.JAXBContextCache.getCachedContextAndSchemas(JAXBContextCache.java:246)
  at org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser.getContext(AbstractBeanDefinitionParser.java:322)
  at org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser.mapElementToJaxbProperty(AbstractBeanDefinitionParser.java:349)
  at org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser.mapElementToJaxbProperty(AbstractBeanDefinitionParser.java:295)
  at org.apache.cxf.transport.http.spring.HttpConduitBeanDefinitionParser.doParse(HttpConduitBeanDefinitionParser.java:58)
  at org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.parseInternal(AbstractSingleBeanDefinitionParser.java:85)
  at org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.parse(AbstractBeanDefinitionParser.java:61)
  at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:74)
  at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1427)
  at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1417)
  at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:174)
  at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:144)
  at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:100)
  at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:510)
  at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:392)
  </code></pre>
  
  <h2>my maven dependenties are as follows</h2>
  
  <pre><code>&lt;dependency&gt;  
      &lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;  
      &lt;artifactId&gt;cxf-rt-frontend-jaxws&lt;/artifactId&gt;  
      &lt;version&gt;3.0.6&lt;/version&gt;
  &lt;/dependency&gt;  
  &lt;dependency&gt;  
      &lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;  
      &lt;artifactId&gt;cxf-rt-transports-http&lt;/artifactId&gt; 
      &lt;version&gt;3.0.6&lt;/version&gt;
  &lt;/dependency&gt;   
  </code></pre>
  
  <p>I don't know whether I need other cxf dependeny or other causes this problem</p>
  
  <p>my applicationContext.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws"
  xmlns:jee="http://www.springframework.org/schema/jee" xmlns:tx="http://www.springframework.org/schema/tx"
  xmlns:aop="http://www.springframework.org/schema/aop"
  xmlns:context="http://www.springframework.org/schema/context"
  xmlns:http-conf="http://cxf.apache.org/transports/http/configuration" 
  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-2.5.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd http://cxf.apache.org/jaxws 
  http://cxf.apache.org/schemas/jaxws.xsd http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd"&gt;
  &lt;description&gt;Spring公共配置文件&lt;/description&gt;
  &lt;aop:aspectj-autoproxy proxy-target-class="true"/&gt;
  &lt;bean id="configProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean"&gt;
      &lt;property name="locations"&gt;
          &lt;list&gt;
              &lt;value&gt;classpath:config.properties&lt;/value&gt;
              &lt;value&gt;classpath:common.properties&lt;/value&gt;
          &lt;/list&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  &lt;bean
      class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"&gt;
      &lt;property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" /&gt;
      &lt;property name="ignoreResourceNotFound" value="false" /&gt;
      &lt;property name="properties" ref="configProperties" /&gt;
  &lt;/bean&gt;
  
  &lt;http-conf:conduit name="http://risk.epay.163.com/.*"&gt;
      &lt;http-conf:client ConnectionTimeout="3000" ReceiveTimeout="6000" AllowChunking="false"/&gt;
  &lt;/http-conf:conduit&gt;
  &lt;http-conf:conduit name="*.http-conduit"&gt;  
      &lt;http-conf:client ConnectionTimeout="3000" ReceiveTimeout="6000"/&gt;
  &lt;/http-conf:conduit&gt;  
  
  &lt;!-- Web Service Setting start --&gt;
  &lt;import resource="classpath:META-INF/cxf/cxf.xml"/&gt;
  &lt;import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/&gt;
  &lt;import resource="classpath:META-INF/cxf/cxf-servlet.xml"/&gt;
  
  
  &lt;jaxws:client id="blackAccountService"
      address="${XX}" 
      serviceClass="XXXX" &gt;
  &lt;/jaxws:client&gt;
  
  &lt;jaxws:server id="XXXX" serviceClass="XXXX
      address="XX" endpointName="XX" &gt;
      &lt;jaxws:serviceBean&gt;
          &lt;bean class="XXXX"&gt;&lt;/bean&gt;
      &lt;/jaxws:serviceBean&gt;
  &lt;/jaxws:server&gt;
  
  
  &lt;!-- annotation way configuration --&gt;
  &lt;context:component-scan base-package="XX" /&gt;
  &lt;bean id="propertiesInjector" class="XX"&gt;&lt;/bean&gt;
  
  
  &lt;bean id="dataSource" class="org.logicalcobwebs.proxool.ProxoolDataSource"
      destroy-method="close"&gt;
      &lt;property name="driver"&gt;
          &lt;value&gt;${jdbc-1.proxool.driver-class}&lt;/value&gt;
      &lt;/property&gt;
      &lt;property name="driverUrl"&gt;
          &lt;value&gt;${jdbc-1.proxool.driver-url}&lt;/value&gt;
      &lt;/property&gt;
      &lt;property name="user"&gt;
          &lt;value&gt;${jdbc-1.user}&lt;/value&gt;
      &lt;/property&gt;
      &lt;property name="password"&gt;
          &lt;value&gt;${jdbc-1.password}&lt;/value&gt;
      &lt;/property&gt;
      &lt;property name="alias"&gt;
          &lt;value&gt;${jdbc-1.proxool.alias}&lt;/value&gt;
      &lt;/property&gt;
      &lt;property name="prototypeCount"&gt;
          &lt;value&gt;${jdbc-1.proxool.prototype-count}&lt;/value&gt;
      &lt;/property&gt;
      &lt;property name="maximumConnectionCount"&gt;
          &lt;value&gt;${jdbc-1.proxool.maximum-connection-count}&lt;/value&gt;
      &lt;/property&gt;
      &lt;property name="minimumConnectionCount"&gt;
          &lt;value&gt;${jdbc-1.proxool.minimum-connection-count}&lt;/value&gt;
      &lt;/property&gt;
      &lt;property name="maximumActiveTime"&gt;
          &lt;value&gt;${jdbc-1.proxool.maximum-active-time}&lt;/value&gt;
      &lt;/property&gt;
      &lt;property name="simultaneousBuildThrottle"&gt;
          &lt;value&gt;${jdbc-1.proxool.simultaneous-build-throttle}&lt;/value&gt;
      &lt;/property&gt;
      &lt;!-- 
      &lt;property name="trace"&gt;
          &lt;value&gt;${jdbc-1.proxool.trace}&lt;/value&gt;
      &lt;/property&gt;
      --&gt;
      &lt;property name="verbose"&gt;
          &lt;value&gt;${jdbc-1.proxool.verbose}&lt;/value&gt;
      &lt;/property&gt;
      &lt;property name="statistics"&gt;
          &lt;value&gt;${jdbc-1.proxool.statistics}&lt;/value&gt;
      &lt;/property&gt;
      &lt;property name="houseKeepingTestSql"&gt;
          &lt;value&gt;${jdbc-1.proxool.house-keeping-test-sql}&lt;/value&gt;
      &lt;/property&gt;
  
  &lt;/bean&gt;
  
  
  &lt;bean id="transactionManager"
      class="org.springframework.jdbc.datasource.DataSourceTransactionManager"&gt;
      &lt;property name="dataSource" ref="dataSource" /&gt;
  &lt;/bean&gt;
  
  &lt;!-- 使用annotation定义事务 --&gt;
  &lt;tx:annotation-driven transaction-manager="transactionManager" /&gt;
  
  &lt;!-- SpringContextHolder定义 --&gt;
  &lt;bean class="com.netease.epay.common.module.spring.SpringContextHolder" lazy-init="false" /&gt;
  
  &lt;bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean"&gt;
      &lt;property name="configLocations"&gt;   
         &lt;list&gt;
              &lt;value&gt;classpath:SqlMapConfig.xml&lt;/value&gt;
              &lt;value&gt;classpath:epay/common/SqlMapConfig.xml&lt;/value&gt;
              &lt;value&gt;classpath:epay/platform/SqlMapConfig.xml&lt;/value&gt;
              &lt;value&gt;classpath:epay/account/SqlMapConfig.xml&lt;/value&gt;
              &lt;value&gt;classpath:epay/trade/SqlMapConfig.xml&lt;/value&gt;
              &lt;value&gt;classpath:epay/core/SqlMapConfig.xml&lt;/value&gt;
         &lt;/list&gt; 
      &lt;/property&gt; 
      &lt;property name="dataSource" ref="dataSource" /&gt;
  &lt;/bean&gt;
  
  &lt;bean id="sqlExecutor" class="com.netease.epay.common.module.orm.ibatis.LimitSqlExecutor"&gt;
      &lt;property name="dialect"&gt;
          &lt;bean class="com.netease.epay.common.module.orm.ibatis.dialect.OracleDialect" /&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  
  &lt;bean id="threadPool" class="com.netease.epay.common.module.pool.ThreadPool"&gt;
      &lt;property name="poolSize" value="${threadpool.size}"/&gt;
  &lt;/bean&gt;
  
  &lt;bean id="springContextHolder" class="com.netease.epay.common.module.spring.SpringContextHolder"&gt;
  &lt;/bean&gt;
  
  &lt;bean id="transactionMailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl"&gt;
      &lt;property name="host"&gt;
          &lt;value&gt;tmfast.mail.163.com&lt;/value&gt;
      &lt;/property&gt;
      &lt;property name="port" value="25"/&gt;
      &lt;property name="javaMailProperties"&gt;
          &lt;props&gt;
              &lt;prop key="mail.smtp.auth"&gt;false&lt;/prop&gt;
              &lt;prop key="mail.smtp.timeout"&gt;25000&lt;/prop&gt;
          &lt;/props&gt;
      &lt;/property&gt;
      &lt;property name="username" value="kefu-epay@service.netease.com"/&gt;
  &lt;/bean&gt;
  &lt;bean id="subcribeMailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl"&gt;
      &lt;property name="host"&gt;
          &lt;value&gt;cmfast.mail.163.com&lt;/value&gt;
      &lt;/property&gt;
      &lt;property name="port" value="25"/&gt;
      &lt;property name="javaMailProperties"&gt;
          &lt;props&gt;
              &lt;prop key="mail.smtp.auth"&gt;false&lt;/prop&gt;
              &lt;prop key="mail.smtp.timeout"&gt;25000&lt;/prop&gt;
          &lt;/props&gt;
      &lt;/property&gt;
      &lt;property name="username" value="kefu-epay@service.netease.com"/&gt;
  &lt;/bean&gt;
  &lt;bean id="uploadFileTransferReceipt" class="com.netease.yfb.ctrol.viewctrl.upload.uploadsubclass.UploadFileTransferReceipt"&gt;
      &lt;property name="remoteDir" value="/transferReceipt" /&gt;
      &lt;property name="visitDir" value="/wyb/transferReceipt" /&gt;
      &lt;property name="maxUploadSize" value="1572864" /&gt;
  &lt;/bean&gt;
  &lt;bean id="ftpBusinessTechWyb" class="com.netease.yfb.business.common.FtpBusinessTechWyb" scope="prototype"&gt;
      &lt;property name="HOST" value="upload.ms.netease.com" /&gt;
      &lt;property name="PORT" value="21" /&gt;
      &lt;property name="USERNAME" value="tech_wyb" /&gt;
      &lt;property name="PASSWORD" value="ea5eiUUIO@#ALcajr" /&gt;
  &lt;/bean&gt;
  
  &lt;bean id="monitor" class="com.netease.om.Monitor"
      factory-method="getInstance" init-method="init"&gt;
      &lt;constructor-arg&gt;
          &lt;value&gt;epay&lt;/value&gt;
      &lt;/constructor-arg&gt;
      &lt;property name="xmppAddress"&gt;
           &lt;value&gt;${epay.monitor.xmpp.address}&lt;/value&gt;
       &lt;/property&gt;
       &lt;property name="xmppPort"&gt;
           &lt;value&gt;${epay.monitor.xmpp.port}&lt;/value&gt;
       &lt;/property&gt;
  &lt;/bean&gt;
  
  
  &lt;import resource="spring/limit-bean.xml" /&gt;
  &lt;import resource="spring/schedule.xml" /&gt;
  
  &lt;bean id="ftpUtil" class="com.netease.epay.module.common.utils.FtpUtil"&gt;
      &lt;constructor-arg index="0"&gt;
          &lt;value&gt;${epay.ftp.address}&lt;/value&gt;
      &lt;/constructor-arg&gt;
      &lt;constructor-arg index="1"&gt;
          &lt;value&gt;${epay.ftp.port}&lt;/value&gt;
      &lt;/constructor-arg&gt;
      &lt;constructor-arg index="2"&gt;
          &lt;value&gt;${epay.ftp.username}&lt;/value&gt;
      &lt;/constructor-arg&gt;
      &lt;constructor-arg index="3"&gt;
          &lt;value&gt;${epay.ftp.password}&lt;/value&gt;
      &lt;/constructor-arg&gt;
  &lt;/bean&gt;
  
  &lt;bean id="nosClient" class="com.netease.cloud.services.nos.NosClient"&gt;
      &lt;constructor-arg index="0"&gt;          
          &lt;bean class="com.netease.cloud.auth.BasicCredentials"&gt;
               &lt;constructor-arg index="0" &gt;&lt;value&gt;${nos.accessKey}&lt;/value&gt;&lt;/constructor-arg&gt;  
               &lt;constructor-arg index="1" &gt;&lt;value&gt;${nos.secretKey}&lt;/value&gt;&lt;/constructor-arg&gt;  
          &lt;/bean&gt;
      &lt;/constructor-arg&gt;
  &lt;/bean&gt;
  
  
  &lt;import resource="rpc_dubbo.xml"/&gt;
  &lt;bean id="refreshClientCacheProxy" class="XXX" init-method="init"&gt;
      &lt;property name="refUpdateTimeQueryService" ref="refUpdateTimeQueryService"/&gt;
      &lt;property name="payWholeCacheService" ref="payWholeCacheService"/&gt;
      &lt;property name="cacheCleanTimerInterval" value="${gate.local.cache.check.time}"/&gt;
  &lt;/bean&gt;    
  </code></pre>
  
  <p></p>
  
  <p>In order to be compatible with ibatis , I imported Spring-orm 3.2.8</p>