This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 203735 - Keyring integration fails with Ubuntu 11.04 and/or Gnome 3
Summary: Keyring integration fails with Ubuntu 11.04 and/or Gnome 3
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Options&Settings (show other bugs)
Version: 7.0.1
Hardware: PC Linux
: P2 normal with 1 vote (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on: 211401
Blocks:
  Show dependency tree
 
Reported: 2011-10-14 14:52 UTC by everflux
Modified: 2012-04-18 14:59 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description everflux 2011-10-14 14:52:48 UTC
Netbeans can not access the saved passwords after upgrading from Ubuntu 10.11


FINE [org.netbeans.modules.keyring.kde.KWalletProvider]: application exit with code 2 for commandString: [qdbus, org.kde.kwalletd, /modules/kwalletd, org.kde.KWallet.isEnabled]; errVal: Service 'org.kde.kwalletd' does not exist.
FINE [org.netbeans.modules.keyring.gnome.GnomeProvider]
java.lang.UnsatisfiedLinkError: Unable to load library 'gnome-keyring': libgnome-keyring.so: cannot open shared object file: No such file or directory
at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:163)
at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:236)
at com.sun.jna.Library$Handler.<init>(Library.java:140)
at com.sun.jna.Native.loadLibrary(Native.java:379)
at org.netbeans.modules.keyring.gnome.GnomeKeyringLibrary.<clinit>(GnomeKeyringLibrary.java:62)
[catch] at org.netbeans.modules.keyring.gnome.GnomeProvider.enabled(GnomeProvider.java:88)
at org.netbeans.api.keyring.Keyring.provider(Keyring.java:72)
at org.netbeans.api.keyring.Keyring.save(Keyring.java:109)
at org.netbeans.modules.j2ee.deployment.impl.ServerRegistry$5.run(ServerRegistry.java:731)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1424)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1968)

Cause: The library does not exist with the name 
'libgnome-keyring.so' but only with 'libgnome-keyring.so.0'
Workaround is
sudo ln -s /usr/lib/libgnome-keyring.so.0 /usr/lib/libgnome-keyring.so
Comment 1 Jesse Glick 2011-10-29 03:43:03 UTC
Not sure what is going on with that. On my 10.04 installation, there is only

/usr/lib/libgnome-keyring.so.0
/usr/lib/libgnome-keyring.so.0.1.1

but the library is found without problems. Any idea whether the same problem occurs in a fresh 11.04 install?
Comment 2 Jesse Glick 2011-10-30 03:59:32 UTC
Confirmed on Oneiric with amd64. Will look for a workaround in NB code.
Comment 3 Jesse Glick 2011-10-30 04:12:50 UTC
Interestingly, my x86 Lucid installation had the same filenames:

/usr/lib/libgnome-keyring.so.0
/usr/lib/libgnome-keyring.so.0.1.1

So the lack of a symlink per se is not the problem; rather, something changed in how library names are searched for. Maybe a bug in JNA, or in the JRE.
Comment 4 Jesse Glick 2011-10-30 04:17:26 UTC
core-main #e63607e25bec
Comment 5 Jesse Glick 2011-10-30 04:18:08 UTC
Needs to be tested against different Linux versions on 32- and 64-bit platforms.
Comment 6 everflux 2011-10-30 09:25:36 UTC
After your last comment I did some research and I think the observed behaviour might be a result from the new "multiarch" 64/32 bit support in Debian and Ubuntu.
This lib-jna bug especially mentions problems with version-less libraries:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=620122
According to http://java.net/jira/browse/JNA-184 there is a patch available https://github.com/twall/jna/pull/10

A work-around in Netbeans should mitigate the problem of course, thanks for your help!
Comment 7 Quality Engineering 2011-10-31 15:18:27 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/e63607e25bec
User: Jesse Glick <jglick@netbeans.org>
Log: #203735: Keyring integration fails with Ubuntu 11.04 and/or Gnome 3
Hot fix: just ask to load the absolute filename of the native library.
Comment 8 Quality Engineering 2011-11-01 15:14:33 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/e63607e25bec
User: Jesse Glick <jglick@netbeans.org>
Log: #203735: Keyring integration fails with Ubuntu 11.04 and/or Gnome 3
Hot fix: just ask to load the absolute filename of the native library.
Comment 9 Jesse Glick 2011-11-02 20:45:54 UTC
Does not work for 32-bit JVMs running on a 64-bit kernel using ia32-libs. Not sure how many people do that, and if -XX:+UseCompressedOops is a satisfactory workaround for the apparently terrible memory performance of the 64-bit JVM.
Comment 10 Jesse Glick 2011-11-02 21:18:06 UTC
I do not think JNA-184 matters in this case, because that file naming pattern does not seem to be used for this library (other libs are packaged that way), even with ia32-libs:

$ find /usr/lib* -name \*libgnome-keyring\* | xargs dpkg -S
libgnome-keyring0: /usr/lib/libgnome-keyring.so.0.1.1
libgnome-keyring0: /usr/lib/libgnome-keyring.so.0
ia32-libs: /usr/lib32/libgnome-keyring.so.0.1.1
ia32-libs: /usr/lib32/libgnome-keyring.so.0
ia32-libs: /usr/lib32/libgnome-keyring.so

So e63607e25bec actually broke that use case by loading /usr/lib/libgnome-keyring.so.0 when /usr/lib32/libgnome-keyring.so was desired. Will try to correct that.
Comment 11 Quality Engineering 2011-11-03 15:42:26 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/1de5c33e35fd
User: Jesse Glick <jglick@netbeans.org>
Log: Revised fix of #203735 to work properly with ia32-libs.