Frage

I have signed every jar required by the application but when trying to launch, it produces following exception:

java.lang.SecurityException: class "com.ibm.db2.jcc.DB2Driver" does not match trust level of other classes in the same package
at com.sun.deploy.security.CPCallbackHandler$ChildElement.checkResource(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.checkResource(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.getResource(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath.getResource(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.ibm.nzna.shared.db.DatabaseSystem.<init>(DatabaseSystem.java:193)
at com.ibm.nzna.projects.qit.Qit.run(Qit.java:556)
at com.ibm.nzna.projects.qit.Qit.<init>(Qit.java:185)
at com.ibm.nzna.projects.qit.Qit.main(Qit.java:123)
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.doLaunchApp(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

I have signed the db2jcc.jar also. Could any one please help me with this error?

War es hilfreich?

Lösung

Have a look at this other SO thread that deals with the error message.

There's also this information from a security bulletin,

The following two SecurityExceptions are thrown after mixed components had previously been detected and a decision was made to allow them to coexist. The exceptions indicate that a component name collision (resource name or class package name) was detected between trusted and untrusted components and the request to load the resource or class was denied.

"resource \"" + name + "\" does not match trust level of other resources of the same name" "class

\"" + packageName + "\" does not match trust level of other classes in the same package"

Andere Tipps

Check this out http://bugs.sun.com/view_bug.do?bug_id=6967414 It may be the cause of your problem.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top