java library not found

Bug #91237 reported by Istvan Szekeres
32
This bug affects 1 person
Affects Status Importance Assigned to Milestone
iriverter (Ubuntu)
Fix Released
High
Unassigned
meta-kde (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: iriverter

fresh install, starting from command line:

% iriverter
!!! An unhandled exception occured: class java.lang.UnsatisfiedLinkError
--- iriverter 0.16
---
--- Settings:
---
---
!!! no swt-pi-gtk-3235 in java.library.path
!!!
!!! java.lang.ClassLoader.loadLibrary(ClassLoader.java:1517)
!!! java.lang.Runtime.loadLibrary0(Runtime.java:788)
!!! java.lang.System.loadLibrary(System.java:834)
!!! org.eclipse.swt.internal.Library.loadLibrary(Library.java:123)
!!! org.eclipse.swt.internal.gtk.OS.<clinit>(OS.java:22)
!!! org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:63)
!!! org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:54)
!!! org.eclipse.swt.widgets.Display.<clinit>(Display.java:126)
!!! org.thestaticvoid.iriverter.ConverterUI.<init>(ConverterUI.java:28)
!!! org.thestaticvoid.iriverter.ConverterUI.main(ConverterUI.java:666)
!!!
Exception in thread "main" java.lang.NoClassDefFoundError
        at org.thestaticvoid.iriverter.ConverterUI.main(ConverterUI.java:675)

% dpkg -l libswt3.2-gtk-java iriverter
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-================-================-================================================
ii iriverter 0.16-0ubuntu2 converts video for use on various multimedia pla
ii libswt3.2-gtk-ja 3.2.1-2ubuntu1 Fast and rich GUI toolkit for Java, gtk2 version

This is a regression caused by iriverter 0.16-0ubuntu2.

WORKAROUND:
Append ":/usr/lib/jni" after the -Djava.library.path part. The line should now be:
java -Djava.library.path=$LD_LIBRARY_PATH:${exec_prefix}/lib:/usr/lib/jni -classpath $CLASSPATH:${prefix}/share/java/iriverter.jar:/usr/lib/java/swt.jar org.thestaticvoid.iriverter.ConverterUI $*

Related branches

Revision history for this message
Richard Bailey (rmjb) wrote :

Hello, what version of the iriverter package were you using when this error occurred? iriverter was recently updated to 0.16-0ubuntu2

Also any more details about your installation that might help, such as the version of java-gcj-compat and libswt3.2-gtk-java that you have installed.

Changed in iriverter:
status: Unconfirmed → Needs Info
Revision history for this message
Istvan Szekeres (szekeres) wrote :

hello,

# dpkg -l iriverter java-gcj-compat libswt3.2-gtk-java
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-================-================-================================================
ii iriverter 0.16-0ubuntu2 converts video for use on various multimedia pla
ii java-gcj-compat 1.0.65-8ubuntu3 Java runtime environment using GIJ
ii libswt3.2-gtk-ja 3.2.1-2ubuntu1 Fast and rich GUI toolkit for Java, gtk2 version

Revision history for this message
Richard Bailey (rmjb) wrote :

I tested this on stock feisty beta and iriverter launches and works properly. Can you test again? Some dependent packages were probably updated.

Revision history for this message
Marek Aaron Sapota (maarons) wrote :

Yes, it runs under liveCD, but it doesn't run on my main install. I have everything updated, so it should run fine.

Revision history for this message
cchan (dono17) wrote :

Sorry to say that I'm having the same problem too. I actually had problems with iriverter in Edgy, so I really wasn't expecting it to work here -- but now that it is being offered in the repositories, I guess I should help take the kinks out.

First, the information that you requested, but for my system:

dpkg -l iriverter java-gcj-compat libswt3.2-gtk-java
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==========================-================-===================================================
ii iriverter 0.16-0ubuntu2 converts video for use on various multimedia players.
ii java-gcj-compat 1.0.65-8ubuntu3 Java runtime environment using GIJ
ii libswt3.2-gtk-java 3.2.2-0ubuntu3 Fast and rich GUI toolkit for Java, gtk2 vers

If you need more info, feel free to ask.

To expand on the issue, I also tried a fix on the Ubuntu forum, where this line:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/jni

...is added into the Terminal before opening iriverter also from the Terminal.

Indeed it seems to work at first since the program's interface looks normal. However, when trying a to convert a video file, the program crashes and this is added into the error log:

!!! An unhandled exception occured: class java.lang.NullPointerException
!!! null
!!!
!!! org.thestaticvoid.iriverter.Converter.convertDirectoryToSingleVideos(Converter.java:94)
!!! org.thestaticvoid.iriverter.Converter.expandSingleJobsToMultiple(Converter.java:78)
!!! org.thestaticvoid.iriverter.Converter.<init>(Converter.java:14)
!!! org.thestaticvoid.iriverter.ConverterUI.widgetSelected(ConverterUI.java:323)
!!! org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90)
!!! org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
!!! org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085)
!!! org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3180)
!!! org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2856)
!!! org.thestaticvoid.iriverter.ConverterUI.<init>(ConverterUI.java:59)
!!! org.thestaticvoid.iriverter.ConverterUI.main(ConverterUI.java:666)
!!!

Any help on the matter is appreciated, but please take your time at least on my account. I still have Windows and 32-bit Linuces to run iriverter in during the interim.

Revision history for this message
Isak Savo (isak-savo) wrote :

I have this issue too, but I am using SUN's java package (from the repository though, not from java.com).

I managed to solve it thanks to this post:
http://ubuntuforums.org/showpost.php?p=1063854&postcount=13

Basically:
export LD_LIBRARY_PATH=/usr/lib/jni/
iriverter

Revision history for this message
Istvan Szekeres (szekeres) wrote :

Isak: that also solves the problem for me. However for the package I think a global solution would be preferred.

Revision history for this message
Jerry Chong (zanglang) wrote :

Looking inside /usr/bin/iriverter it seems that if we've just appended ":/usr/lib/jni" after the -Djava.library.path= part it would work just fine:

java -Djava.library.path=$LD_LIBRARY_PATH:${exec_prefix}/lib:/usr/lib/jni -classpath $CLASSPATH:${prefix}/share/java/iriverter.jar:/usr/lib/java/swt.jar org.thestaticvoid.iriverter.ConverterUI $*

Slightly less hack-ish, hopefully? :)

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

I'm having the same problem on latest Gutsy too. the "export LD_LIBRARY_PATH=/usr/lib/jni/" trick works though.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for iriverter (Ubuntu) because there has been no activity for 60 days.]

Revision history for this message
mirak (mirak-mirak) wrote :

bug is still not fixed in Gutsy.

The fix is given above and the bug should not be hard to fix.
iriverter is unusable as it without this fixes.

Revision history for this message
mirak (mirak-mirak) wrote :

by the way there is an HORRIBLE sound bug, with mostly white noise when I encode for H300.
I have noticed this problem since feisty and I don't know how to fix that !!!!

Revision history for this message
Sean "Diggity" O'Brien (seandiggity) wrote :

I can confirm that this bug is still present in the latest package in Gutsy. I made the (very easy) fix Jerry Chong recommends above, and iriverter loads without any errors.

Since this is a simple change to one file, it's a bit disappointing that it hasn't been fixed yet...

Revision history for this message
Sean "Diggity" O'Brien (seandiggity) wrote :

I can confirm this bug, and also that the fix by Jerry Chong works.

Changed in iriverter:
status: Invalid → Confirmed
Revision history for this message
mirak (mirak-mirak) wrote :

about the white noise with mencoder mp3 encoding, I still have this problem but it seems it's because ffmpeg is not built with mp3 support.
However even when I use a fine compiled ffmpeg it doesn't fix it, I can't find what is the problem

Revision history for this message
Zeno Gantner (zeno-gantner) wrote :

The bug is still present in gutsy.

"export LD_LIBRARY_PATH=/usr/lib/jni/" fixed the problem.

>dpkg -l iriverter java-gcj-compat libswt3.2-gtk-java
ii iriverter 0.16-0ubuntu2 converts video for use on various multimedia players.
ii java-gcj-compat 1.0.76-4ubuntu1 Java runtime environment using GIJ
ii libswt3.2-gtk-java 3.2.2-3ubuntu3 Fast and rich GUI toolkit for Java, gtk2 version

>dpkg -l| grep java6
ii sun-java6-bin 6-03-0ubuntu2 Sun Java(TM) Runtime Environment (JRE) 6 (ar
ii sun-java6-jdk 6-03-0ubuntu2 Sun Java(TM) Development Kit (JDK) 6
ii sun-java6-jre 6-03-0ubuntu2 Sun Java(TM) Runtime Environment (JRE) 6

>java -version
java version "1.6.0_03"
Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
Java HotSpot(TM) Server VM (build 1.6.0_03-b05, mixed mode)

Best regards,
  Zeno

Revision history for this message
supercompman (supercompman) wrote :

This bug is also present in the Hardy beta. Performing "export LD_LIBRARY_PATH=/usr/lib/jni/" corrects the problem.

Changed in iriverter:
assignee: nobody → motu
Revision history for this message
Scott Lewin (sclewin) wrote :

This problem still exist in an updated 8.04 Kubuntu system.

!!! An unhandled exception occured: class java.lang.UnsatisfiedLinkError
--- iriverter 0.16
---
--- Settings:
---
---
!!! no swt-pi-gtk-3236 in java.library.path
!!!
!!! java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
!!! java.lang.Runtime.loadLibrary0(Runtime.java:823)
!!! java.lang.System.loadLibrary(System.java:1030)
!!! org.eclipse.swt.internal.Library.loadLibrary(Library.java:123)
!!! org.eclipse.swt.internal.gtk.OS.<clinit>(OS.java:22)
!!! org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:63)
!!! org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:54)
!!! org.eclipse.swt.widgets.Display.<clinit>(Display.java:126)
!!! org.thestaticvoid.iriverter.ConverterUI.<init>(ConverterUI.java:28)
!!! org.thestaticvoid.iriverter.ConverterUI.main(ConverterUI.java:666)
!!!
Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class org.eclipse.swt.widgets.Display
        at org.thestaticvoid.iriverter.ConverterUI.main(ConverterUI.java:675)

Revision history for this message
Scott Lewin (sclewin) wrote :

The fix from Jerry worked for me as well, thanks Jerry.

Hew (hew)
description: updated
Revision history for this message
LC всадник cbet (lc1884) wrote :

Thanks jerry it fixes the issue on Ubuntu 8.04 amd64

Hew (hew)
Changed in iriverter:
importance: Undecided → High
status: Confirmed → Triaged
Revision history for this message
Voronin Viktor (wizard-wcs) wrote :

Thanks Jerry it fixes the issue on 8.04 x86

Revision history for this message
Hew (hew) wrote :

Applies on both Gnome and KDE (and likely more), so this is not a problem with KDE. It was caused by the latest version of iriverter, so I think it's safe to say it's just an iriverter problem.

Changed in meta-kde:
status: New → Invalid
Revision history for this message
Jonathan Marsden (jmarsden) wrote :

I've been able to duplicate and then solve this here, under Ubuntu 8.04 (on x86).

The issue causing mild confusion about this bug is that the current package works fine using the default (java-gcj) JRE. However, if one installs the Sun JRE and sets it as the default using

  sudo update-java-alternatives -s java-6-sun

*then* the symptoms of this bug appear.

Adding the extra library directory /usr/bin/jni is harmless to the java-gcj JRE.

The solution now seems clear: add that directory to the library path in the launch script. Therefore, I have created a "fixed" package of iriverter, the .debdiff of which is attached.

I'll do my best to see this through to a new revision upload in the next few days. There are a few packaging and lintian warnings I'll probably clean up while I am "inside" the iriverter package tree, too.

Feedback is very welcome -- I'm new to Ubuntu development, though not to Linux or to software development.

Jonathan

Changed in iriverter:
assignee: motu → jmarsden
status: Triaged → In Progress
Revision history for this message
Jonathan Marsden (jmarsden) wrote :

Updated debdiff attached below which also cleans up a few lintian issues.

See http://revu.ubuntuwire.com/details.py?package=iriverter for the REVU upload.

Changed in iriverter:
assignee: jmarsden → nobody
status: In Progress → Confirmed
Revision history for this message
Jonathan Marsden (jmarsden) wrote :

Following some feedback on #ubuntu-motu, here is a revised debdiff.

Jonathan

Revision history for this message
Jonathan Marsden (jmarsden) wrote :

A (hopefully final) new debdiff with improved debian/changelog per advice from cody-somerville on #ubuntu-motu

Jonathan

Hew (hew)
Changed in iriverter:
status: Confirmed → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package iriverter - 0.16-0ubuntu3

---------------
iriverter (0.16-0ubuntu3) intrepid; urgency=low

  * debian/patches/01_change_launcher_classpath.dpatch: updated
    - Changed Java library path adding /usr/lib/jni
    - Closes (LP: #91237)

  * patches/02_correct_typo_in_iriverter.deskop.dpatch: new
    - Corrected typo in iriverter.desktop StartupNotify key name

  * debian/control: updated
    - Updated to standards-version 3.8.0 and added Homepage:
    - Removed trailing period from synopsis line of package description
    - Added XSBC-Original-Maintainer pointing to Richard Bailey
    - Removed example depends items from Depends: line

  * debian/rules: updated
    - Make errors in make distclean visible

  * debian/copyright: updated
    - Replaced Unicode copyright symbol with (C) to make file pure USASCII

 -- Jonathan Marsden <email address hidden> Sat, 19 Jul 2008 17:33:47 -0700

Changed in iriverter:
status: Triaged → Fix Released
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.