Analysis Report of service invocation Saaj package load problem in WebSphere OSGi application environment

Source: Internet
Author: User
Tags soap

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

?

    1. 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:

  1. from system.getproperty ("Javax.xml.soap.MessageFactory") Gets the specified implementation class.
  2. 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 .
  3. 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 )
  4. 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.