java.lang.SecurityException:类“org.apache.log4j.Logger”与同一包中其他类的信任级别不匹配
对于 java web 应用程序,我在使用 JRE 1.6.0_22 时收到此错误
java.lang.SecurityException:类“org.apache.log4j.Logger”与同一包中其他类的信任级别不匹配
但是,在使用 JRE 1.6.0_13 时它工作正常。
我在 Google 中搜索,发现自 更新19。
对于这个例外,它说,
在先前检测到混合组件并决定允许它们共存后,将引发以下两个 SecurityException。这些异常表示在受信任组件和不受信任组件之间检测到组件名称冲突(资源名称或类包名称),并且加载资源或类的请求被拒绝。
现在的问题是,我如何找到哪些类(可能是 org.apache.log4j.Logger?)发生冲突以及它们位于哪些包中?
我发现Oracle论坛中有类似的问题
For an java web application, I got this error when using JRE 1.6.0_22
java.lang.SecurityException: class "org.apache.log4j.Logger" does not match trust level of other classes in the same package
However, it works fine when using JRE 1.6.0_13.
I searched in Google, and find the there is a security enhancement since update 19.
And for this exception, it says,
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.
Now the problem is, how could i find which classes (maybe org.apache.log4j.Logger?) have the collision and which packages they are in?
I find there is a similar question in Oracle forums
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有趣的链接。我还没有遇到这个问题 - 但可能是您在 Web 应用程序的 JavaEE 容器类路径中的 和 的某个地方拥有带有“org.apache ...”的 jar。
查找并测试将其从网络应用程序中删除
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