SAP Agent gets JCO_ERROR_ILLEGAL_ARGUMENT exception.

Document ID : KB000093487
Last Modified Date : 18/05/2018
Show Technical Document Details
Issue:
The SAP Agent on version 10.0.8. was getting the following exception randomly: 
U2000155 Internal error (Exception).
com.sap.conn.jco.JCoRuntimeException: (131) JCO_ERROR_ILLEGAL_ARGUMENT: JCoContext.end(): The passed destination instance is 'null', which is not allowed
    at com.sap.conn.jco.rt.Context.endSequence(Context.java:477)
    at com.sap.conn.jco.rt.JCoRuntime.endSequence(JCoRuntime.java:758)
    at com.sap.conn.jco.JCoContext.end(JCoContext.java:97)
    at com.uc4.ex.sap.ConnectionDescriptor.resetDestination(ConnectionDescriptor.java:130)
    at com.uc4.ex.sap.ConnectionDescriptor.refresh(ConnectionDescriptor.java:104)
    at com.uc4.ex.sap.ConnectionDescriptor.init(ConnectionDescriptor.java:98)
    at com.uc4.ex.sap.ConnectionDescriptor.<init>(ConnectionDescriptor.java:68)
    at com.uc4.ex.sap.SAPJob.execute(SAPJob.java:309)
    at com.uc4.ex.Job.run(Job.java:469)
    at com.uc4.ex.ThreadPool$RunnableDecorator.run(ThreadPool.java:53)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:622)
    at java.lang.Thread.run(Thread.java:745)
Environment:
SAP Agent version 10.0.8.
 
Cause:
Null parameter was passed in certain constellations.
Resolution:
We found out that development discovered this error themselves during testing for version 11.2.
It has been corrected in this version onwards.
To resolve this issue, please upgrade to the latest version of the SAP Agent, which is compatible with your Automation Engine version.