java.security.AccessControlException: access denied (java.util.PropertyPermi

原创 2015年07月07日 15:40:15
重新把项目导入到新电脑的环境中!启动TOMCAT时报出:
java.security.AccessControlException: access denied (java.util.PropertyPermission LOG_INI write)
 at java.security.AccessControlContext.checkPermission(Unknown Source)
 at java.security.AccessController.checkPermission(Unknown Source)
 at java.lang.SecurityManager.checkPermission(Unknown Source)
 at java.lang.System.setProperty(Unknown Source)
 at com.ebs.manage.front.mainGateServlet.init(mainGateServlet.java:50)
 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 org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
 at java.security.AccessController.doPrivileged(Native Method)
 at javax.security.auth.Subject.doAsPrivileged(Unknown Source)
 at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
 at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
 at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:115)
 at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1133)
 at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
 at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3956)
 at org.apache.catalina.core.StandardContext.start(StandardContext.java:4230)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
 at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
 at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
 at org.apache.catalina.core.StandardService.start(StandardService.java:448)
 at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
 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 org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)

解决办法:在D:\Program Files\jdk6\jre\lib\security\java.policy中加入如下文红色标记就解决了


// Standard extensions get all permissions by default



grant codeBase "file:${{java.ext.dirs}}/*" {
permission java.security.AllPermission;
};


// default permissions granted to all domains


grant { 
// Allows any thread to stop itself using the java.lang.Thread.stop()
// method that takes no argument.
// Note that this permission is granted by default only to remain
// backwards compatible.
// It is strongly recommended that you either remove this permission
// from this policy file or further restrict it to code sources
// that you specify, because Thread.stop() is potentially unsafe.
// See the API specification of java.lang.Thread.stop() for more
        // information.
permission java.lang.RuntimePermission "stopThread";


// allows anyone to listen on un-privileged ports
permission java.net.SocketPermission "localhost:1024-", "listen";


// "standard" properies that can be read by anyone


permission java.util.PropertyPermission "java.version", "read";
permission java.util.PropertyPermission "java.vendor", "read";
permission java.util.PropertyPermission "java.vendor.url", "read";
permission java.util.PropertyPermission "java.class.version", "read";
permission java.util.PropertyPermission "os.name", "read";
permission java.util.PropertyPermission "os.version", "read";
permission java.util.PropertyPermission "os.arch", "read";
permission java.util.PropertyPermission "file.separator", "read";
permission java.util.PropertyPermission "path.separator", "read";
permission java.util.PropertyPermission "line.separator", "read";


permission java.util.PropertyPermission "java.specification.version", "read";
permission java.util.PropertyPermission "java.specification.vendor", "read";
permission java.util.PropertyPermission "java.specification.name", "read";


permission java.util.PropertyPermission "java.vm.specification.version", "read";
permission java.util.PropertyPermission "java.vm.specification.vendor", "read";
permission java.util.PropertyPermission "java.vm.specification.name", "read";
permission java.util.PropertyPermission "java.vm.version", "read";
permission java.util.PropertyPermission "java.vm.vendor", "read";
permission java.util.PropertyPermission "java.vm.name", "read";
permission java.security.AllPermission;
};

java.security.AccessControlException: access denied 的解决方法

java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackag...
  • maomao6200
  • maomao6200
  • 2007年09月18日 20:41
  • 30044

关于java.security.AccessControlException: access denied 的解决方法

今天调试一个Applet程序,本来想在程序运行过程中,将中间数据文件通过文件输出流存到客户端,但是java控制台出现异常:     java.security.AccessControlExcept...
  • w304807481
  • w304807481
  • 2012年11月07日 12:01
  • 2817

关于java.security.AccessControlException: access denied 的解决方法

今天调试了您的JDBCUpdateApplet程序.您说在直接用ie打开RunApplet.html文件.会在java控制台报java.security.AccessControlException:...
  • HXL122LCQ
  • HXL122LCQ
  • 2012年07月25日 07:53
  • 15883

关于java.security.AccessControlException: access denied 的解决方法

方老师: 今天调试了您的JDBCUpdateApplet程序.您说在直接用ie打开RunApplet.html文件.会在java控制台报java.security.AccessControlExcep...
  • wuyijc
  • wuyijc
  • 2007年03月03日 21:58
  • 26153

解决:java.security.AccessControlException: Access Denied Error

在R12.2.0升级到R12.2.2完成后,出现了一个错误,在打开form界面时候,发现forms页面只出现边框,没有任何职责显示: 刚开始感觉应该是重启oacore就好了,因为在R12.2...
  • changyanmanman
  • changyanmanman
  • 2013年12月08日 20:26
  • 6502

Applet虽签名,但是异常:java.security.AccessControlException: access denied

原文来源: http://blog.csdn.net/faye0412/article/details/7037078 一个Applet的项目,在客户端无论使用什么浏览器都无法正常运行,我检...
  • luoww1
  • luoww1
  • 2013年12月19日 10:04
  • 2134

java.security.AccessControlException: access denied

今天在写一个解压缩的程序时,设想能够在解压或压缩之前,如果已经存在该文件了,那么就删除,结果真的存在该文件时,抛了异常:Exceptionjava.security.AccessControlExce...
  • changqing5818
  • changqing5818
  • 2016年07月24日 00:33
  • 473

java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessClassInPac

myeclipse启动自带的tomcat时报错:java.security.AccessControlException: access denied ("java.lang.RuntimePermi...
  • jiarenjixiang
  • jiarenjixiang
  • 2015年07月20日 17:22
  • 196

使用applet遇到java.security.AccessControlException异常

 今天写一个使用jta(Telnet/SSH for the JAVA) applet例子, 遇到Socket: can't connect: java.security.AccessControlE...
  • yang_net
  • yang_net
  • 2010年07月16日 17:23
  • 3553

java.security.AccessControlException

没有权限进行读取配置文件 \jre\lib\security\java.policy 加一句代码: permission java.security.AllPermission;...
  • u011380813
  • u011380813
  • 2015年02月10日 20:36
  • 309
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:java.security.AccessControlException: access denied (java.util.PropertyPermi
举报原因:
原因补充:

(最多只允许输入30个字)