- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想将我的 Spring 从 2.5.6 升级到 4.X,然后我还必须升级我的 cxf。我把它们一起升级后,我有这个问题
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.<init>(RuntimeModelBuilder.java:49)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:372)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(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)
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>3.0.6</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
<version>3.0.6</version>
</dependency>
我不知道我是否需要其他 cxf 依赖项或其他原因导致此问题
我的 applicationContext.xml
<?xml version="1.0" encoding="UTF-8"?>
<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">
<description>Spring公共配置文件</description>
<aop:aspectj-autoproxy proxy-target-class="true"/>
<bean id="configProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
<property name="locations">
<list>
<value>classpath:config.properties</value>
<value>classpath:common.properties</value>
</list>
</property>
</bean>
<bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />
<property name="ignoreResourceNotFound" value="false" />
<property name="properties" ref="configProperties" />
</bean>
<http-conf:conduit name="http://risk.epay.163.com/.*">
<http-conf:client ConnectionTimeout="3000" ReceiveTimeout="6000" AllowChunking="false"/>
</http-conf:conduit>
<http-conf:conduit name="*.http-conduit">
<http-conf:client ConnectionTimeout="3000" ReceiveTimeout="6000"/>
</http-conf:conduit>
<!-- Web Service Setting start -->
<import resource="classpath:META-INF/cxf/cxf.xml"/>
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/>
<import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>
<jaxws:client id="blackAccountService"
address="${XX}"
serviceClass="XXXX" >
</jaxws:client>
<jaxws:server id="XXXX" serviceClass="XXXX
address="XX" endpointName="XX" >
<jaxws:serviceBean>
<bean class="XXXX"></bean>
</jaxws:serviceBean>
</jaxws:server>
<!-- annotation way configuration -->
<context:component-scan base-package="XX" />
<bean id="propertiesInjector" class="XX"></bean>
<bean id="dataSource" class="org.logicalcobwebs.proxool.ProxoolDataSource"
destroy-method="close">
<property name="driver">
<value>${jdbc-1.proxool.driver-class}</value>
</property>
<property name="driverUrl">
<value>${jdbc-1.proxool.driver-url}</value>
</property>
<property name="user">
<value>${jdbc-1.user}</value>
</property>
<property name="password">
<value>${jdbc-1.password}</value>
</property>
<property name="alias">
<value>${jdbc-1.proxool.alias}</value>
</property>
<property name="prototypeCount">
<value>${jdbc-1.proxool.prototype-count}</value>
</property>
<property name="maximumConnectionCount">
<value>${jdbc-1.proxool.maximum-connection-count}</value>
</property>
<property name="minimumConnectionCount">
<value>${jdbc-1.proxool.minimum-connection-count}</value>
</property>
<property name="maximumActiveTime">
<value>${jdbc-1.proxool.maximum-active-time}</value>
</property>
<property name="simultaneousBuildThrottle">
<value>${jdbc-1.proxool.simultaneous-build-throttle}</value>
</property>
<!--
<property name="trace">
<value>${jdbc-1.proxool.trace}</value>
</property>
-->
<property name="verbose">
<value>${jdbc-1.proxool.verbose}</value>
</property>
<property name="statistics">
<value>${jdbc-1.proxool.statistics}</value>
</property>
<property name="houseKeepingTestSql">
<value>${jdbc-1.proxool.house-keeping-test-sql}</value>
</property>
</bean>
<bean id="transactionManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource" />
</bean>
<!-- 使用annotation定义事务 -->
<tx:annotation-driven transaction-manager="transactionManager" />
<!-- SpringContextHolder定义 -->
<bean class="com.netease.epay.common.module.spring.SpringContextHolder" lazy-init="false" />
<bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
<property name="configLocations">
<list>
<value>classpath:SqlMapConfig.xml</value>
<value>classpath:epay/common/SqlMapConfig.xml</value>
<value>classpath:epay/platform/SqlMapConfig.xml</value>
<value>classpath:epay/account/SqlMapConfig.xml</value>
<value>classpath:epay/trade/SqlMapConfig.xml</value>
<value>classpath:epay/core/SqlMapConfig.xml</value>
</list>
</property>
<property name="dataSource" ref="dataSource" />
</bean>
<bean id="sqlExecutor" class="com.netease.epay.common.module.orm.ibatis.LimitSqlExecutor">
<property name="dialect">
<bean class="com.netease.epay.common.module.orm.ibatis.dialect.OracleDialect" />
</property>
</bean>
<bean id="threadPool" class="com.netease.epay.common.module.pool.ThreadPool">
<property name="poolSize" value="${threadpool.size}"/>
</bean>
<bean id="springContextHolder" class="com.netease.epay.common.module.spring.SpringContextHolder">
</bean>
<bean id="transactionMailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
<property name="host">
<value>tmfast.mail.163.com</value>
</property>
<property name="port" value="25"/>
<property name="javaMailProperties">
<props>
<prop key="mail.smtp.auth">false</prop>
<prop key="mail.smtp.timeout">25000</prop>
</props>
</property>
<property name="username" value="kefu-epay@service.netease.com"/>
</bean>
<bean id="subcribeMailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
<property name="host">
<value>cmfast.mail.163.com</value>
</property>
<property name="port" value="25"/>
<property name="javaMailProperties">
<props>
<prop key="mail.smtp.auth">false</prop>
<prop key="mail.smtp.timeout">25000</prop>
</props>
</property>
<property name="username" value="kefu-epay@service.netease.com"/>
</bean>
<bean id="uploadFileTransferReceipt" class="com.netease.yfb.ctrol.viewctrl.upload.uploadsubclass.UploadFileTransferReceipt">
<property name="remoteDir" value="/transferReceipt" />
<property name="visitDir" value="/wyb/transferReceipt" />
<property name="maxUploadSize" value="1572864" />
</bean>
<bean id="ftpBusinessTechWyb" class="com.netease.yfb.business.common.FtpBusinessTechWyb" scope="prototype">
<property name="HOST" value="upload.ms.netease.com" />
<property name="PORT" value="21" />
<property name="USERNAME" value="tech_wyb" />
<property name="PASSWORD" value="ea5eiUUIO@#ALcajr" />
</bean>
<bean id="monitor" class="com.netease.om.Monitor"
factory-method="getInstance" init-method="init">
<constructor-arg>
<value>epay</value>
</constructor-arg>
<property name="xmppAddress">
<value>${epay.monitor.xmpp.address}</value>
</property>
<property name="xmppPort">
<value>${epay.monitor.xmpp.port}</value>
</property>
</bean>
<import resource="spring/limit-bean.xml" />
<import resource="spring/schedule.xml" />
<bean id="ftpUtil" class="com.netease.epay.module.common.utils.FtpUtil">
<constructor-arg index="0">
<value>${epay.ftp.address}</value>
</constructor-arg>
<constructor-arg index="1">
<value>${epay.ftp.port}</value>
</constructor-arg>
<constructor-arg index="2">
<value>${epay.ftp.username}</value>
</constructor-arg>
<constructor-arg index="3">
<value>${epay.ftp.password}</value>
</constructor-arg>
</bean>
<bean id="nosClient" class="com.netease.cloud.services.nos.NosClient">
<constructor-arg index="0">
<bean class="com.netease.cloud.auth.BasicCredentials">
<constructor-arg index="0" ><value>${nos.accessKey}</value></constructor-arg>
<constructor-arg index="1" ><value>${nos.secretKey}</value></constructor-arg>
</bean>
</constructor-arg>
</bean>
<import resource="rpc_dubbo.xml"/>
<bean id="refreshClientCacheProxy" class="XXX" init-method="init">
<property name="refUpdateTimeQueryService" ref="refUpdateTimeQueryService"/>
<property name="payWholeCacheService" ref="payWholeCacheService"/>
<property name="cacheCleanTimerInterval" value="${gate.local.cache.check.time}"/>
</bean>
为了兼容ibatis,我引入了Spring-orm 3.2.8
最佳答案
我找到了原因,我本来有一个 com.sun.xml.bind:jaxb-impl 2.0.5 然后 cxf-rt-frontend-jaxws 提供了一个 com.sun.xml.bind:jaxb-impl 2.2 .11.它们之间存在冲突。我去掉2.0.5版本后,效果很好
关于java - cxf 升级抛出 NoSuchFieldError : REFLECTION,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36742957/
我有: func NewMethodDescriptor(typ interface{}) *MethodDescriptor { reflectedMethod := reflect.Val
我需要确定地检查 reflect.Type 是否是一个错误。 错误没有反射(reflect)类型。在 go reflect 中检查类型错误的正式/惯用方式是什么? Go Playground Full
根据 reflect 文档 reflect.Value.MapIndex() 应返回一个 reflect.Value,它表示存储在 map 特定键处的数据的值.所以我的理解是以下两个表达式应该是相同的
与 reflect pkg 有点混淆 所有示例都使用 reflect.NewValue() 来获取 var 的 reflect.Value,但是 func NewValue 未记录在 http://g
在计算机语言的上下文中,我从未找到关于反射的词源的明确解释,所以我想在这里澄清一下。 “Reflection”源于拉丁语,有以下definitions : bend back turn back tu
我写了一个漂亮的函数,它可以接受 system.object ,反射(reflect)其属性并将对象序列化为 JSON 字符串。它看起来像这样: public class JSONSerializer
我正在尝试创建一个函数 import Language.Reflection foo : Type -> TT 我尝试使用reflect 策略: foo = proof { intro t
最近我和一位同事谈论 C++,感叹没有办法获取带有类字段名称的字符串并提取具有该名称的字段;换句话说,它缺乏反射(reflection)。他困惑地看着我,并问什么时候有人需要做这样的事情。 除了“嘿,
我正在考虑允许模块与属性文件中的类一起使用的想法;像 availableModules.properties Contact=org.addressbook.ContactMain Business=
这个问题特别与为具有大量字段的对象覆盖 equals() 方法有关。首先,让我说这个大对象不能在不违反 OO 原则的情况下分解成多个组件,所以告诉我“没有类应该有超过 x 个字段”无济于事。 继续前进
例子 router.Get(path, handler) // works fine methodStr = "Get" router.methodStr(path, handler) // e
我一直坚持使用反射库的问题。由于很多推荐,我决定使用它,但我只是在学习,有些部分并不是很容易.. 我有这部分代码: func countDataByName(sourceName string, s
我有一个包含一些 url 参数的特定结构,我想使用 reflect 构建一个 url 参数字符串以遍历结构字段,这样我就不会关心结构真正包含什么。 假设我有一个这样的结构: type Student
我正在尝试从 reflect.Value 中检索字符串值, 我希望 value.String()成为okok但我得到了相反。 我错过了什么吗? package main import ( "f
为了避免创建 org.reflections.Reflections 类的多个实例,我只想创建一个并根据需要重用。有谁知道这个类是否是线程安全的? 如果它不是线程安全的,我知道我可以使用 Java 的
我最近对引用、具体化和反射(reflection)感到困惑。有人可以很好地解释他们的关系和差异(如果有的话)吗? 最佳答案 引用 这可能是最简单的一个。考虑一下当您在 REPL 中键入以下内容时会发生
less main.go输出: ``` package main import ( "reflect" "net/url" "fmt" ) type User struct {
我在 golang 中使用 gorm 包 ( https://github.com/jinzhu/gorm ) 作为我的数据库库。我有很多类(数据库表),如“酒店”或“套餐”。复制代码不是好的编程习惯
我有代码 var t reflect.Type = LaunchController(route.controller) // create controller ptr . var
是否有可能以及如何在不从类型创建对象并调用它的情况下获取类型的 reflect.Type reflect.TypeOf(obj) Java 中的内容是:MyType.class 最佳答案 您可以使用以
我是一名优秀的程序员,十分优秀!