春季-无法将weblogic.webservice.core.soap.MessageFactoryImpl强制转换为javax.xml.soap.MessageFactory
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了春季-无法将weblogic.webservice.core.soap.MessageFactoryImpl强制转换为javax.xml.soap.MessageFactory,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含1843字,纯文字阅读大概需要3分钟。
内容图文
![春季-无法将weblogic.webservice.core.soap.MessageFactoryImpl强制转换为javax.xml.soap.MessageFactory](/upload/InfoBanner/zyjiaocheng/655/e044fc966eb74f4ca94235bf5f8e0742.jpg)
当我在weblogic中部署Web服务客户端应用程序时,遇到以下错误. [此应用程序一直在运行,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
这是ws-config.xml中的bean定义
(bean id="saajSoapMessageFactory" class="org.springframework.ws.soap.saaj.SaajSoapMessageFactory")
我尝试搜索此问题,但不幸的是找不到任何解决方案.我在春季配置中缺少任何东西吗?有人遇到过这个问题吗?
解决方法:
我还没有遇到过-但是发生的是Weblogic对MessageFactoryImpl使用了它自己的默认值
检查您的weblogic启动日志,您将看到一些参数设置,例如
javax.xml.rpc.ServiceFactory = weblogic.webservice.core.rpc.ServiceFactoryImpl
javax.xml.soap.MessageFactory = weblogic.webservice.core.soap.MessageFactoryImpl
您可以尝试2个选项(我不知道哪个可行,请尝试一下)
一种)
在您的客户中,将自己设置为Spring等效项
System.setProperty("javax.xml.soap.MessageFactory", "org.springframework.ws.soap.saaj.SaajSoapMessageFactory");
System.setProperty( "javax.xml.rpc.ServiceFactory", "** Spring version **");
B)在startWeblogic.cmd中将所需版本作为-D参数传递
-Djavax.xml.soap.MessageFactory = org.springframework.ws.soap.saaj.SaajSoapMessageFactory
并将saaj jars添加到weblogic的类路径中.
内容总结
以上是互联网集市为您收集整理的春季-无法将weblogic.webservice.core.soap.MessageFactoryImpl强制转换为javax.xml.soap.MessageFactory全部内容,希望文章能够帮你解决春季-无法将weblogic.webservice.core.soap.MessageFactoryImpl强制转换为javax.xml.soap.MessageFactory所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。