Java library/dependency errors with the xMatters Agent or Integration Agent

Problem

Running an xMatters Agent script based on a fresh installation generates library/dependency errors in the logs.

For example:

2020-01-07 15:24:24,321 736 [main] com.xmatters.xagent.services.ProxyConfiguration INFO --- Proxy setting: auto detect 
2020-01-07 15:24:24,399 736 [main] org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext WARN --- Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'proxyConfiguration': Invocation of init method failed; nested exception is java.lang.UnsatisfiedLinkError: C:\Windows\Temp\jna--466067545\jna16717576257690877345.dll: Can't find dependent libraries
2020-01-07 15:24:24,399 736 [main] org.eclipse.jetty.server.session INFO --- node0 Stopped scavenging
2020-01-07 15:24:24,399 736 [main] org.eclipse.jetty.server.handler.ContextHandler INFO --- Stopped o.s.b.w.e.j.JettyEmbeddedWebAppContext@37e0292a{application,/,[file:///C:/Windows/Temp/jetty-docbase.8974651665977573951.8081/],UNAVAILABLE}
2020-01-07 15:24:24,414 736 [main] org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener INFO ---

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2020-01-07 15:24:24,430 736 [main] org.springframework.boot.SpringApplication ERROR --- Application run failed
java.lang.UnsatisfiedLinkError: C:\Windows\Temp\jna--466067545\jna16717576257690877345.dll: Can't find dependent libraries
at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
at java.base/java.lang.ClassLoader$NativeLibrary.load(Unknown Source)
at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(Unknown Source)
at java.base/java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.base/java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.base/java.lang.Runtime.load0(Unknown Source)
......

Environment

All versions of xMatters

Solution

The Integration Agent and xMatters Agent have different Java requirements, and the version of Java you're using needs to be compatible with both applications. It's recommended to test the JRE before changing the Java version. The xMatters Agent can be tested using AdoptOpenJDK11 version of the JRE.

On Windows, the xMatters Agent installer includes a bundled Java runtime, so you do not need to install a separate JRE for that platform. On non-Windows systems, install a supported OpenJDK 11 distribution and use a current, supported build if older or unsupported Java releases are flagged during download or installation.

Cause

Incompatible Java versions. For more detailed information and recommendations, see the download sites for xMatters Agent or Integration Agent.

Advanced configuration

If both the xMatters Agent and Integration Agent run on the same host, you can install multiple JDKs or JREs and configure the xMatters Agent to use a specific Java 11 binary without changing the system Java. On Linux or UNIX-like systems, set the SPRINGBOOTAPP_JAVA variable in the /etc/xmatters/xa/xa.conf file to the full path of the Java 11 executable (for example, export SPRINGBOOTAPP_JAVA=/usr/lib/jvm/java-11-openjdk-11.x.y/bin/java), and back up the file before you edit it.

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.