- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试将我的项目升级到 java 15。在尝试启动服务器时,我在 bean 创建过程中遇到错误。
util-context.xml:
<beans:bean id="dummyAdaptor" class="org.dummy.adaptor.DummyAdaptor"></beans:bean>
<beans:bean id = "soapRequestProcessorWithAction" class="org.dummy.adaptor.request.processor.SOAPRequestProcessorWithAction" />
<beans:bean id="soapWebServiceTemplate" class="org.springframework.ws.client.core.WebServiceTemplate">
<beans:property name="marshaller" ref="marshaller" />
<beans:property name="unmarshaller" ref="unmarshaller" />
</beans:bean>
虚拟适配器.java:
private SOAPRequestProcessorWithAction<CTRMProcessRequest, CTRMProcessResponse> soapRequestProcessorWithAction;
SOAPRequestProcessorWithAction.java:
@Autowired
@Qualifier("soapWebServiceTemplate")
private WebServiceTemplate webServiceTemplate;
错误:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'dummyAdaptor': Unsatisfied dependency expressed through field 'soapRequestProcessorWithAction'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'soapRequestProcessorWithAction': Unsatisfied dependency expressed through field 'webServiceTemplate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'soapWebServiceTemplate' defined in class path resource [util-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.ws.client.core.WebServiceTemplate]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Invocation of init method failed; nested exception is org.springframework.ws.soap.SoapMessageCreationException: Could not create SAAJ MessageFactory: Unable to create SAAJ meta-factory: Provider com.sun.xml.internal.messaging.saaj.soap.SAAJMetaFactoryImpl not found; nested exception is javax.xml.soap.SOAPException: Unable to create SAAJ meta-factory: Provider com.sun.xml.internal.messaging.saaj.soap.SAAJMetaFactoryImpl not found
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:643)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1415)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:608)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:531)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
...
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'soapRequestProcessorWithAction': Unsatisfied dependency expressed through field 'webServiceTemplate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'soapWebServiceTemplate' defined in class path resource [util-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.ws.client.core.WebServiceTemplate]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Invocation of init method failed; nested exception is org.springframework.ws.soap.SoapMessageCreationException: Could not create SAAJ MessageFactory: Unable to create SAAJ meta-factory: Provider com.sun.xml.internal.messaging.saaj.soap.SAAJMetaFactoryImpl not found; nested exception is javax.xml.soap.SOAPException: Unable to create SAAJ meta-factory: Provider com.sun.xml.internal.messaging.saaj.soap.SAAJMetaFactoryImpl not found
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:643)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1415)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:608)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:531)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1367)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1287)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640)
... 60 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'soapWebServiceTemplate' defined in class path resource [util-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.ws.client.core.WebServiceTemplate]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Invocation of init method failed; nested exception is org.springframework.ws.soap.SoapMessageCreationException: Could not create SAAJ MessageFactory: Unable to create SAAJ meta-factory: Provider com.sun.xml.internal.messaging.saaj.soap.SAAJMetaFactoryImpl not found; nested exception is javax.xml.soap.SOAPException: Unable to create SAAJ meta-factory: Provider com.sun.xml.internal.messaging.saaj.soap.SAAJMetaFactoryImpl not found
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1318)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1216)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:571)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:531)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1367)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1287)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640)
... 73 more
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.ws.client.core.WebServiceTemplate]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Invocation of init method failed; nested exception is org.springframework.ws.soap.SoapMessageCreationException: Could not create SAAJ MessageFactory: Unable to create SAAJ meta-factory: Provider com.sun.xml.internal.messaging.saaj.soap.SAAJMetaFactoryImpl not found; nested exception is javax.xml.soap.SOAPException: Unable to create SAAJ meta-factory: Provider com.sun.xml.internal.messaging.saaj.soap.SAAJMetaFactoryImpl not found
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:225)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1310)
... 84 more
Caused by: org.springframework.beans.factory.BeanCreationException: Invocation of init method failed; nested exception is org.springframework.ws.soap.SoapMessageCreationException: Could not create SAAJ MessageFactory: Unable to create SAAJ meta-factory: Provider com.sun.xml.internal.messaging.saaj.soap.SAAJMetaFactoryImpl not found; nested exception is javax.xml.soap.SOAPException: Unable to create SAAJ meta-factory: Provider com.sun.xml.internal.messaging.saaj.soap.SAAJMetaFactoryImpl not found
at org.springframework.ws.support.DefaultStrategiesHelper.instantiateBean(DefaultStrategiesHelper.java:188)
at org.springframework.ws.support.DefaultStrategiesHelper.getDefaultStrategies(DefaultStrategiesHelper.java:134)
at org.springframework.ws.support.DefaultStrategiesHelper.getDefaultStrategy(DefaultStrategiesHelper.java:219)
at org.springframework.ws.support.DefaultStrategiesHelper.getDefaultStrategy(DefaultStrategiesHelper.java:203)
at org.springframework.ws.client.core.WebServiceTemplate.initMessageFactory(WebServiceTemplate.java:353)
at org.springframework.ws.client.core.WebServiceTemplate.initDefaultStrategies(WebServiceTemplate.java:342)
at org.springframework.ws.client.core.WebServiceTemplate.<init>(WebServiceTemplate.java:130)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:64)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:212)
... 86 more
Caused by: org.springframework.ws.soap.SoapMessageCreationException: Could not create SAAJ MessageFactory: Unable to create SAAJ meta-factory: Provider com.sun.xml.internal.messaging.saaj.soap.SAAJMetaFactoryImpl not found; nested exception is javax.xml.soap.SOAPException: Unable to create SAAJ meta-factory: Provider com.sun.xml.internal.messaging.saaj.soap.SAAJMetaFactoryImpl not found
at org.springframework.ws.soap.saaj.SaajSoapMessageFactory.afterPropertiesSet(SaajSoapMessageFactory.java:165)
at org.springframework.ws.support.DefaultStrategiesHelper.instantiateBean(DefaultStrategiesHelper.java:185)
... 98 more
**Caused by: javax.xml.soap.SOAPException: Unable to create SAAJ meta-factory: Provider com.sun.xml.internal.messaging.saaj.soap.SAAJMetaFactoryImpl not found**
at javax.xml.soap.SAAJMetaFactory.getInstance(SAAJMetaFactory.java:112)
at javax.xml.soap.MessageFactory.newInstance(MessageFactory.java:150)
at org.springframework.ws.soap.saaj.SaajSoapMessageFactory.afterPropertiesSet(SaajSoapMessageFactory.java:143)
... 99 more
根据我在网上找到的解决方案,我添加了下面提到的依赖。
compile group: 'com.sun.xml.messaging.saaj', name: 'saaj-impl', version: '2.0.0'
然而在
saaj-impl.jar
SAAJMetaFactoryImpl.class
在当前位置
com.sun.xml.messaging.saaj.soap.SAAJMetaFactoryImpl
而不是
com.sun.xml.internal.messaging.saaj.soap.SAAJMetaFactoryImpl
.
最佳答案
可能你现在已经解决了这个问题,但为了将来引用:
com.sun.xml.internal.messaging.saaj.soap.SAAJMetaFactoryImpl
是SAAJMetaFactory
的名字分布在 JRE 中,直到 Java SE 8。它是当没有实现 javax.xml.soap.SAAJMetaFactory
时使用的默认工厂。在类路径上找到。在我看来,这是一个错误:外部 jakarta.xml.soap-api
jar,不应该回退到 API 的内部 JRE 实现,而是抛出一个异常,指出没有找到实现。 saaj-impl-2.0.0
到类路径。然而,这是新的 Jakarta EE 9 标准的一部分并使用 jakarta
而不是 javax
作为前缀(即它包含 jakarta.xml.soap.SAAJMetaFactory
的实现)。切换到 1.5.2 版,一切正常。 关于java - 无法创建 SAAJ 元工厂 : Provider com. sun.xml.internal.messaging.saaj.soap.SAAJMetaFactoryImpl not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65791963/
我的基于 SAAJ 的客户端生成以下 XML 并将其发送到 .NET Web 服务: temp123 temp321 baby000 20 我遇到的问题是,对于 Authentic
我正在尝试将我的项目升级到 java 15。在尝试启动服务器时,我在 bean 创建过程中遇到错误。 util-context.xml: 虚拟适配器.java: private
我有以下错误: Exception: javax.xml.soap.SOAPException: javax.xml.soap.SOAPException: Message send failed:
在我的网络应用程序中,我正在联系一个网络服务(使用 JAX-WS),但我收到以下错误: java.lang.ExceptionInInitializerError at com.sun.xml
我正在创建一个与 Web 服务通信的程序,该程序是使用 JSP 和 Struts 编写的。但是当我想创建一个新的 web 服务实例时,出现以下错误: SEVERE: Servlet.service()
我尝试使用 从 String 创建一个 Soap Envelope SOAPPart().setContent(Source). 我尝试从同一条消息中获取 SOAPBody,但它抛出异常 SEVERE
我想通过 https 调用 Web 服务,并且需要包含客户端证书。我正在用 SAAJ 来做这件事 SOAPConnectionFactory soapConnectionFactory = SOAPC
我有一个基本的 SOAP 服务端点,实际上是 SAP ECC,提供一个服务。我已经使用 SOAPUI 4.5 测试了该服务,并且使用 HTTP Auth 可以正常工作,从事物的外观来看是先发制人的。我
我们需要发送非常巨大的 SOAP 消息(多部分、MTOM),比如大约 1 或 2 GB。有时该过程会出现以下 OOM: java.lang.OutOfMemoryError: Java Heap Sp
我有一个与解析 SOAP 消息相关的问题。 这是消息: ------=_Part_3_5438437.1107262647279 Content-Type: text/xml
我目前正在为我的应用程序使用 Tomcat 服务器,pom.xml 中的以下代码为我提供了适用于 soap 1.2 协议(protocol)的 SAAJ 1.3 版。但是当我们将服务器迁移到 webs
我尝试在 jquery 中向第三方发送 SOAP 请求,但总是出现此错误: soap:ClientProblems creating SAAJ object model 我这样做的方法是将几个标记传递
SAAJ: SOAP with Attachments API for Java MTOM: SOAP消息传输优化机制 我的简单理解:它们处理 SOAP 附件,MTOM 是 SAAJ 的更优化版本。它
我正在使用 SAAJ java 制作一个 Web 服务客户端。我是客户,我询问网络服务的信息。但网络服务受到用户名和密码的保护。 我不知道如何添加这两个。 我在我的代码中尝试了它(请参阅命令),但没有
我正在尝试将一些数据发布到远程计算机,但它返回错误 ns1:Client.NoSOAPAction no SOAPAction header! 我的猜测是我发送 header 元素的方式
SAAJ 基于 DOM,即文档对象模型。这句话是什么意思? AXIOM 基于 StAX,即 XML 的流 API。这句话是什么意思? 哪个更好? 我想澄清关于这两个 API 的概念。谢谢你 最佳答案
我一直致力于创建一个基于 SAAJ 的客户端。一切似乎都工作正常,直到我实现了将附件作为 Web 服务请求的一部分发送的逻辑。 Web 服务操作很简单 - 它需要一个用于文件位置的字符串元素和一个用于
这两个 SOAP 消息有效吗?不同的部分是 namespace 属性 xmlns="http://www.sigvalue.com/acc"。第一个 soap 是一个示例,第二个由 java 代码生成
我正在创建一个没有轴的网络服务。我正在使用 SAAJ、JAXB 和 Servlet。我可以使用 JAXB 正确编码和解码一个类。但是我怎样才能将 SAAJ 和 JAXB 一起用于 SOAP 通信。我想
我正在寻找替代的 SOAP (javax.xml.soap) 实现,而不是 Sun SAAJ .这样做的原因是因为我想在 IBM JDK 5 驱动的 Tomcat AS 上部署 JAX-WS WebS
我是一名优秀的程序员,十分优秀!