Getting Provider com.sun.script.javascript.RhinoScriptEngineFactory not found ERROR in EAP 6 running on Java 8

Solution Verified - Updated -

Issue

  • While running JBoss EAP 6.3.3 with Oracle Java (jdk1.8u40) we get the following ERROR in the server.log file:

    ERROR [stderr] (http-/127.0.0.1:8080-1) ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.sun.script.javascript.RhinoScriptEngineFactory not found
    
  • The java-script evaluation is successfully running with nashorn engine but the log entry is confusing our operations and we are not sure if we will get some problems with this. This issue can be easily reproduced by running the following kind of code inside the EAP 6.3.3:

  • Example index.jsp, on accessing the below index.jsp via this url "http://localhost:8080/Java8Test/" and getting the above ERROR in the `server.log:

    <%@ page import="javax.script.ScriptEngineManager" %>
    <%@ page import="javax.script.ScriptEngineFactory" %>
    <%@ page import="javax.script.ScriptEngine" %>
    <%
        ScriptEngine engineByName = new ScriptEngineManager().getEngineByName("JavaScript");
        System.out.println("ScriptEngine using getEngineByName = " + engineByName);
    %>
    

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.3.3
    • 6.4.x
  • Using ScriptEngine on Java 8

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content