java.lang.SecurityException:class" org.apache.log4j.Logger"与同一包中其他类的信任级别不匹配 [英] java.lang.SecurityException: class "org.apache.log4j.Logger" does not match trust level of other classes in the same package

查看:389
本文介绍了java.lang.SecurityException:class" org.apache.log4j.Logger"与同一包中其他类的信任级别不匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于java Web应用程序,我在使用JRE 1.6.0_22时出现此错误

For an java web application, I got this error when using JRE 1.6.0_22


java.lang.SecurityException:classorg .apache.log4j.Logger与同一个包中其他类的信任级别不匹配

java.lang.SecurityException: class "org.apache.log4j.Logger" does not match trust level of other classes in the same package

但是,使用JRE时它可以正常工作1.6.0_13。

However, it works fine when using JRE 1.6.0_13.

我在谷歌搜索过,发现自更新19

I searched in Google, and find the there is a security enhancement since update 19.

对于这个例外,它说,

And for this exception, it says,


在先前检测到混合组件并决定允许它们共存之后,抛出以下两个SecurityExceptions。异常表示在受信任组件和不受信任组件之间检测到组件名称冲突(资源名称或类包名称),并且拒绝加载资源或类的请求。

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.

现在问题是,我怎么能找到哪些类(可能是org.apache.log4j.Logger?)有碰撞哪个他们所在的套餐?

Now the problem is, how could i find which classes (maybe org.apache.log4j.Logger?) have the collision and which packages they are in?

我发现 Oracle论坛

推荐答案

有趣的链接。我还没有遇到问题 - 但可能是你在JavaEE容器类路径中有一个带有org.apache ...的jar,它位于Web应用程序中的

Interesting link. I didn't have the problem yet - but may it be that you have the jar with "org.apache..." in the JavaEE container classpath somewhere and in the web application.

寻找并测试从网络应用中删除它

Look for that and to test remove it from the web app

这篇关于java.lang.SecurityException:class" org.apache.log4j.Logger"与同一包中其他类的信任级别不匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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