Jboss application using Rhino JavaScript fails to start
search cancel

Jboss application using Rhino JavaScript fails to start

book

Article ID: 141216

calendar_today

Updated On:

Products

CA Application Performance Management Agent (APM / Wily / Introscope) CA Application Performance Management (APM / Wily / Introscope) INTROSCOPE DX Application Performance Management

Issue/Introduction

 
Trying to monitor an application using Rhino JavaScript engine, 
 
When agent is activated, the application fails to run because logs lists errors. Then the JavaScript Engine fails to load.
 
13:56:53,997 ERROR [stderr] (LeasableContextPool-job-1-thread-1) ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider jdk.nashorn.api.scripting.NashornScriptEngineFactory not found
13:56:53,998 ERROR [stderr] (LeasableContextPool-job-1-thread-1) ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.sun.script.javascript.RhinoScriptEngineFactory not found
13:56:54,015 INFO [stdout] (ServerService Thread Pool -- 64) %PARSER_ERROR[wEx]%PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] Failed to create contexts
13:56:54,015 INFO [stdout] (ServerService Thread Pool -- 64) java.util.concurrent.ExecutionException: java.lang.NullPointerException: JavaScript engine not found

Environment

Release : 10.7.0

Component : APM Agents

Cause

Conflict with the Rhino JavaScript

Resolution



Potential workaround configuration to avoid agent conflict with the version of Rhino Javascript engine used by the application.

Removing the default guava.jar file did not work and replacing with the Rhino Javascript.

Back up the existing /core/ext/lib/guava.jar from the agent installation and then replace it with the version used by Rhino Javascript.