Public bug reported:

If the default Java is OpenJDK7, rhino crashs with a
java.lang.NoClassDefFoundError for java.lang.invoke.MethodHandle. The
java.lang.invoke package is part of the new invokedynamic feature
introduced in Java 7.

It looks the problem is in the shell script that launches rhino
(/usr/bin/rhino). It assumes that if you're running OpenJDK, you want
the OpenJDK6 runtime library:

#!/bin/sh

JAVA_CMD="/usr/bin/java"
JAVA_OPTS=""
JAVA_CLASSPATH="/usr/share/java/js.jar:/usr/share/java/jline.jar"
JAVA_MAIN="org.mozilla.javascript.tools.shell.Main"

## Fix for #512498
## Change Bootclasspath when using OpenJDK because OpenJDK6
## bundle his own release of Rhino.
## References:
## <https://bugs.launchpad.net/ubuntu/+source/openjdk-6/+bug/255149>
## <http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=179>
## <http://www.openoffice.org/issues/show_bug.cgi?id=91641>
isOpenJDK=`$JAVA_CMD -version 2>&1 | grep -i "OpenJDK" | wc -l`
if [ $isOpenJDK -gt 0 ]
then
        JAVA_OPTS="-Xbootclasspath:/usr/lib/jvm/java-6-openjdk/jre/lib/rt.jar"
fi

$JAVA_CMD $JAVA_OPTS -classpath $JAVA_CLASSPATH $JAVA_MAIN "$@"

A simple fix is to modify this shell script to include the correct
version of rt.jar.

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: rhino 1.7R3-2 [modified: usr/share/doc/rhino/changelog.Debian.gz]
ProcVersionSignature: Ubuntu 3.0.0-15.26-generic-pae 3.0.13
Uname: Linux 3.0.0-15-generic-pae i686
NonfreeKernelModules: nvidia
ApportVersion: 1.23-0ubuntu4
Architecture: i386
Date: Wed Jan 25 21:50:22 2012
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 10.04.1 LTS "Lucid Lynx" - Release i386 (20100816.1)
PackageArchitecture: all
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: rhino
UpgradeStatus: Upgraded to oneiric on 2011-10-20 (97 days ago)

** Affects: rhino (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: apport-bug i386 oneiric running-unity

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/921916

Title:
  rhino crashes with NoClassDefFoundError on OpenJDK7

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/rhino/+bug/921916/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to