java.lang.NoClassDefFoundError: com/google/common/collect/MapMakerInternalMap$Strength when running custom pyton script with jython-eap6

Solution In Progress - Updated -

Issue

  • We have a same Jython script that’s executed on two different redaht release: redhat 6.5 and redhat 6.6
    On ReadHat 6.5 the script is working fine.

The only difference we see between the two servers is the version of the Jython package.
On RedHat 6.5 it’s jython-eap6-2.5.2-5.redhat_2.ep6.el6.4.noarch
On Redhat 6.6 it’s jython-eap6-2.5.2-6.redhat_3.1.ep6.el6.noarch

On version 6.6 it gives us the following error:

java -classpath /opt/app/jboss/bin/client/jboss-cli-client.jar:/usr/share/java/jython-eap6/jython-standalone.jar org.python.util.jython
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/collect/MapMakerInternalMap$Strength
        at org.python.google.common.collect.MapMaker.weakKeys(MapMaker.java:267)
        at org.python.core.PyType.fromClass(PyType.java:1280)
        at org.python.core.PyObject.<init>(PyObject.java:66)
        at org.python.core.PyBuiltinCallable.<init>(PyBuiltinCallable.java:21)
        at org.python.core.PyBuiltinMethod.<init>(PyBuiltinMethod.java:16)
        at org.python.core.PyBuiltinMethodNarrow.<init>(PyBuiltinMethodNarrow.java:24)
        at org.python.core.PyType$type___subclasses___exposer.<init>(Unknown Source)
        at org.python.core.PyType$PyExposer.<init>(Unknown Source)
        at org.python.core.PyType.<clinit>(PyType.java)
        at org.python.core.PyObject.<init>(PyObject.java:66)
        at org.python.core.PyBuiltinCallable.<init>(PyBuiltinCallable.java:21)
        at org.python.core.PyBuiltinMethod.<init>(PyBuiltinMethod.java:16)
        at org.python.core.PyBuiltinMethodNarrow.<init>(PyBuiltinMethodNarrow.java:24)
        at org.python.core.PyDataDescr$getset_descriptor___get___exposer.<init>(Unknown Source)
        at org.python.core.PyDataDescr$PyExposer.<init>(Unknown Source)
        at org.python.core.PyDataDescr.<clinit>(PyDataDescr.java)
        at org.python.core.PyBuiltinCallable$PyExposer.<init>(Unknown Source)
        at org.python.core.PyBuiltinCallable.<clinit>(PyBuiltinCallable.java)
        at org.python.core.PyObject$PyExposer.<init>(Unknown Source)
        at org.python.core.PyObject.<clinit>(PyObject.java)
        at org.python.util.jython.run(jython.java:150)
        at org.python.util.jython.main(jython.java:129)
Caused by: java.lang.ClassNotFoundException: com.google.common.collect.MapMakerInternalMap$Strength
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        ... 22 more

Environment

Red Hat Enterprise Linux (RHEL) 6.6
Red Hat 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