cancel
Showing results for 
Search instead for 
Did you mean: 

Java Mapping: No implementation defined for org.apache.commons.logging.LogFactory

iaki_vila
Active Contributor
0 Kudos

Hi all,

I'm trying to send a MTOM attachment in PI 7.0 to a third party WS. From SOAPui works right.

A) First attempt

First of all i have tried to use SOAP AXIS adapter. With this adapter the attachment reaches the end system but the PDF attachment in any way is corrupted because the service doesn't respond with the expected payload, may be the MTOM encapsulation, may be the PDF, i can't get a exact exception or error. In PI no exception is showed in CC monitoring, sxi_monitors, and so on.

I have in the PI the required components installed correctly (Checked in http://host:port/XIAxisAdapter/MessageServlet😞

•    Apache-Axis

•    Jakarta-Commons Discovery

•    Jakarta-Commons Logging

I haven't the optional installed, i think the Apache WSS4J should to be, this is another shoot to try.


2. Second attempt

On the other hand i've developed a java mapping to do this. Runs perfectly in NWDS  (i have  the NWDS with the same patch level that the PI) and in my local machine.. When  i upload the java mapping and all the AXIS libraries and a test in Interface Mapping i get the next exception:


java.lang.ExceptionInInitializerError at java.lang.J9VMInternals.initialize(J9VMInternals.java:218) at org.apache.axis.handlers.BasicHandler.<clinit>(BasicHandler.java:43) at java.lang.J9VMInternals.initializeImpl(Native Method) at java.lang.J9VMInternals.initialize(J9VMInternals.java:196) at java.lang.J9VMInternals.initialize(J9VMInternals.java:161) at java.lang.J9VMInternals.initialize(J9VMInternals.java:161) at org.apache.axis.client.Service.getAxisClient(Service.java:104) at org.apache.axis.client.Service.<init>(Service.java:113)...

The trace shows more own development and sap classes, but the interesting comes at the final:

Caused by: org.apache.commons.discovery.DiscoveryException: No implementation defined for org.apache.commons.logging.LogFactory at org.apache.commons.discovery.tools.ClassUtils.verifyAncestory(ClassUtils.java:176) at org.apache.commons.discovery.tools.SPInterface.verifyAncestory(SPInterface.java:201) at org.apache.commons.discovery.tools.SPInterface.newInstance(SPInterface.java:195) at org.apache.commons.discovery.tools.DiscoverClass.newInstance(DiscoverClass.java:579) at org.apache.commons.discovery.tools.DiscoverSingleton.find(DiscoverSingleton.java:418) at org.apache.commons.discovery.tools.DiscoverSingleton.find(DiscoverSingleton.java:378) at org.apache.axis.components.logger.LogFactory$1.run(LogFactory.java:45) at java.security.AccessController.doPrivileged(AccessController.java:197) at org.apache.axis.components.logger.LogFactory.getLogFactory(LogFactory.java:41) at org.apache.axis.components.logger.LogFactory.<clinit>(LogFactory.java:33) at java.lang.J9VMInternals.initializeImpl(Native Method) at java.lang.J9VMInternals.initialize(J9VMInternals.java:196)

I am stuck here because in the commons-logging-1.0.4.jar or the commons-logging-1.2.jar  i can find this class.

1. Any idea for the Java Mapping?. The error occurs when i try to create the Locator object:

//...

TratamientoPdfServiceLocator locator = new TratamientoPdfServiceLocator ();

//...

And in the locator class:

public class TratamientoPdfServiceLocator extends org.apache.axis.client.Service implements tratamientopdf.services.TratamientoPdfService {

    // Use to get a proxy class for TratamientoPdfServiceHttpSoap11Endpoint

    private final java.lang.String TratamientoPdfServiceHttpSoap11Endpoint_address = "xxxx";

   

    public java.lang.String getTratamientoPdfServiceHttpSoap11EndpointAddress() {

        return TratamientoPdfServiceHttpSoap11Endpoint_address;

    }

2. Any idea because the AXIS adapter sends an incorrect MTOM attachement?. May be is it necessary all of them?

Regards,

Accepted Solutions (1)

Accepted Solutions (1)

iaki_vila
Active Contributor
0 Kudos

Hi all,

Finally, i have fixed up using the standard AXIS adapter. It was a misunderstood mine about the AXIS MTOM functionality. The AXIS adapter needs a tag with the base64 content, i thought that i could use an attachment and to refer this attachment with an XOP tag or similar but it seems that the AXIS adapter can't find the way to encapsulate the attachment in MTOM (although no exception is showed). With the a tag with the file in base64, using afreq key with the property wsdl.url and setting the value with the URL with the wsdl, the adapter knows in what tag to find the base64 to convert to MTOM.

Regards.

Answers (1)

Answers (1)

former_member192892
Active Contributor
0 Kudos

Hi Iñaki Vila,

I have tried calling webservice from mapping using axis libraries before and I was stuck as well. The axis jars internally refer xmls and property files within the package and something gets corrupted in classpath. I tried placing the axis jars in the java/etc folder of server to auto include them in the classpath and I failed there as well.

I can say the safest option is to use them in a module. No problems of class referencing and everything works.

Regards

Varun