java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "getClassLoader")
转自:https://blog.csdn.net/bluecard2008/article/details/80921682?utm_source=blogxgwz0
摘要: 今天在使用jetty做容器运行一个java web app时却给出了这样的错误: ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 java.
今天在使用jetty做容器运行一个java web app时却给出了这样的错误:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
java.security.AccessControlException: access denied ( "java.lang.RuntimePermission" "getClassLoader" ) at java.security.AccessControlContext.checkPermission(Unknown Source) at java.security.AccessController.checkPermission(Unknown Source) at org.eclipse.jetty.server.handler.ContextHandler$Context.getClassLoader(ContextHandler.java: 2390 ) at org.apache.tomcat.util.scan.StandardJarScanner.scan(StandardJarScanner.java: 210 ) at org.apache.jasper.servlet.TldScanner.scanJars(TldScanner.java: 250 ) at org.apache.jasper.servlet.TldScanner.scan(TldScanner.java: 106 ) at org.apache.jasper.servlet.JasperInitializer.onStartup(JasperInitializer.java: 103 ) at org.eclipse.jetty.plus.annotation.ContainerInitializer.callStartup(ContainerInitializer.java: 106 ) at org.eclipse.jetty.annotations.ServletContainerInitializerListener.doStart(ServletContainerInitializerListener.java: 107 ) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java: 64 ) at org.eclipse.jetty.util.component.AggregateLifeCycle.doStart(AggregateLifeCycle.java: 81 ) at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java: 58 ) at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java: 96 ) at org.eclipse.jetty.server.handler.ScopedHandler.doStart(ScopedHandler.java: 115 ) at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java: 763 ) at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java: 249 ) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java: 1242 ) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java: 717 ) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java: 494 ) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java: 64 ) at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java: 95 ) at org.eclipse.jetty.server.Server.doStart(Server.java: 282 ) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java: 64 ) at net.sourceforge.eclipsejetty.starter.embedded.JettyEmbeddedAdapter.start(JettyEmbeddedAdapter.java: 67 ) at net.sourceforge.eclipsejetty.starter.common.AbstractJettyLauncherMain.launch(AbstractJettyLauncherMain.java: 85 ) at net.sourceforge.eclipsejetty.starter.embedded.JettyEmbeddedLauncherMain.main(JettyEmbeddedLauncherMain.java: 42 ) |
在网上搜索一番后,找到了解决办法:
1. 查看工程使用的哪个JRE
2. 在这个目录下的【security】文件夹下找到【java.policy】文件:
3. 用记事本或者notepad++打开它,并在grant中增加下面的两行,并保存。
4. 重启Jetty,错误消失,结果正常。
至于为什么这样可以解决,网上还搜到相关说明。我暂时也没时间去深究,等以后有时间再说吧。
java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "getClassLoader")的更多相关文章
- StreamSets学习系列之启动StreamSets时出现Caused by: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "test.to.ensure.security.is.configured.correctly" "read")错误的解决办法
不多说,直接上干货! 问题详情 [hadoop@master streamsets-datacollector-]$ ./bin/streamsets dc Java 1.8 detected; ad ...
- windows elasticsearch使用ik分词器插件后启动报错java.security.AccessControlException: access denied ("java.io.FilePermission" "D:...........\plugins\ik-analyzer\config\IKAnalyzer.cfg.xml" "read")
删除es安装文件夹中空格,遂解决......(哭
- kylin cube测试时,报错:org.apache.hadoop.security.AccessControlException: Permission denied: user=root, access=WRITE, inode="/user":hdfs:supergroup:drwxr-xr-x
异常: org.apache.hadoop.security.AccessControlException: Permission denied: user=root, access=WRITE, i ...
- 一脸懵逼加从入门到绝望学习hadoop之 org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.AccessControlException): Permission denied: user=Administrator, access=WRITE, inode="/":root:supergroup:drwxr-xr报错
1:初学hadoop遇到各种错误,这里贴一下,方便以后脑补吧,报错如下: 主要是在window环境下面搞hadoop,而hadoop部署在linux操作系统上面:出现这个错误是权限的问题,操作hado ...
- 报错:HDFS IO error org.apache.hadoop.security.AccessControlException: Permission denied: user=root, access=WRITE, inode="/yk/dl/alarm_his":hdfs:supergroup:drwxr-xr-x
报错背景: CDH集成了Flume服务,准备通过Flume将kafka中的数据放到HDFS中, 启动Flume的时候报错. 报错现象: // :: INFO hdfs.HDFSDataStream: ...
- 异常-Caused by: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.AccessControlException): Permission denied: user=hdfs, access=WRITE, inode="/hbase":root:supergroup:drwxr-xr-x
1 详细异常 Caused by: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.AccessControlExce ...
- Exception in thread "main" org.apache.hadoop.security.AccessControlException: Permission denied: user=lenovo, access=WRITE, inode="/user/hadoop/spark/people_savemode_test/_temporary/0":hadoop:supergro
保存文件时权限被拒绝 曾经踩过的坑: 保存结果到hdfs上没有写的权限 通过修改权限将文件写入到指定的目录下 * * * $HADOOP_HOME/bin/hdfs dfs -chmod 777 /u ...
- java.sql.SQLException: Access denied for user 'sa'@'localhost' (using password: YES)
1.错误描述 ERROR:2015-05-01 23:43:04[localhost-startStop-1] - HHH000319: Could not get database metadata ...
- java.sql.SQLException: Access denied for user 'sa'@'localhost' (using password: NO)
1.错误描述 INFO:2015-05-01 16:53:29[main] - HHH000228: Running hbm2ddl schema update INFO:2015-05-01 16: ...
随机推荐
- [Codeforces]Good Bye 2017
A - New Year and Counting Cards #pragma comment(linker, "/STACK:102400000,102400000") #inc ...
- 【Oracle】DBMS_STATS.GATHER_TABLE_STATS分析表
表分析,简单的说,就是收集表和索引的信息,CBO根据这些信息决定SQL最佳的执行路径.通过对表的分析,可以产生一些统计信息,通过这些信息oracle的优化程序可以进行优化. 语法: DBMS_STAT ...
- java 读取配置文件(nx就转了)
借鉴别人的 package test; import java.io.FileInputStream; import java.io.FileNotFoundException; import jav ...
- java调用第三方命令,process.waitfor()挂起(你不知道的坑)
我们常在java中运行第三方程序,如sh.python,java提供一个Runtime.exec()方法,生成一个Process对象.今天在使用这个方法的时候,发现接口半天没有返回数据.查了一下,原来 ...
- MySQL 表与表之间建立关系
引子:如下图是一张非常寻常的表格,在以前的工作中实常会制作类似的表格,但是今天的数据库内容,将我之前这种传统的制表思路上升了一个层次: 今天核心的内容就是怎样让表与表之间产生关系,在思考这个问题的时候 ...
- pip是用代理
内网访问外网时,需要通过vpn访问,但是pip貌似不能是用vpn访问外网.直接度娘: windows下: set http_proxy=http://代理服务器:端口 不行可以试试下面的: set h ...
- 各种概念POJO、JAVABEAN、DAO、DTO、PO、VO、BO、SSH、EJB
转自:https://my.oschina.net/pacoyang/blog/151695 POJO(pure old java object)是普通java类,有一些private的参数作为对象的 ...
- Python的基础知识01 _个人笔记
1.快捷键:Alt+n 回到上一条语句>把上一条语句复制 Alt+p 去到下一条语句 2.Python 中不用“:”来表示一个语句 3.print("I Love you" ...
- Project Euler 2 Even Fibonacci numbers
题意:斐波那契数列中的每一项都是前两项的和.由1和2开始生成的斐波那契数列前10项为:1, 2, 3, 5, 8, 13, 21, 34, 55, 89, -考虑该斐波那契数列中不超过四百万的项,求其 ...
- 以checked选中作为判断条件的各种写法
<input type="radio" name="choice" id="ipt1"> <label for=" ...