java.lang.SecurityException异常:类" XYZ"的签名者的信息并不在同一个包匹配其他类的签名者的信息 [英] java.lang.SecurityException: class "XYZ"'s signer information does not match signer information of other classes in the same package

查看:178
本文介绍了java.lang.SecurityException异常:类" XYZ"的签名者的信息并不在同一个包匹配其他类的签名者的信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有它运行在浏览器中,并从Javascript称为小程序。有2类: PortalLauncher 的和的 ParamSplitter 的,这些都是在默认的包。 Javascript语言的 PortalLauncher 的调用方法这反过来又在 ParamSplitter 的调用一个函数。小程序是一个签名的jar。

I have an applet which runs in a browser and is called from Javascript. There are 2 classes: PortalLauncher and ParamSplitter and these are in the default package. Javascript calls a method in PortalLauncher which in turn calls a function in ParamSplitter. The applet is in a signed jar.

这工作的大部分时间。然而,一些用户有问题不时。在这一天一定的时间(即不是第一次访问)以下的异常被抛出:

This works most of the time. However, a few users have problems from time to time. At some time in the day (i.e. not on first access) the following exception is thrown:

java.lang.SecurityException: class "ParamSplitter"'s signer information does not
    match signer information of other classes in the same package
    at java.lang.ClassLoader.checkCerts(Unknown Source)
    at java.lang.ClassLoader.preDefineClass(Unknown Source)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$000(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 sun.applet.AppletClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.applet.AppletClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at PortalLauncher.openFile(PortalLauncher.java:313)
    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 sun.plugin.javascript.JSInvoke.invoke(Unknown Source)
    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 sun.plugin.javascript.JSClassLoader.invoke(Unknown Source)
    at sun.plugin.com.MethodDispatcher.invoke(Unknown Source)
    at sun.plugin.com.DispatchImpl.invokeImpl(Unknown Source)
    at sun.plugin.com.DispatchImpl$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.plugin.com.DispatchImpl.invoke(Unknown Source)
java.lang.Exception: java.lang.SecurityException: class "ParamSplitter"'s signer
    information does not match signer information of other classes in the same package
    at sun.plugin.com.DispatchImpl.invokeImpl(Unknown Source)
    at sun.plugin.com.DispatchImpl$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.plugin.com.DispatchImpl.invoke(Unknown Source)

任何人都可以扔在了这个异常意味着什么可能会导致它的光?大约有800名用户谁拥有这个小程序,但只有一个福会受到影响,甚至那些有问题只occaisionally。

Can anyone throw any light on what this exception means and what might be causing it? There are about 800 users who have this applet but only a handfull are affected and even those have the problem only occaisionally.

推荐答案

这意味着同一JVM中,有来自已经签署不同的(或不也许签字)等罐子装其他类,也默认包

It means that inside the same JVM, there are other classes loaded from other jars that have been signed differently (or not signed maybe), also in the default package.

如果我间preT你的问题正确的小程序本身只有一个罐子,所以它一定是从别的地方来一个罐子;只有某些用户拥有。
我首先想到的是也许在另一个选项卡中运行的小应用程序(可以使用同一个JVM实例)的罐子。但其他小程序应使用单独的类加载器,所以他们不应该发生碰撞这样的。
更有可能的是,他们有自己的JVM引导类路径也有根包的类的罐子。

If I interpret your question correctly your applet itself only has one jar, so it must be a jar coming from somewhere else; that only some users have. My first thought it's maybe the jar of an applet running in another tab (that can be using the same jvm instance). But other applets should be using a separate classloader, so they shouldn't collide like that. More likely, they have a jar in the boot classpath of their jvm that also has a class in the root package.

无论哪种方式,解决方案/解决方法是根本不使用默认的包,但是你自己的包。这样,你避免与其他jar碰撞。

Either way, the solution/workaround is simply not to use the default package, but your own package. That way you avoid colliding with the other jar.

这篇关于java.lang.SecurityException异常:类" XYZ"的签名者的信息并不在同一个包匹配其他类的签名者的信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆