Agent reference

Documentation / Java Edition / User Guide / Appendix / Agent reference

This chapter provides a quick reference to the MyARM agent bindings and describes possible error codes and log messages.

Java Language Binding

Error return codes

The following error codes apply only to the MyARM Java agent. Additionally error codes from the MyARM C agent can be returned from the Java agent since MyARM Java agent is JNI based. This is indicated by an JNI error: prefix.

This is not really an error code; it indicates that the operation succeeded successfully.
MyARM tried to allocate some memory but this failed.
An ArmTransaction, ArmTranReport or an ArmTransactionWithMetrics was created with a null ArmTransactionDefinition instance.
An ArmTransactionDefinition or an ArmMetricDefinition was created with a null ArmApplicationDefinition instance.
Either creating an ArmApplicationDefinition, ArmTransactionDefinition or an ArmMetricDefinition the mandatory name was not provided (null pointer).
The ArmMetric and ArmMetricDefinition does not match or is unknown.
A null byte array was passed to the constructor of ArmID or to the setBytes() of ArmToken.
A null application instance was passed to the constructor of ArmTranReport, ArmTransaction or ArmTransactionWithMetrics.
A null application instance was passed to the constructor of ArmTranReport, ArmTransaction or ArmTransactionWithMetrics.
Context values and metrics are managed as arrays within the MyARM agent. An index passed to MyARM was out of bounds.
Attempt to use an object from a different ARM implementation. This mostly fails because this implementation relies on opaque characteristics of its own implementation objects. Object-level interoperability with other ARM implementations is not provided here.
MyARM tried to get a resource but the limit for the resource (transaction instance or metric instance) was reached.
Within the Java JNI code an invaid argument was detected. Please report this error code to the MyARM support.
Within the Java JNI code a required MyARM java class could not be found. Please make sure you provided the current myarm.jar to the JVM. If the myarm.jar and MyARM C agent are from the same version please report this error code to the MyARM support.

Creating ARM 4.0 objects

The Java language binding standard defines a vendor independent way for creating ARM objects. Within ARM 4.0 there are three factory classes a ARM implementation has to provide. The class names of these factory classes are provided by the Java property concept. To use MyARM ARM 4.0 java agent please use the following factory class names:


MyARM ARM 4.0 jar file

Once you configured the MyARM specific factory names you need to provide the MyARM implementation classes to the java virtual machine. This is done by appending the MyARM JAR (myarm.jar) archive to the CLASSPATH environment variable.

export CLASSPATH=$CLASSPATH:$MYARM_ROOT/lib/jar/myarm.jar