1 Reply Latest reply: Feb 13, 2013 2:04 PM by Jiri.Machotka-Oracle RSS

    Calling external Web Service from Custom IdcService

    Tapas Bose
      Hello Experts. I am having trouble to integrate a Web Service client with my custom component. I am using the client as jar file and I have placed this client jar inside the lib folder of my component along with its dependency jars. Also I have defined the classpath in the hda file of the component. The web service client has the following dependency:
      axis.jar
      commons-discovery-0.2.jar
      jaxrpc.jar
      saaj.jar
      org.apache.commons.logging_1.1.1.v201005080502.jar
      javax.wsdl_1.6.2.v201012040545.jar

      Now the problem I have is with the commons-logging. After adding these dependencies, creating the service, and restarting the server, when I am trying to execute the service I am getting following error:
      Unable to execute service method 'getCurrencies'. Exception type is 'java.lang.ExceptionInInitializerError'. Runtime error: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.

      I have also tried to remove the commons-logging dependency and then I got this error:
      org.apache.commons.logging.LogConfigurationException: Class org.apache.commons.logging.impl.Jdk14Logger does not implement Log

      I a unable to figure it out how can I integrate the client jar with the component. Any suggestion would be very helpful to me.

      Regards,
      Tapas
        • 1. Re: Calling external Web Service from Custom IdcService
          Jiri.Machotka-Oracle
          I have also tried to remove the commons-logging dependency and then I got this error:
          org.apache.commons.logging.LogConfigurationException: Class org.apache.commons.logging.impl.Jdk14Logger does not implement Log
          Seems like somewhere in your classpath there is another (older?) version, which does not implement the Log interface.

          Options you have:
          - replace the other version with yours (this can straightforward, but may turn out impossible)
          - redesign your code so that the Log interface is not needed - you may have to first find some info about the version you are forced to use