• 1 reply
  • Latest Post - ‏2010-03-18T09:18:20Z by greycell
3 Posts

Pinned topic iice client NoClassDefFound

‏2009-10-16T13:01:49Z |
Using iice 8.4 in websphere 6.1.

com.venetica.vbr.client.Content.saveNewFromStreams() throws an exception:

Servlet Error-WriteDocument: java.lang.NoClassDefFoundError: org.apache.commons.httpclient.methods.PutMethod (initialization failure)
at java.lang.J9VMInternals.initialize(
at com.venetica.vbr.httpaccess.HttpAccessUtil.putRequest(
at com.venetica.vbr.client.Content.uploadToURL(
at com.venetica.vbr.client.Content.saveNewFromStreams(

The class PutMethod is available in vbr.jar, in fact it appears the whole apache commons-httpclient-3.1 has been included in vbr.jar.

My guess is the PutMethod cannot be instantiated because its super class tries to instantiate a logger:

private static final Log LOG = LogFactory.getLog(EntityEnclosingMethod.class);

..and while vbr.jar also includes the whole commons-logging there is another version of commons-logging higher in the classloader hierarchy used
by websphere itself.

We have tried moving vbr.jar down to the application level classloader and configure the loader to "application first". This fixes NoClassDefFound
issue but causes a lot of other problems.

What is the right way to install vbr.jar without causing conflicts with other logging apis in websphere - if that indeed is the problem?
Updated on 2010-03-18T09:18:20Z at 2010-03-18T09:18:20Z by greycell
  • greycell
    1 Post

    Re: iice client NoClassDefFound

    instead of fiddling with individual jars beyond what the documentation says to get from Application Engine,

    copy these to the lib folder in IICE HOME

    both of the jars are under Websphere runtimes directory.

    You will find that life becomes much simpler!