AE- Web Service Agent Down after running for awhile with java error java.lang.NoClassDefFoundError

Document ID : KB000102445
Last Modified Date : 26/06/2018
Show Technical Document Details
Issue:
RA Webservice Agent go down after running for awhile.

Webservice log: 
java.lang.NoClassDefFoundError: org/apache/commons/codec/DecoderException
    at org.apache.commons.httpclient.HttpMethodBase.<init>(HttpMethodBase.java:220)
    at org.apache.commons.httpclient.methods.ExpectContinueMethod.<init>(ExpectContinueMethod.java:93)
    at org.apache.commons.httpclient.methods.EntityEnclosingMethod.<init>(EntityEnclosingMethod.java:119)
    at org.apache.commons.httpclient.methods.PostMethod.<init>(PostMethod.java:106)
    at com.sun.jersey.client.apache.ApacheHttpClientHandler.getHttpMethod(ApacheHttpClientHandler.java:200)
    at com.sun.jersey.client.apache.ApacheHttpClientHandler.handle(ApacheHttpClientHandler.java:173)
    at com.sun.jersey.api.client.Client.handle(Client.java:648)
    at com.sun.jersey.api.client.ClientHandler$handle.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:124)
    at REST.runRest(WebService.groovy:3347)
    at REST.this$4$runRest(WebService.groovy)
    at REST$this$4$runRest.callCurrent(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:157)
    at REST.runJob(WebService.groovy:3589)
    at com.uc4.extensibility.types.CITAgent.dispatchJob(CITAgent.java:258)
    at com.uc4.ex.cit.CITJob.execute(CITJob.java:195)
    at com.uc4.ex.Job.run(Job.java:466)
    at com.uc4.ex.ThreadPool$RunnableDecorator.run(ThreadPool.java:53)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.codec.DecoderException
    at com.uc4.extensibility.util.ExtensibleFrameworkClassLoader.loadClass(ExtensibleFrameworkClassLoader.java:1054)
    at com.uc4.extensibility.util.ExtensibleFrameworkClassLoader.loadClass(ExtensibleFrameworkClassLoader.java:1082)
    ... 27 more
Cause:
lack of commons-codec.jar in the lib folder.
Resolution:
  • Download the package from here: http://commons.apache.org/proper/commons-codec/download_codec.cgi.
Rename your newly downloaded library file from "commons-codec-1.11.jar" to "commons-codec.jar" 
  • Copy the downloaded library into both the .\lib and the .\inner_jarfiles folder of the agent's bin.
  • Restart your agent and try again.