IBM Support

PM20275: AN "AXISFAULT: TWO SERVICES CANNOT HAVE THE SAME NAME" ERROR MIGHT OCCUR WHEN A JAX-WS CLIENT RUNS

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • In a multi-threaded client environment, this exception might
    occur:
    
    org.apache.axis2.AxisFault: Two services cannot have same
    name. A service with the HelloWorldService.HelloWorldPort name
    already exists in the system.
     at
    org.apache.axis2.client.ServiceClient.configureServiceClient(Ser
    viceClient.java:142)
     at
    org.apache.axis2.client.ServiceClient.<init>(ServiceClient.java:
    125)
     at
    org.apache.axis2.jaxws.description.impl.EndpointDescriptionImpl.
    getServiceClient(EndpointDescriptionImpl.java:1018)
     at
    org.apache.axis2.jaxws.description.impl.EndpointDescriptionImpl.
    <init>(EndpointDescriptionImpl.java:232)
     at
    org.apache.axis2.jaxws.description.impl.EndpointDescriptionImpl.
    <init>(EndpointDescriptionImpl.java:189)
     at
    org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.u
    pdateEndpointDescription(ServiceDescriptionImpl.java:317)
     at
    org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl.u
    pdateEndpoint(DescriptionFactoryImpl.java:241)
     at
    org.apache.axis2.jaxws.description.DescriptionFactory.updateEndp
    oint(DescriptionFactory.java:102)
     at
    org.apache.axis2.jaxws.spi.ServiceDelegate.getPort(ServiceDelega
    te.java:243)
     at
    org.apache.axis2.jaxws.spi.ServiceDelegate.getPort(ServiceDelega
    te.java:218)
     at javax.xml.ws.Service.getPort(Service.java:120)
            ...
    

Local fix

  • N/A
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  Users of IBM WebSphere Application          *
    *                  Server Feature Pack for Web                 *
    *                  Services JAX-WS clients                     *
    ****************************************************************
    * PROBLEM DESCRIPTION: An AxisFault might occur when a JAX-WS  *
    *                      client invokes                          *
    *                      javax.xml.ws.Service.getPort().         *
    ****************************************************************
    * RECOMMENDATION:  Install a fixpack containing this APAR and  *
    *                  related APAR PK84622.                       *
    ****************************************************************
    In a multi-threaded client environment, even with APAR PK84622
    applied, an exception like this might occur:
    
    "org.apache.axis2.AxisFault: Two services cannot have same
    name. A service with the HelloWorldService.HelloWorldPort
    name already exists in the system."
    
    PK84622 fixed a problem when multiple clients were trying to
    call the same web service. Multiple threads tried to create an
    AxisService using a name that was already taken to create a
    previous AxisService; each AxisService represented the same
    web service. However, in this case, the clients try to call
    different web services represented by services and ports with
    identical localpart names, but defined in different
    namespaces, or accessible through different endpoint
    addresses.
    
    For example, client A tries to call the web service
    whose WSDL is defined like the following:
    
    <wsdl:definitions targetNamespace="http://hello.world/"
      xmlns="http://schemas.xmlsoap.org/wsdl/"
      xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
      ...
      <service name="HelloWorldService">
        <port name="HelloWorldPort"
    binding="tns:HelloWorldPortBinding">
          <soap:address
    location="http://myhost.com/service/HelloWorld"/>
        </port>
      </service>
    </definitions>
    
    While client B tries to call a separate web service whose WSDL
    looks like this:
    
    <wsdl:definitions
    targetNamespace="http://hello.world/different/namespace/"
      xmlns="http://schemas.xmlsoap.org/wsdl/"
      xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
      ...
      <service name="HelloWorldService">
        <port name="HelloWorldPort"
    binding="tns:HelloWorldPortBinding">
          <soap:address
    location="http://myhost.com/service/HelloWorldPortType"/>
        </port>
      </service>
    </definitions>
    

Problem conclusion

  • Additional synchronization was added to the JAX-WS engine to
    prevent multiple threads from attempting to create different
    AxisService objects with the same name.
    
    The same fix is included in V7 under APAR PK88797.
    
    The fix for this APAR is currently targeted for inclusion in
    fix pack 6.1.0.35.  Please refer to the Recommended Updates
    page for delivery information:
    http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
    

Temporary fix

Comments

APAR Information

  • APAR number

    PM20275

  • Reported component name

    WEBSERVIC FEATU

  • Reported component ID

    5724J0850

  • Reported release

    610

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2010-08-10

  • Closed date

    2010-08-19

  • Last modified date

    2010-08-19

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    WEBSERVIC FEATU

  • Fixed component ID

    5724J0850

Applicable component levels

  • R610 PSY

       UP

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"6.1","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
10 February 2022