Thread: [Java-gnome-developer] Gtk.init throws exception when run on Ubuntu 13.04
Brought to you by:
afcowie
From: Johan G. <joh...@gm...> - 2013-07-19 23:38:48
|
Hi, I've just installed libjava-gnome-java on a Ubuntu 13.04 box (only Linux dist I've got available). Fired up Eclipse Juno, added the library to my project (and the docs of course) and tried to run it but I'm getting an exception! What is going on here? The program is this: package uk.org.linuxgrotto.ui; import org.apache.log4j.Logger; import org.gnome.gtk.Gtk; /** * The class instantiates the main window. * * @author jgroth * */ public class DesktopFileCreator { private static Logger log = Logger.getLogger(DesktopFileCreator.class); public static void main(String[] args) { Gtk.init(args); } } Exception in thread "main" java.lang.ExceptionInInitializerError at org.gnome.gtk.Gtk.init(Gtk.java:95) at uk.org.linuxgrotto.ui.DesktopFileCreator.main(DesktopFileCreator.java:63) Caused by: java.lang.NullPointerException at org.freedesktop.bindings.Plumbing.loadNativeCode(Plumbing.java:192) at org.freedesktop.bindings.Plumbing.<clinit>(Plumbing.java:110) ... 2 more This is so minimal it can't be any smaller and yet an exception. Regards, Johan |
From: Guillaume M. <res...@gm...> - 2013-07-20 12:38:00
|
Hi, 2013/7/20 Johan Groth <joh...@gm...>: > I've just installed libjava-gnome-java on a Ubuntu 13.04 box (only Linux Do you have libjava-gnome-jni installed too? Regards, -- Guillaume Mazoyer - https://respawner.fr/ |
From: Johan G. <joh...@gm...> - 2013-07-20 15:24:48
|
On 20/07/13 13:37, Guillaume Mazoyer wrote: > Hi, > > 2013/7/20 Johan Groth <joh...@gm...>: >> I've just installed libjava-gnome-java on a Ubuntu 13.04 box (only Linux > Do you have libjava-gnome-jni installed too? I do indeed. $ ll /usr/lib/lib*jni* lrwxrwxrwx 1 root root 22 Jul 19 22:53 /usr/lib/libgtkjni-4.1.2.so -> jni/libgtkjni-4.1.2.so $ ll /usr/lib/jni/lib* -rw-r--r-- 1 root root 1208816 Sep 10 2012 /usr/lib/jni/libgtkjni-4.1.2.so -rw-r--r-- 1 root root 72232 Jun 6 2011 /usr/lib/jni/libjnidispatch.so Regards, Johan |
From: Andrew C. <an...@op...> - 2013-07-21 01:36:39
Attachments:
signature.asc
|
On Sat, 2013-07-20 at 00:38 +0100, Johan Groth wrote: > Hi, > I've just installed libjava-gnome-java on a Ubuntu 13.04 box (only > Linux dist I've got available). Fired up Eclipse Juno, added the > library to my project (and the docs of course) and tried to run it but > I'm getting an exception! What is going on here? > Exception in thread "main" java.lang.ExceptionInInitializerError > at org.gnome.gtk.Gtk.init(Gtk.java:95) This is bizarre. > Caused by: java.lang.NullPointerException > at > org.freedesktop.bindings.Plumbing.loadNativeCode(Plumbing.java:192) > at org.freedesktop.bindings.Plumbing.<clinit>(Plumbing.java:110) > ... 2 more Ok, that's more interesting. This means the code at line 191 returned null. [which is why I'm so particular about not chaining method calls]. So ProtectionDomain's getCodeSource() is returning null. That's annoying; . It doesn't here. What version of Java are you using? And, can you describe how you're running the program (from within Eclipse? from the command line?). AfC Sydney |
From: Johan G. <joh...@gm...> - 2013-07-21 08:26:26
|
On 21/07/13 02:20, Andrew Cowie wrote: > On Sat, 2013-07-20 at 00:38 +0100, Johan Groth wrote: >> Hi, >> I've just installed libjava-gnome-java on a Ubuntu 13.04 box (only >> Linux dist I've got available). Fired up Eclipse Juno, added the >> library to my project (and the docs of course) and tried to run it but >> I'm getting an exception! What is going on here? > >> Exception in thread "main" java.lang.ExceptionInInitializerError >> at org.gnome.gtk.Gtk.init(Gtk.java:95) > This is bizarre. > >> Caused by: java.lang.NullPointerException >> at >> org.freedesktop.bindings.Plumbing.loadNativeCode(Plumbing.java:192) >> at org.freedesktop.bindings.Plumbing.<clinit>(Plumbing.java:110) >> ... 2 more > Ok, that's more interesting. > > This means the code at line 191 returned null. [which is why I'm so > particular about not chaining method calls]. So ProtectionDomain's > getCodeSource() is returning null. That's annoying; . It doesn't here. > > What version of Java are you using? And, can you describe how you're > running the program (from within Eclipse? from the command line?). I'm running it from within Eclipse and using java7. Same code running from within Netbeans 7.3. DANGER: (null)-WARNING, Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-OZp7FBDLKz: Connection refused Exception in thread "main" org.gnome.glib.FatalError: (null)-WARNING Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-OZp7FBDLKz: Connection refused at org.gnome.gtk.GtkMain.gtk_init(Native Method) at org.gnome.gtk.GtkMain.init(GtkMain.java:54) at org.gnome.gtk.Gtk.init(Gtk.java:95) at uk.org.linuxgrotto.ui.DesktopFileEditor.main(DesktopFileEditor.java:15) Java Result: 1 java version "1.7.0_25" OpenJDK Runtime Environment (IcedTea 2.3.10) (7u25-2.3.10-1ubuntu0.13.04.2) OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode) Regards, Johan |
From: Johan G. <joh...@gm...> - 2013-07-22 17:32:27
|
On 21/07/13 02:20, Andrew Cowie wrote: > On Sat, 2013-07-20 at 00:38 +0100, Johan Groth wrote: >> Hi, >> I've just installed libjava-gnome-java on a Ubuntu 13.04 box (only >> Linux dist I've got available). Fired up Eclipse Juno, added the >> library to my project (and the docs of course) and tried to run it but >> I'm getting an exception! What is going on here? > >> Exception in thread "main" java.lang.ExceptionInInitializerError >> at org.gnome.gtk.Gtk.init(Gtk.java:95) > This is bizarre. > >> Caused by: java.lang.NullPointerException >> at >> org.freedesktop.bindings.Plumbing.loadNativeCode(Plumbing.java:192) >> at org.freedesktop.bindings.Plumbing.<clinit>(Plumbing.java:110) >> ... 2 more > Ok, that's more interesting. > > This means the code at line 191 returned null. [which is why I'm so > particular about not chaining method calls]. So ProtectionDomain's > getCodeSource() is returning null. That's annoying; . It doesn't here. > > What version of Java are you using? And, can you describe how you're > running the program (from within Eclipse? from the command line?). It seems to me that java-gnome 4.1.2 is broken on Ubuntu 13.04. I simply can't get it to work. Oh, well, back to using Swing. Regards, Johan |
From: Guillaume M. <gma...@gr...> - 2013-07-22 20:31:15
|
2013/7/22 Johan Groth <joh...@gm...>: > It seems to me that java-gnome 4.1.2 is broken on Ubuntu 13.04. I simply > can't get it to work. Oh, well, back to using Swing. Did you try the version from the PPA[1]? [1] https://launchpad.net/~java-gnome/+archive/ppa -- Guillaume Mazoyer - https://respawner.fr/ |
From: Johan G. <joh...@gm...> - 2013-07-22 23:40:05
|
On 22/07/13 21:30, Guillaume Mazoyer wrote: > 2013/7/22 Johan Groth <joh...@gm...>: >> It seems to me that java-gnome 4.1.2 is broken on Ubuntu 13.04. I simply >> can't get it to work. Oh, well, back to using Swing. > Did you try the version from the PPA[1]? > > [1] https://launchpad.net/~java-gnome/+archive/ppa > No, I didn't. I thought PPA packages were unstable. Regards, Johan |
From: Andrew C. <an...@op...> - 2013-07-23 01:16:10
Attachments:
signature.asc
|
On Tue, 2013-07-23 at 00:39 +0100, Johan Groth wrote: > >> It seems to me that java-gnome 4.1.2 is broken on Ubuntu 13.04. I simply > >> can't get it to work. Oh, well, back to using Swing. Please feel free to do what ever makes you happy, but keep in mind that many of the other people else using java-gnome are using it on Ubuntu. It works fine for them, so it's possible that something about your environment is different. Personally, I'd like to find out what that is, because it's entirely possible that other people will encounter the same problem. But since *I* can't see the problem, I need your help. Will you help us? > > Did you try the version from the PPA[1]? > > > > [1] https://launchpad.net/~java-gnome/+archive/ppa > > No, I didn't. I thought PPA packages were unstable. Not when they're from the upstream project you're trying to use. AfC Sydney |
From: Johan G. <joh...@gm...> - 2013-07-23 07:42:28
|
On 23/07/2013 02:15, Andrew Cowie wrote: > On Tue, 2013-07-23 at 00:39 +0100, Johan Groth wrote: >>>> It seems to me that java-gnome 4.1.2 is broken on Ubuntu 13.04. I simply >>>> can't get it to work. Oh, well, back to using Swing. It might be that java-gnome 4.1.2 is just fine and Unbuntu 13.04 is broken. I just don't have the time to make an extensive investigation right now to find out if that is the case, though. > > Please feel free to do what ever makes you happy, but keep in mind that > many of the other people else using java-gnome are using it on Ubuntu. > It works fine for them, so it's possible that something about your > environment is different. Personally, I'd like to find out what that is, > because it's entirely possible that other people will encounter the same > problem. But since *I* can't see the problem, I need your help. Will you > help us? Certainly, no problem. So my environment is: HW: Lenovo W500, 8 GB RAM SW: Ubuntu 13.04. Eclipse Juno Java 7 (OpenJDK7 which is the default version of Java on Ubuntu 13.04). > >>> Did you try the version from the PPA[1]? >>> >>> [1] https://launchpad.net/~java-gnome/+archive/ppa >> >> No, I didn't. I thought PPA packages were unstable. > > Not when they're from the upstream project you're trying to use. > Ok, I've never installed a PPA package so some help with that would be much appreciated. Regards, Johan |
From: cyber p. <cyb...@gm...> - 2013-07-23 17:42:53
|
It's fairly easy - just open a terminal and give: *sudo add-apt-repository ppa:java-gnome/ppa* *sudo apt-get update* *sudo apt-get install java-gnome* The first command adds the PPA to your software sources. The second one updates the package index of your system. The third one actually installs the software. On Tue, Jul 23, 2013 at 10:41 AM, Johan Groth <joh...@gm...> wrote: > On 23/07/2013 02:15, Andrew Cowie wrote: > > On Tue, 2013-07-23 at 00:39 +0100, Johan Groth wrote: > >>>> It seems to me that java-gnome 4.1.2 is broken on Ubuntu 13.04. I > simply > >>>> can't get it to work. Oh, well, back to using Swing. > > It might be that java-gnome 4.1.2 is just fine and Unbuntu 13.04 is > broken. I just don't have the time to make an extensive investigation > right now to find out if that is the case, though. > > > > > Please feel free to do what ever makes you happy, but keep in mind that > > many of the other people else using java-gnome are using it on Ubuntu. > > It works fine for them, so it's possible that something about your > > environment is different. Personally, I'd like to find out what that is, > > because it's entirely possible that other people will encounter the same > > problem. But since *I* can't see the problem, I need your help. Will you > > help us? > > Certainly, no problem. > So my environment is: > HW: > Lenovo W500, 8 GB RAM > > SW: > Ubuntu 13.04. > Eclipse Juno > Java 7 (OpenJDK7 which is the default version of Java on Ubuntu 13.04). > > > > >>> Did you try the version from the PPA[1]? > >>> > >>> [1] https://launchpad.net/~java-gnome/+archive/ppa > >> > >> No, I didn't. I thought PPA packages were unstable. > > > > Not when they're from the upstream project you're trying to use. > > > > Ok, I've never installed a PPA package so some help with that would be > much appreciated. > > Regards, > Johan > > > > ------------------------------------------------------------------------------ > See everything from the browser to the database with AppDynamics > Get end-to-end visibility with application monitoring from AppDynamics > Isolate bottlenecks and diagnose root cause in seconds. > Start your free trial of AppDynamics Pro today! > http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk > _______________________________________________ > java-gnome-developer mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/java-gnome-developer > |
From: Niranjan R. <nh...@gm...> - 2013-07-23 19:33:56
|
I do use/have used java gnome on all 3 versions of Ubuntu starting from Ubuntu 12.04 namely 12.04, 12.10, 13.04. It does work fine on all of these versions. Only difference I can think of is our jar file is built locally and deployed to internal maven repository where all other developers access it. If I remember correctly, the jar is built on 12.04 and used on all other versions of ubuntu. We do use Oracle JDK. Regards, Niranjan On 07/23/2013 10:42 AM, cyber python wrote: > It's fairly easy - just open a terminal and give: > **sudo add-apt-repository *ppa:java-gnome/ppa* > *sudo apt-get update* > *sudo apt-get install java-gnome* > > The first command adds the PPA to your software sources. > The second one updates the package index of your system. > The third one actually installs the software. > > On Tue, Jul 23, 2013 at 10:41 AM, Johan Groth <joh...@gm... > <mailto:joh...@gm...>> wrote: > > On 23/07/2013 02:15, Andrew Cowie wrote: > > On Tue, 2013-07-23 at 00:39 +0100, Johan Groth wrote: > >>>> It seems to me that java-gnome 4.1.2 is broken on Ubuntu > 13.04. I simply > >>>> can't get it to work. Oh, well, back to using Swing. > > It might be that java-gnome 4.1.2 is just fine and Unbuntu 13.04 is > broken. I just don't have the time to make an extensive investigation > right now to find out if that is the case, though. > > > > > Please feel free to do what ever makes you happy, but keep in > mind that > > many of the other people else using java-gnome are using it on > Ubuntu. > > It works fine for them, so it's possible that something about your > > environment is different. Personally, I'd like to find out what > that is, > > because it's entirely possible that other people will encounter > the same > > problem. But since *I* can't see the problem, I need your help. > Will you > > help us? > > Certainly, no problem. > So my environment is: > HW: > Lenovo W500, 8 GB RAM > > SW: > Ubuntu 13.04. > Eclipse Juno > Java 7 (OpenJDK7 which is the default version of Java on Ubuntu > 13.04). > > > > >>> Did you try the version from the PPA[1]? > >>> > >>> [1] https://launchpad.net/~java-gnome/+archive/ppa > <https://launchpad.net/%7Ejava-gnome/+archive/ppa> > >> > >> No, I didn't. I thought PPA packages were unstable. > > > > Not when they're from the upstream project you're trying to use. > > > > Ok, I've never installed a PPA package so some help with that would be > much appreciated. > > Regards, > Johan > > > ------------------------------------------------------------------------------ > See everything from the browser to the database with AppDynamics > Get end-to-end visibility with application monitoring from AppDynamics > Isolate bottlenecks and diagnose root cause in seconds. > Start your free trial of AppDynamics Pro today! > http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk > _______________________________________________ > java-gnome-developer mailing list > jav...@li... > <mailto:jav...@li...> > https://lists.sourceforge.net/lists/listinfo/java-gnome-developer > > > > > ------------------------------------------------------------------------------ > See everything from the browser to the database with AppDynamics > Get end-to-end visibility with application monitoring from AppDynamics > Isolate bottlenecks and diagnose root cause in seconds. > Start your free trial of AppDynamics Pro today! > http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk > > > _______________________________________________ > java-gnome-developer mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/java-gnome-developer |
From: Johan G. <joh...@gm...> - 2013-07-24 07:50:07
|
On 23/07/2013 20:31, Niranjan Rao wrote: > I do use/have used java gnome on all 3 versions of Ubuntu starting from > Ubuntu 12.04 namely 12.04, 12.10, 13.04. It does work fine on all of > these versions. > > Only difference I can think of is our jar file is built locally and > deployed to internal maven repository where all other developers access > it. If I remember correctly, the jar is built on 12.04 and used on all > other versions of ubuntu. > > We do use Oracle JDK. > So do I, openjdk 7 which is the default Java on Ubuntu 13.04. Mind you, I've tried openjdk 6 with no difference. Could it be I'm on a 64 bit version of Linux? Regards, Johan |
From: Andrew C. <an...@op...> - 2013-07-24 13:36:39
Attachments:
signature.asc
|
On Wed, 2013-07-24 at 08:49 +0100, Johan Groth wrote: > Could it be I'm on a 64 bit version of Linux? No, not that (though always a likely candidate). We've been 64-bit safe for years. AfC Sydney |
From: Niranjan R. <nh...@gm...> - 2013-07-31 20:13:59
|
Sorry for the late reply. We use both 32bit and 64bit though we are in process of migrating to 64bit completely. Not that it should make any difference, but the code runs on standalone boxes and diverse virtual host. You may want to look at dependencies on 13.04. If I remember correctly we had some minor trouble getting it work on 13.04 because of libwebp2 not easily available on 13.04 You might have already taken care of it, but can you confirm its really using oracle jdk? I have bean burned couple of times on ubntu because default points openjdk and even after setting java home it was still picking up oracle jdk. Proper fix turned out to be update-altenatives and point /usr/bin/java to oracle java. Things do fail mysteriously on openjdk, at least in my observation. Since I use openjdk only accidentally never investigated why/where etc. Regards, Niranjan On 07/24/2013 12:49 AM, Johan Groth wrote: > On 23/07/2013 20:31, Niranjan Rao wrote: >> I do use/have used java gnome on all 3 versions of Ubuntu starting from >> Ubuntu 12.04 namely 12.04, 12.10, 13.04. It does work fine on all of >> these versions. >> >> Only difference I can think of is our jar file is built locally and >> deployed to internal maven repository where all other developers access >> it. If I remember correctly, the jar is built on 12.04 and used on all >> other versions of ubuntu. >> >> We do use Oracle JDK. >> > So do I, openjdk 7 which is the default Java on Ubuntu 13.04. Mind you, > I've tried openjdk 6 with no difference. > Could it be I'm on a 64 bit version of Linux? > > Regards, > Johan > > > > ------------------------------------------------------------------------------ > See everything from the browser to the database with AppDynamics > Get end-to-end visibility with application monitoring from AppDynamics > Isolate bottlenecks and diagnose root cause in seconds. > Start your free trial of AppDynamics Pro today! > http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk > _______________________________________________ > java-gnome-developer mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/java-gnome-developer |