NoClassDefFoundError: sun/org/mozilla/javascript/internal/NativeArray trying to use Mozilla Rhino in JBoss EAP 6

Solution Verified - Updated -

Issue

  • In our app we use Mozilla Rhino and need to access sun.org.mozilla.javascript.internal.NativeArray class, which is part of Sun's rt.jar runtime. When running our app inside JBoss EAP 6, it complained:
NoClassDefFoundError: sun/org/mozilla/javascript/internal/NativeArray
Reason: sun.org.mozilla.javascript.internal.NativeArray from [Module "deployment.engine.ear.engine-common.jar:main" from Service Module Loader]

Environment

  • JBoss Enterprise Application Platform (EAP)
    • 6.x

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