Agent SAP UCEX_R forces trace with NullPointerException SAPHost.getHostProperties

book

Article ID: 220697

calendar_today

Updated On:

Products

CA Automic One Automation

Issue/Introduction

A new Agent SAP was installed and a R3 Connection Object assigned to it, when starting the Agent, it automatically stops down generating the following errors: 


20210720/114856.014 - U00003620 Routine 'UCEX_R' forces trace because of error.
20210720/114856.015 - U02000048 TRACE file opened with flags '0000000000000001', max.trace: '9', memory trace: '0', search type: 'S', search string: ''.
20210720/114856.051 - U00003449 Output to the TRACE file is finished.

In the trace file, we can see the following trace:

java.lang.ExceptionInInitializerError
        at com.uc4.ex.sap.UCXJR3X.events(UCXJR3X.java:147)
        at com.uc4.ex.AdminRoutine.sendExInfo(AdminRoutine.java:114)
        at com.uc4.ex.AdminRoutine.aliveCheck(AdminRoutine.java:91)
        at com.uc4.ex.MessageDispatcher.consumeMessage(MessageDispatcher.java:305)
        at com.uc4.ex.MessageDispatcher.dispatchLogicalMessage(MessageDispatcher.java:163)
        at com.uc4.ex.cp.CPConnection.dispatch(CPConnection.java:966)
        at com.uc4.ex.cp.CPConnection.access$300(CPConnection.java:74)
        at com.uc4.ex.cp.CPConnection$3.run(CPConnection.java:896)
        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:745)
Caused by: java.lang.NullPointerException
        at java.util.Hashtable.put(Hashtable.java:459)
        at java.util.Properties.setProperty(Properties.java:166)
        at com.uc4.ex.sap.SAPHost.getHostProperties(SAPHost.java:1250)
        at com.uc4.ex.sap.ConnectionDescriptor.<init>(ConnectionDescriptor.java:80)
        at com.uc4.ex.sap.SAPEventHandler.<init>(SAPEventHandler.java:83)
        at com.uc4.ex.sap.SAPEventHandler.<clinit>(SAPEventHandler.java:43)
        ... 14 more

If we assign another R3 Connection Object to this Agent that is working fine for another SAP Agent, the issue is not encountered, so it points out to an issue in the new R3 Connection Object.

 

Cause

The issue with the agent SAP startup was caused by a wrong configuration in the R3 Connection Object - the System ID was set to 67 instead of the correct System Name which was PMP, see link to the documentation

This could be seen in the Agent SAP Log when it stopped automatically generating this error:

20210720/131944.713 - U02000107 Connection object 'CONN.R3.PS4' with time stamp '1626768898000' was successfully transferred to the Agent.
...
20210720/131944.940 - U02004165 Connection 'CONN.R3.PS4' param 'rfcLb_host=pmptest.domain.com'
...
20210720/131944.941 - U02004165 Connection 'CONN.R3.PS4' param 'rfcLb_group=PMP-LOGON'
...
20210720/131944.942 - U02004165 Connection 'CONN.R3.PS4' param 'rfcLb_system_name=67'

20210720/131944.944 - U00003620 Routine 'UCEX_R' forces trace because of error.

Environment

Release : 12.x

Component : AUTOMATION ENGINE

Sub-Component: Agent SAP

Resolution

The solution consists on fixing the R3 Connection Object parameter System ID which should be a 3 characters name.