HP/UX SAP agent receives U2004982 Failed to load the SAP Java Connector

Document ID : KB000089948
Last Modified Date : 14/04/2018
Show Technical Document Details
Issue:
HP/UX SAP agent receives U2004982 Failed to load the SAP Java Connector
Resolution:
Detailed Description and Symptoms
When attempting to start an SAP agent on HP-UX, the agent fails to start and shows the following message:

U2004982 Failed to load the SAP Java Connector ('java.lang.ExceptionInInitializerError:JCO.classInitialize(): Could not load middleware layer 'com.sap.mw.jco.rfc.MiddlewareRFC'

JCO.nativeInit(): Could not initialize dynamic link library sapjcorfc [no sapjcorfc in java.library.path]. java.library.path 
 

[/opt/java6/jre/lib/IA64N:/opt/java6/jre/lib/IA64N/server:/opt/java6/jre/../lib/IA64N:.:/uc4/OM8/utilities/bin:/uc4/OM8/server/bin:/uc4/app/oracle/product/10.2.0/lib:/usr/lib:/lib:/uc4/instantclient/instantclient_10_2:.:/usr/lib:/lib:/uc4/OM8/utilities/bin:/uc4/OM8/server/bin:/uc4/app/oracle/product/10.2.0/lib:/uc4/app/oracle/product/10.2.0/lib32:/usr/lib]')

20110409/152140.822 - U2000041 Closing Agent 'SAP_AGENT'.

20110409/152140.823 - U2000002 UC4 Agent 'SAP_AGENT' version '8.00A000-000' ended abnormally.

 

 

 


Investigation
Look into the ucxjr3x.sh file or the start command used.  Because this is on HP-UX, the -d64 flag needs to be set in order to call 64-bit java.

Solution
Run the command:

java -d64 -jar ucxjr3x.jar

or place that command into the ucxjr3x.sh if used.