Fault condition Description
System abbreviation |
OSGi Based business Application system |
Fault Name |
System in the customer production environment: websphere7.0, OSGi-based application system, the external system calls the WebService service provided by the system Soapmessagefactory class loading exception, resulting in the WebService service can not be called normally. |
Fault function point |
WebService Service |
Key exceptions |
caused by:java.lang.NoClassDefFoundError:com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_ 1Impl (initialization failure) ???? At Java.lang.J9VMInternals.initialize (j9vminternals.java:140) ~[na:1.6.0] ???? At Java.lang.J9VMInternals.newInstanceImpl (Native Method) ~[na:1.6.0] ???? At Java.lang.Class.newInstance (class.java:1345) ~[na:1.6.0] ???? At Javax.xml.soap.FactoryFinder.newInstance (factoryfinder.java:70) ~[na:1.6.0] ???? At Javax.xml.soap.FactoryFinder.find (factoryfinder.java:109) ~[na:1.6.0] ???? At Javax.xml.soap.MessageFactory.newInstance (messagefactory.java:119) ~[na:1.6.0] ???? At Org.apache.cxf.binding.soap.saaj.SAAJInInterceptor.getFactory (saajininterceptor.java:88) ~[ CXF-BUNDLE-MINIMAL-2.2.9.JAR:2.2.9] ???? At Org.apache.cxf.binding.soap.saaj.SAAJInInterceptor.handleMessage (saajininterceptor.java:100) ~[ CXF-BUNDLE-MINIMAL-2.2.9.JAR:2.2.9]. |
Impact Range |
The WebService function provided by this system cannot be called externally. |
Fault occurrence time |
2016-02-18 16:31:34.608 |
Fault level |
Serious |
?
- Analysis and resolution
When the service is invoked, CXF processes the message through this abstract class javax. xml.soap.MessageFactory Load this messagefactory implementation class, the load logic is:
- from system.getproperty ("Javax.xml.soap.MessageFactory") Gets the specified implementation class.
- If the first step is not taken from the java_home/lib/ jaxm.properties The configuration of the javax.xml.soap.MessageFactory item in the properties file .
- if the above two steps are taken, the current ClassLoader loading of non-system Jar in the file ( meta-inf/services/javax.xml.soap.messagefactory )
- If none of the above methods are taken, the default load is: Com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl class
com.sun.xml.internal.* Package is Sun JDK provides a default implementation that provides a WebService project, you need to refer to the Saaj related packages and load such profiles according to the middleware environment:
as WebSphere The following configurations can be used in the environment:
???? Websphere_ws.context.properties
Javax.xml.soap.messagefactory=com.sun.xml.messaging.saaj.soap.ver1_1.soapmessagefactory1_1impl
and the WebLogic Environment:
???? weblogic_ws.context.properties
javax.xml.soap.MessageFactory = Com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl
???? When the business system is initialized and started, the above file is loaded according to the middleware and read its configuration to set it to the System properties: System.setproperty (Key,value)
Analysis Report of service invocation Saaj package load problem in WebSphere OSGi application environment