This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with setting PreferencesFactory

 
Aravind Kumar
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,

I am trying to use the custom PreferncesFactory webclient version of the front end. I did the following
Added this line at the .jnlp file

<property name="java.util.prefs.PreferencesFactory" value="de.coryx.cps.prefs.PreferencesFactory"/>

But i get the following exception when I use java.util.Preferences pref = Preferences.userRoot():


java.lang.InternalError: Can't instantiate Preferences factory java.lang.ClassNotFoundException: de.coryx.cps.prefs.PreferencesFactory

at java.util.prefs.Preferences.<clinit>(Unknown Source)

at de.coryx.apps.docm.client.swing.Main.<init>(Main.java:116)

at de.coryx.apps.docm.client.swing.Main.main(Main.java:253)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.sun.javaws.Launcher.executeApplication(Unknown Source)

at com.sun.javaws.Launcher.executeMainClass(Unknown Source)

at com.sun.javaws.Launcher.continueLaunch(Unknown Source)

at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)

at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)

at com.sun.javaws.Launcher.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

Could security be an issue?? But i have this also in the .jnlp file:

<security>
<all-permissions/>
</security>
....

<property name="java.security.manager" value="true"/>


where am i going wrong?

thanx
Aravind
 
Aravind Kumar
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ppl..

I guess, I found out the reason for this...

http://java.sun.com/products/javawebstart/faq.html#54

this says Class.forName doesnt find the resource that are specified in the JNLP file..

But java.util.prefs.Preferences use Class.forName to locate the user defined PreferencesFactory class...

Is this a bug?? or any solution out there?

Aravind
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic