Axis做的Service客户端部署在weblogic上兼容问题 .

前端之家收集整理的这篇文章主要介绍了Axis做的Service客户端部署在weblogic上兼容问题 .前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
昨天部署应用时才发现问题,应用中新加的Axis做的客户端在WebLogic Server 版本: 10.3.5.0上报错具体的堆栈信息如下:


  1. 2013-05-1813:23:49,580[TIBCOEMSSessionDispatcher(9350847568)]ERROR[gov.chinapost.ems.ebay.services.impl.OutPartnerServiceImpl]-;nestedexceptionis:
  2. java.lang.NullPointerException
  3. AxisFault
  4. faultCode:{http://schemas.xmlsoap.org/soap/envelope/}Server.userException
  5. faultSubcode:
  6. faultString:java.lang.NullPointerException
  7. faultActor:
  8. faultNode:
  9. faultDetail:
  10. {http://xml.apache.org/axis/}stackTrace:java.lang.NullPointerException
  11. atorg.apache.axis.message.MessageElement.addTextNode(MessageElement.java:1388)
  12. atorg.apache.axis.message.SOAPHandler.addTextNode(SOAPHandler.java:148)
  13. atorg.apache.axis.message.SOAPHandler.endElement(SOAPHandler.java:112)
  14. atorg.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
  15. atorg.apache.xerces.parsers.AbstractSAXParser.endElement(UnknownSource)
  16. atorg.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(UnknownSource)
  17. atorg.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(UnknownSource)
  18. atorg.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(UnknownSource)
  19. atorg.apache.xerces.parsers.XML11Configuration.parse(UnknownSource)
  20. atorg.apache.xerces.parsers.XML11Configuration.parse(UnknownSource)
  21. atorg.apache.xerces.parsers.XMLParser.parse(UnknownSource)
  22. atorg.apache.xerces.parsers.AbstractSAXParser.parse(UnknownSource)
  23. atorg.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(UnknownSource)
  24. atorg.apache.xerces.jaxp.SAXParserImpl.parse(UnknownSource)
  25. atorg.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
  26. atorg.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
  27. atorg.apache.axis.Message.getSOAPEnvelope(Message.java:435)
  28. atorg.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
  29. atorg.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
  30. atorg.apache.axis.client.Call.invokeEngine(Call.java:2784)
  31. atorg.apache.axis.client.Call.invoke(Call.java:2767)
  32. atorg.apache.axis.client.Call.invoke(Call.java:2443)
  33. atorg.apache.axis.client.Call.invoke(Call.java:2366)
  34. atorg.apache.axis.client.Call.invoke(Call.java:1812)
  35. atcom.ebay.apacshipping.ems.ShippingServiceSoapStub.updateOrderStatus(ShippingServiceSoapStub.java:225)
  36. atgov.chinapost.ems.ebay.services.impl.OutPartnerServiceImpl.receiveMessage(OutPartnerServiceImpl.java:139)
  37. atgov.chinapost.ems.msg.adapter.jms.impl.MessageReceiver$1.onMessage(MessageReceiver.java:75)
  38. atcom.tibco.tibjms.TibjmsSession._submit(TibjmsSession.java:3567)
  39. atcom.tibco.tibjms.TibjmsSession._dispatchAsyncMessage(TibjmsSession.java:1963)
  40. atcom.tibco.tibjms.TibjmsSession$Dispatcher.run(TibjmsSession.java:3098)
  41. {http://xml.apache.org/axis/}hostname:dmz-app-03
虽然在网上找到的有解决办法但是对于我这边服务器来说都不太适合我,因为他们要修改weblogic的启动脚本什么的,毕竟一个weblogic上不可能只部署一个应用,那么多的应用对于我来说是未知的,所以我不能冒险去改公共用的资源,问题的根本原因就是saaj.jar,如果应用中还有其他接口是用axis2做的话(毕竟不是一个人写的每个人都有习惯所以一个应用上有两种Service的方法)应该有geronimo-saaj_1.3_spec-1.0.1.jar包,我的是后者,这个包跟weblogic本身的webservices.jar中的javax.xml.soap包重复,我很奇怪weblogic为什么要把别人的包拷贝到自己的包里面,然后包路径什么都没改,这样就造成了冲突,如果你的应用的weblogic.xml中加的有<prefer-web-inf-classes>true</prefer-web-inf-classes>的话,就表示weblogic会先加载应用中的jar包最后加载自己的jar包,我的是配的true。这个时候我就想到了一个解决办法,把weblogic的webservices.jar包拷贝到我的项目中,然后把包里面的javax.xml.soap给删除掉,这样保证weblogic一定会先加载geronimo-saaj_1.3_spec-1.0.1.jar或saaj.jar包,重新部署,启动就OK了。
原文链接:https://www.f2er.com/ajax/165332.html

猜你在找的Ajax相关文章