It's completely broken: missing org/mozilla/javascript/tools/shell/Main

Bug #93885 reported by Christian Holtje
30
Affects Status Importance Assigned to Milestone
rhino (Ubuntu)
Fix Released
Unknown
Unassigned

Bug Description

Binary package hint: rhino

What Happens:
  at the command line, type "rhino" and you get:
  Exception in thread "main" java.lang.NoClassDefFoundError: org/mozilla/javascript/tools/shell/Main

What I Expect:
  # rhino
  @IMPLEMENTATION.VERSION@
  js>

  Well, okay, that's the version from edgy. It should really have a version number there between the @, but I can live with that if it *works*

Notes:
  It looks like parts of the jar is missing...
  # unzip -t /usr/share/java/js.jar | grep -E org.mozilla.javascript.tools
  returns nothing.

Ciao!

Revision history for this message
Benjamin C. Wiley Sittler (bsittler) wrote :

i can confirm this in feisty:

$ rhino
Exception in thread "main" java.lang.NoClassDefFoundError: org.mozilla.javascript.tools.shell.Main
   at gnu.java.lang.MainThread.run(libgcj.so.70)
Caused by: java.lang.ClassNotFoundException: org.mozilla.javascript.tools.shell.Main not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:/usr/share/java/js.jar], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
   at java.net.URLClassLoader.findClass(libgcj.so.70)
   at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.70)
   at java.lang.ClassLoader.loadClass(libgcj.so.70)
   at java.lang.ClassLoader.loadClass(libgcj.so.70)
   at gnu.java.lang.MainThread.run(libgcj.so.70)
$ unzip -l /usr/share/java/js.jar | fgrep -i tools # no output...
$ apt-cache show rhino
Package: rhino
Priority: optional
Section: interpreters
Installed-Size: 584
Maintainer: Ubuntu Core Developers <email address hidden>
Original-Maintainer: Debian Java Maintainers <email address hidden>
Architecture: all
Version: 1.6.R5-0ubuntu1
Depends: java-gcj-compat | java1-runtime | java2-runtime
Suggests: rhino-doc
Filename: pool/main/r/rhino/rhino_1.6.R5-0ubuntu1_all.deb
Size: 487672
MD5sum: c6ff406eee7b3351d6b1e50d74299559
SHA1: 8e1a96115f0cfc79e803e8aa5b82941ec817d752
SHA256: 4947c8359209281df1f7f53c2bd0277293b1adf49e055370130b19c7e0300bfd
Description: JavaScript engine written in Java
 Rhino is an open-source implementation of JavaScript written
 entirely in Java. It is typically embedded into Java applications
 to provide scripting to end users.
Bugs: mailto:<email address hidden>
Origin: Ubuntu

Revision history for this message
CL (christian-lawrence-deactivatedaccount) wrote :

A work-around for fiesty while the bug is addressed, essentially involves re-packaging the rhino package from source. The steps are as follows:

Install package building dependencies:
# sudo apt-get install fakeroot debhelper cdbs java-gcj-compat-dev

Get the source:
# apt-get source rhino

Revert the toolsrc patch:
# cd rhino-1.6R5/
# rm debian/patches/02-dont_build-toolsrc.patch

Build:
# dpkg-buildpackage -rfakeroot

Install:
# cd ..
# sudo dpkg -i rhino_1.6.R5-0ubuntu1_all.deb

You may have to avoid updating the official distribution of the rhino package for a while, atleast until a version newer than 1.6R5-0ubuntu1 is released. Keep a copy of your re-packaged rhino .deb file because if you inadventently do update, then remove/purge the update and install the re-packaged .deb is required.

Hope this helps :D

Changed in rhino:
status: Unconfirmed → Confirmed
Revision history for this message
Chuck Short (zulcss) wrote :

Fixed in gutsy

Revision history for this message
Matthias Klose (doko) wrote :

Please reqeust a sync from Debian; it's already fixed there.

Revision history for this message
Yu Kobayashi (mail-yukoba) wrote :

This is not fixed in Gutsy!

I did this to fix this problem.

Copy original Rhino's js.jar to /usr/share/java/js-1.6R7.jar

Then,
sudo rm /usr/share/java/js.jar
sudo ln -s /usr/share/java/js-1.6R7.jar /usr/share/java/js.jar

Revision history for this message
Sarah Kowalik (hobbsee-deactivatedaccount) wrote :

requested a sync for hardy.

Revision history for this message
Luca Falavigna (dktrkranz) wrote :

This should be fixed in Hardy.

Changed in rhino:
importance: Undecided → Unknown
status: Confirmed → Fix Released
Revision history for this message
Cory Wright (corywright) wrote :

Are there plans to actually fix this in Gutsy? I'm experiencing the problem as well. Having everyone re-package rhino seems a bit harsh.

Revision history for this message
Yu Kobayashi (mail-yukoba) wrote :

Rhino is main package in Feisty. I also wish, this problem will be fixed in Feisty and Gutsy.

Revision history for this message
Tiago M. Vieira (tmoreira) wrote :

The description created by CL has solved the problem on my system (Gutsy). (https://bugs.edge.launchpad.net/ubuntu/+source/rhino/+bug/93885/comments/2)

But the ant package should be included as well.

>>Install package building dependencies:
>># sudo apt-get install fakeroot debhelper cdbs java-gcj-compat-dev ant
>>
>>......

Revision history for this message
budenzauber (ajfrenzel) wrote :

Applying this fix causes freemind to hang while starting up in its splash screen.

Reinstalling freemind didn't fix the problem.

Revision history for this message
budenzauber (ajfrenzel) wrote :

Eclipse is also broken.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.