(SM-2311) Java Connector Troubleshooting

This document provides instructions and information on how to troubleshoot the most common problems related to Java connector setup.

Check if the Java connector is running

  1. Open transaction /DVD/JCO_MNG.

  2. On the left side of the screen, select the connector version that is being used.

  3. The status of the connector for the specific app.server can be seen on the right side of the screen.

Check Java logs

  1. Open transaction /DVD/JCO_MNG.

  2. On the left side of the screen, select the connector that is being used.

  3. On the right side of the screen, click logs to display Java logs.

In the selection screen, it is possible to set several parameters like the Date of the log, Number of lines, etc. It is also possible to select a specific filter for messages. Message filters are DEBUG, TRACE, INFO, WARN, ERROR. Click the display button to display logs.

The table of Java logs is displayed. It is possible to sort logs by each column and also refresh logs using the refresh button in the top left corner of the screen.

Possible issues

If the Java connector does not start, these are the possible issues. Even if Java does not start, some information can be sometimes seen in the logs. Click on the Logs button to check logs.

ACLs on SAP gateway do not allow registration of Java connector

Check ACLs in the SMGW transaction. Make sure that the program ID used in the setup is allowed to register on the gateway.

RFC and Java connector have incorrect program ID

Check Program ID in Config tab in /DVD/JCO_MNG. Make sure that the RFC that is connecting to this Java connector uses the same program ID.

RFC user has the wrong role assigned (enabling RFC communication)

Correct user role in transaction PFCG

RFC user has the wrong user type (not System user)

Correct user type in transaction SU01

RFC user does not exist or is locked

Create/unlock the user in transaction SU01

Java runtime environment is not suitable to run JCO

Please refer to main page regarding supported Java Runtime

Wrong settings

Double-check the setup in /DVD/JCO_MNG Config and Dependencies tab

Install directory doesn't exist

The latest versions of Storage Management create an installation directory on its own. In case you have an older version (<1903), make sure the directory exists

Execution of external commands does not work

Execution of external commands is facilitated by sapxpg utility (in SAP kernel). To test execution of sapxpg, run SM65 analysis tool.

CPU architecture is not x64

Make sure to download libsapjco3.so for relevant architecture and replace it in <installation_dir>/lib. The same is true for Java Runtime.

None of the above

To get maximum information in JCO log, set following additional parameters:

-Djco.trace_level=8
-Djco.trace_path=<directory_of_trace_files>

 

Try to manually start the JVM:

Oracle Java

su - <sid>adm
setenv INSTPATH <install_directory>
<java_binary> -Xmx2G
-Dlog4j.configurationFile=${INSTPATH}/log4j.xml
-javaagent:${INSTPATH}/dvd_java_connector.jar
-jar ${INSTPATH}/dvd_java_connector.jar
-conf ${INSTPATH}/config.jcoServer
-confDest ${INSTPATH}/config_as.jcoDestination 2>&1

 

Example:
setenv INSTPATH /usr/sap/EXC/D40/work/dvd_conn/jco232
/usr/sap/EXC/D40/work/dvd_conn/jco232/jdk-11.0.15_10-jre/bin/java -Xmx2G
-Dlog4j.configurationFile=${INSTPATH}/log4j.xml
-javaagent:${INSTPATH}/dvd_java_connector.jar
-jar ${INSTPATH}/dvd_java_connector.jar
-conf ${INSTPATH}/config.jcoServer
-confDest ${INSTPATH}/config_as.jcoDestination 2>&1

 

IBM Java

/usr/bin/java -Xmx2G
-Djava.security.debug=gssloginconfig,configfile,configparser,logincontext
-Dcom.ibm.security.jgss.debug=all
-Dcom.ibm.security.krb5.Krb5Debug=all
-Dlog4j.configurationFile=<install_dir>/log4j.xml
-jar <install_dir>/dvd_java_connector.jar
-conf <install_dir>/config.jcoServer
-confDest <install_dir>/config_as.jcoDestination
-log <install_dir>/custom_java.log