On Friday 04 August 2006 09:49, Raif S. Naffah wrote:
> On Friday 04 August 2006 09:32, Mario Torre wrote:
> > Il giorno ven, 04/08/2006 alle 09.12 +1000, Raif S. Naffah ha scritto:
> > > i'm getting a segmentation fault caused by /usr/lib/libgconf-2.so.4
> > > (FC5) when trying to run jamvm with Classpath (both CVS Head)...
> > > anybody else is seeing this?
> >
> > Do you have a test case for that?
>
> here is how i can trigger it:
>
> import java.util.prefs.Preferences;
>
> public class Hello {
> public static final void main(String[] args) {
> Preferences prefs = Preferences.systemNodeForPackage(Hello.class);
> int lastSerialNumber = prefs.getInt("LAST_SERIAL_NUMBER", 0) + 1;
> prefs.putInt("LAST_SERIAL_NUMBER", lastSerialNumber);
> }
> }
in addition to the above, when i configure Classpath with
--disable-default-preferences-peer, and try to run the same code (as
above) i get:
Aug 4, 2006 10:06:25 AM gnu.classpath.ServiceFactory lookupProviders
WARNING: Cannot load service provider class "no", specified by
"META-INF/services/java.util.prefs.PreferencesFactory" in
file:/data/workspace/cvs/classpath/install/share/classpath/META-INF/services/java.util.prefs.PreferencesFactory
java.security.PrivilegedActionException: java.lang.ClassNotFoundException: no
not found in java.lang.ClassLoader$1{urls=[file:/home/raif/], parent=null}
at java.security.AccessController.doPrivileged(AccessController.java:203)
at
gnu.classpath.ServiceFactory$ServiceIterator.loadNextServiceProvider(ServiceFactory.java:463)
at
gnu.classpath.ServiceFactory$ServiceIterator.<init>(ServiceFactory.java:372)
at gnu.classpath.ServiceFactory.lookupProviders(ServiceFactory.java:252)
at java.util.prefs.Preferences.getFactory(Preferences.java:214)
at java.util.prefs.Preferences.systemRoot(Preferences.java:139)
at java.util.prefs.Preferences.systemNodeForPackage(Preferences.java:257)
at Hello.main(Hello.java:5)
Caused by: java.lang.ClassNotFoundException: no not found in
java.lang.ClassLoader$1{urls=[file:/home/raif/], parent=null}
at java.net.URLClassLoader.findClass(URLClassLoader.java:531)
at java.lang.ClassLoader.loadClass(ClassLoader.java:342)
at java.lang.ClassLoader$1.loadClass(ClassLoader.java:1112)
at java.lang.ClassLoader.loadClass(ClassLoader.java:294)
at
gnu.classpath.ServiceProviderLoadingAction.run(ServiceProviderLoadingAction.java:139)
at java.security.AccessController.doPrivileged(AccessController.java:195)
...7 more
which i presume is caused by "no" being generated in the file
java.util.prefs.PreferencesFactory under resource/META-INF/services,
instead of "gnu.java.util.prefs.FileBasedFactory".
cheers;
rsn
pgpbJWpNiZJ4v.pgp
Description: PGP signature

