netscape.security.PrivilegeManager.revertPrivilege
I’ve been beating my head against the wall trying to find the cause of the exception listed below. I’m working with JXTA and using the bcprov-jdk14.jar library from The Legion of the Bouncy Castle. The error occurs because CryptixProperties.setProperties(…) includes this code:
try { netscape.security.PrivilegeManager.revertPrivilege(”UniversalPropertyRead”); }
catch (NoClassDefFoundError e) {}
The version of netscape.security.PrivilegeManager that was loaded by the JVM does not include a revertPrivilege(String s) method. I finally discovered that I had placed a copy of JdbcDomino.jar in the lib\ext folder of my JRE. This JAR included an older version of PrivilegeManager.
This was a painful reminder that as I develop apps I shouldn’t make global changes to the JVM.
java.lang.NoSuchMethodError: netscape.security.PrivilegeManager.revertPrivilege(Ljava/lang/String;)V
at cryptix.CryptixProperties.setProperties(CryptixProperties.java:448)
at cryptix.CryptixProperties.(CryptixProperties.java:414)
at cryptix.provider.Cryptix.getVersionAsDouble(Cryptix.java:115)
at cryptix.provider.Cryptix.(Cryptix.java:93)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at net.jxta.impl.membership.pse.PSEUtils.(PSEUtils.java:196)
at net.jxta.impl.membership.pse.PSEUtils.(PSEUtils.java:138)
at net.jxta.impl.peergroup.ConfigDialog.saveValues(ConfigDialog.java:2449)
at net.jxta.impl.peergroup.ConfigDialog.access$000(ConfigDialog.java:138)
at net.jxta.impl.peergroup.ConfigDialog$5.actionPerformed(ConfigDialog.java:1892)