2 Replies Latest reply on Mar 6, 2008 7:11 AM by mruf@adobe

    CF7: Problem with commons-logging and complex web service

    mruf@adobe
      I am trying to call a complex web service from ColdFusion so I built a wrapper class using the stubs i created with wsdl2java. This works just fine when I run it from within Eclipse and I get a response from the web service.
      I then exported the whole thing as a jar and put it into C:\CFusionMX7\wwwroot\WEB-INF\lib. Now when I call the .cfm to instantiate the wrapper class with CreateObject, I get the following error:
      [1]org.apache.commons.logging.LogConfigurationException: java.lang.ClassCastException
      at org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:558)
      at org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:345)
      at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:409)
      at org.apache.axis.components.logger.LogFactory.getLog(LogFactory.java:76)
      at org.apache.axis.handlers.BasicHandler.<clinit>(BasicHandler.java:81)
      at org.apache.axis.client.Service.getAxisClient(Service.java:143)
      at org.apache.axis.client.Service.<init>(Service.java:152)
      ...

      To build the wrapper class, I used the axis libraries that came with ColdFusion 7 including the commons-logging-1.0.2.jar.
      By googling I found out that I am not the only one having this problem, but all the solutions posted online didn't help.
      I played around with the classpath settings in web.xml and jvm.config, but no luck. Even removing the commons-logging.jar in C:\CFusionMX7\wwwroot\WEB-INF\cfform\jars didn't help. The technote on this issue from Adobe doesn't help either.
      When I remove all instances of commons-logging*.jar I see a different reaction. But that also doesn't help me solve the puzzle.
      I mean I compiled the wrapper class with the commons-logging-1.0.2.jar and even ran it in Eclipse with this jar just fine. Why doesn't it work within CF?
      I'm sure someone solved this problem or has a workaround. Please =(