weblogic.webservice.core.soap.MessageFactoryImpl 无法转换为 javax.xml.soap.MessageFactory
当我在 weblogic 中部署 Web 服务客户端应用程序时,遇到以下错误。 [此应用程序在 tomcat 中运行没有任何问题。]
无法解析对 bean“saajSoapMessageFactory”的引用 设置构造函数参数;嵌套异常是 org.springframework.beans.factory.BeanCreationException:错误 创建类路径中定义的名为“saajSoapMessageFactory”的 bean 资源 [.../core/ws/ws-config.xml]:调用 init 方法 失败的;嵌套异常是 org.springframework.ws.soap.SoapMessageCreationException:无法 创建 SAAJ MessageFactory:无法为 SOAP 创建消息工厂: weblogic.webservice.core.soap.MessageFactoryImpl 无法转换为 javax.xml.soap.MessageFactory;嵌套异常是 javax.xml.soap.SOAPException:无法创建消息工厂 SOAP:无法转换 weblogic.webservice.core.soap.MessageFactoryImpl 到 javax.xml.soap.MessageFactory
这里是 ws-config.xml 中的 bean 定义
(bean id="saajSoapMessageFactory" class="org.springframework.ws.soap.saaj.SaajSoapMessageFactory")
我尝试搜索这个问题,但不幸的是找不到任何解决方案。我在 spring 配置中缺少任何内容吗?以前有人遇到过这个问题吗?
I am stuck with the following error when I deploy my web-services client application in weblogic. [This application has been working without any issues in tomcat.]
Cannot resolve reference to bean 'saajSoapMessageFactory' while
setting constructor argument; nested exception is
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'saajSoapMessageFactory' defined in class path
resource [.../core/ws/ws-config.xml]: Invocation of init method
failed; nested exception is
org.springframework.ws.soap.SoapMessageCreationException: Could not
create SAAJ MessageFactory: Unable to create message factory for SOAP:
weblogic.webservice.core.soap.MessageFactoryImpl cannot be cast to
javax.xml.soap.MessageFactory; nested exception is
javax.xml.soap.SOAPException: Unable to create message factory for
SOAP: weblogic.webservice.core.soap.MessageFactoryImpl cannot be cast
to javax.xml.soap.MessageFactory
Here is the bean definition in ws-config.xml
(bean id="saajSoapMessageFactory" class="org.springframework.ws.soap.saaj.SaajSoapMessageFactory")
I tried searching for this issue, but unfortunately could not find any solution. Am I missing anything in the spring config? Has any one faced this issue before?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我还没有遇到过这种情况 - 但发生的情况是 Weblogic 使用它自己的 MessageFactoryImpl 默认值
检查您的 weblogic 启动日志,您将看到一些参数设置,例如
您可以尝试 2 个选项(我不知道哪个会起作用,尝试一下 在
A)
您的客户端中,自行将这些设置为 Spring 等效项
B) 将所需版本作为 startWeblogic.cmd 中的
-D
参数传递-Djavax.xml.soap.MessageFactory=org.springframework.ws.soap.saaj.SaajSoapMessageFactory
并将 saaj jar 添加到 weblogic 类路径中。
I've not come across this - but what's happening is that Weblogic uses it's own default for the MessageFactoryImpl
Check your weblogic startup logs and you will see some parameters set such as
You can try 2 options (I dont know which will work, try it out)
A)
In your client, set these yourself to the Spring equivalents
B) Pass your required version as a
-D
parameter in the startWeblogic.cmd-Djavax.xml.soap.MessageFactory=org.springframework.ws.soap.saaj.SaajSoapMessageFactory
and add saaj jars to the weblogic classpath.