|
|
Re: How To Get Example SecurePreferencesFactory to work [message #127574 is a reply to message #127505] |
Fri, 13 March 2009 21:10 |
Oleg Besedin Messages: 41 Registered: July 2009 |
Member |
|
|
Hi Andy,
That is an odd place to get an NPE. From the code, the only way to get that
would be to remove "Lazy Activation" flag from the
"org.eclipse.equinox.security" bundle or to set launch configuration to
disable its lazy activation.
If you have this bundle checked out in your workspace, check that its
manifest.mf file has "Bundle-ActivationPolicy: lazy". If you modified launch
configuration from the default, it is worth checking that too.
If problem persist, be sure to open a bug against Equinox/Security with a
sample of your code and launch configuration that reproduces the problem.
Sincerely,
Oleg Besedin
"Andy " <andrewnbenjamin@hotmail.com> wrote in message
news:bc3066e55b372d3a379f4308b853f289$1@www.eclipse.org...
> Hi,
>
> I tried running the following code which will eventually get put into a
> plugin.
> ISecurePreferences root = SecurePreferencesFactory.getDefault();
> ISecurePreferences node = root.node("cvs/eclipse.org");
> node.put("password", myPassword, true);
>
>
> But when I run it I just get a stack trace that appears as follows:
>
> Exception in thread "main" java.lang.NullPointerException
>
>
>
> at
> org.eclipse.equinox.internal.security.storage.SecurePreferen cesMapper.open(SecurePreferencesMapper.java:67)
>
> at
> org.eclipse.equinox.internal.security.storage.SecurePreferen cesMapper.getDefault(SecurePreferencesMapper.java:44)
>
> at
> org.eclipse.equinox.security.storage.SecurePreferencesFactor y.getDefault(SecurePreferencesFactory.java:50)
>
> at
> com.nuwavetech.vfs.security.PreferencesManager.main(Preferen cesManager.java:13)
>
>
>
>
> I tried looking into if anyone else had this issue or for a more complete
> example and came across this:
>
> http://dev.eclipse.org/mhonarc/lists/equinox-dev/msg05026.ht ml
>
> but that didn't seem to answer the question, at least when it came to
> pointing out an actual working example. Any ideas? Thanks,
>
> Andy
>
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04384 seconds