我正在从cxf 2.2.6升级到3.1.11。
升级时我得到如下例外
BaseApplication.main:591 {31/05/2017 05:11:03.117}>>错误
EXCEPTION { 原因:org.springframework.beans.factory.BeanCreationException:创建名为'(内部bean)#73c8985f'的bean时出错:通过工厂方法进行Bean实例化失败;嵌套异常是org.springframework.beans.BeanInstantiationException:无法实例化[java.util.Map]:工厂方法'createTLSServerParametersMap'抛出异常;嵌套异常是java.lang.RuntimeException:无法创建安全的XMLInputFactory 消息:创建名为'org.apache.cxf.transport.http_jetty.JettyHTTPServerEngineFactory'的bean时出错:无法创建类型为[org.apache.cxf.transports.http_jetty.configuration.TLSServerParametersIdentifiedType]的内部bean'(内部bean)#73c8985f'设置构造函数参数时;嵌套异常是org.springframework.beans.factory.BeanCreationException:创建名为'(内部bean)#73c8985f'的bean时出错:通过工厂方法进行的Bean实例化失败;嵌套 异常是org.springframework.beans.BeanInstantiationException:无法实例化[java.util.Map]:工厂方法'createTLSServerParametersMap'抛出 例外;嵌套异常是java.lang.RuntimeException:无法创建安全的XMLInputFactory 类:org.springframework.beans.factory.BeanCreationException 堆栈:{ [0] org.springframework.beans.factory.support.BeanDefinitionValueResolver(resolveInnerBean:313) [1] org.springframework.beans.factory.support.BeanDefinitionValueResolver(resolveValueIfNecessary:129) [2] org.springframework.beans.factory.support.ConstructorResolver(resolveConstructorArguments:634) [3]在org.springframework.beans.factory.support.ConstructorResolver(autowireConstructor:140) [4]在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory(autowireConstructor:1137) [5] org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory(createBeanInstance:1040) [6]在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory(doCreateBean:504) [7] org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory(createBean:476) [8] org.springframework.beans.factory.support.AbstractBeanFactory $ 1(getObject:303) [9] org.springframework.beans.factory.support.DefaultSingletonBeanRegistry(getSingleton:230) [10] org.springframework.beans.factory.support.AbstractBeanFactory(doGetBean:299) [11] org.springframework.beans.factory.support.AbstractBeanFactory(getBean:194) [12] org.springframework.beans.factory.support.DefaultListableBeanFactory(preInstantiateSingletons:755) [13] org.springframework.context.support.AbstractApplicationContext(finishBeanFactoryInitialization:762) [14] org.springframework.context.support.AbstractApplicationContext(refresh:480) [15]在org.apache.cxf.bus.spring.BusApplicationContext $ 1(运行:107) [16]在org.apache.cxf.bus.spring.BusApplicationContext $ 1(运行:105) [17]在java.security.AccessController(doPrivileged) [18]在org.apache.cxf.bus.spring.BusApplicationContext(:105) [19]在org.apache.cxf.bus.spring.BusApplicationContext(:96) [20]在org.apache.cxf.bus.spring.BusApplicationContext(:78)
表示属性文件中的输入为
<httpj:engine-factory bus="cxf">
<httpj:engine port="0">
<httpj:threadingParameters minThreads="15" maxThreads="50" />
</httpj:engine>
</httpj:engine-factory>
以前它曾经与cxf 2.2.6一起使用,但升级后我遇到了这个问题。
我的类路径中有stax2-api-3.1.4.jar和woodstox-core-asl-4.4.1.jar,但由于嵌套异常是java.lang.RuntimeException,因此无法创建安全的XMLInputFactory
从我的属性文件中删除此配置对我来说不是一个选项。因为我在删除配置时消除了错误
所以有人可以建议我一个可能的解决方案
提前致谢 拉胡