Troubleshoot Java Agent JCo Plugin

This section describes steps for troubleshooting the most common issues when monitoring SAP Java applications using Java Agent and the JCo plugin.

Note: If the issues still persist even after you perform all checks as described in this section, then start the debug mode of the Java agent and attach all logs to the support ticket.

Java Agent and JCo Plugin Compatibility Issues

RFC Calls from Java to ABAP Are Not Correlated

Check JCo Plugin and Java Agent compatibility.

  • Java Agent versions 4.5.5 – 4.5.8 do not support sapjco.jar library used by JCo Plugin.
  • There are no compatibility issues in version 4.5.4 and earlier. The issue is fixed in 4.5.9.

RFC Calls from Java to ABAP Not Detected

Check if business transaction detection is configured for Java Agent.

  • RFC calls are detected only as exit calls during a business transaction.
  • Check call graphs in business transaction snapshots if JCo classes are called.
  • If there are no JCo classes in the call graph, then RFC calls are not executed within the business transaction.

Check Java Agent Logs if JCo Plugin is loaded

See log file Agent.<timestamp>.<num>.log :

[AD Thread Pool-Global898] 26 Mar 2019 09:53:26,700 WARN SDKJarValidator - *** WARNING *** Loading potentially unsigned SDK extension jar F:\AppDynamics\ver4.4.3.23530\ sdk-plugins\SAP_JCO_iSDK.jar.

[AD Thread Pool-Global898] 26 Mar 2019 09:53:27,023 INFO InstrumentationSdkPluginRuleApplier - Applying rules: SDK Rules for class F:\AppDynamics\ver4.4.3.23530\ sdk-plugins\SAP_JCO_iSDK.jar

Check if JCo classes are instrumented

See log file ByteCodeTransformer.<timestamp>.<num>.log:

[Service Runner [dsr]] 10 Mar 2019 00:23:49,704 INFO - Matching class name com/sap/mw/jco/ JCO$Client [ClassLoader]com.sap.engine.boot.loader.ResourceMultiParentClassLoader[hashcode]583765599 : Class match found.

[Service Runner [dsr]] 10 Mar 2019 00:23:49,710 INFO - Matching method execute ((Lcom/sap/mw/jco/JCO$Function;)V)

[Service Runner [dsr]] 10 Mar 2019 00:23:49,710 INFO - Applying method interceptor instrumentation.sdk.Generic at com/sap/mw/jco/ JCO$Client.execute ((Lcom/sap/mw/jco/JCO$Function;)V) id:147

Check if the number of instrumented classes reach the maximum limit

See log file ByteCodeTransformer.<timestamp>.<num>.log

Search log for: maximum 50 transformations exceeded for package prefix com.sap

Solution:

Increase limit of instrumented classes. Adjust the following Java Agent parameters:

  • node property: max-async-transformed-classes
  • value: (default is 100) increase it to 500
  • node property: max-async-transformed-classes-by-package
  • value: increase it to 500

Check for connection pool exhaustion

JCo Plugin causes exception: com.sap.conn.jco.JCoException: (106) JCO_ERROR_RESOURCE: Connection pool <connection pool name> is exhausted. The current pool size peak limit is 20 connections .

Solution:

Increase Max Pool Size and Max Connections in SAP Java stack settings. It is recommended to at least double the original values.

Check parallel stateless calls

JCo Plugin doesn't support Parallel Stateless RFC calls.

See log file Agent.<timestamp>.<num>.log :

[Thread-799] 15 Oct 2019 10:27:19,500 ERROR JCo3Interceptor - [4.5.1908.9] ERROR correlation of stateless parallel RFC is not supported (RFC FM: <Function module name>). Please add a new rule to file: /opt/appdynamics/appServerAgent/ver4.5.1.23676/sdk-plugins/jco-rules.xml, to disable the correlation .

com.sap.conn.jco.JCoRuntimeException: The context with the session id [...] scope type [null] is currently used in thread Thread-799 [0x190e] .Current thread is Thread-801 [0x1910].

Solution:

RFC Calls from Java to ABAP Are Not Correlated

If RFC calls are visible, but not correlated with ABAP backend.

Solution:

  • Check if ABAP backend has ABAP agent installed and configured.
  • Check if SAP user used in RFC destination has authorization role /DVD/APPD_JAVA assigned in ABAP backend, see SAP Authorizations.
  • Relevant error messages are written in the Java Agent log.

Node Name issues in SAP AS Java with More JVMs

SAP AS Java (PO, Portal, etc.) can use more than 1 JVM in scaled environments. Without additional parameters, the resulting Java Agents compete for a single node name.

Solution: Add the following JVM parameter to Java Agent startup parameter list: -Dappdynamics.agent.nodeName=$SAPINFO

Java Agent Conflicts with Wily

SAP AS Java (PO, Portal, etc.) can have Wily Introscope implemented and running. Additional parameters and settings are required for starting Java Agent.

Solution:

  • Use the following JVM parameters to Java Agent startup parameter list:
    • -Dallow.unsigned.sdk.extension.jars=true

    • -Dorg.osgi.framework.bootdelegation=com.singularity

    • -Dappdynamics.bciengine.should.implement.new.interfaces=false

  • Add the following rules in Java Agent app-agent-conf file:

    <custom-exclude filter-type="STARTSWITH" filter-value="com/sap/engine/core/cluster/impl6/p2pnio/P2PConnectorImpl"/>
    <custom-exclude filter-type="STARTSWITH" filter-value="com.sap.engine.core.cluster.impl6.p2pnio.P2PConnectorImpl"/>
    <custom-exclude filter-type="STARTSWITH" filter-value="com/wily/*"/>
    <custom-exclude filter-type="STARTSWITH" filter-value="com.wily.*"/>