package baoying.java.lang;public class ExceptionStackPrint {public static void main(String[] args) {/**print exception at B_Ajava.lang.RuntimeException: D_C_B_Aat baoying.java.lang.D_C_B_A.execute(ExceptionStackPrint.java:48)at baoying.java.lang.C_B_A.execute(ExceptionStackPrint.java:41)at baoying.java.lang.B_A.execute(ExceptionStackPrint.java:28)at baoying.java.lang.A.execute(ExceptionStackPrint.java:21)at baoying.java.lang.ExceptionStackPrint.main(ExceptionStackPrint.java:15)*/new A().execute();}}class A{public void execute(){new B_A().execute();}}class B_A{public void execute(){try{new C_B_A().execute();}catch(Throwable t){System.out.println("print exception at B_A");t.printStackTrace();}}}class C_B_A{public void execute(){new D_C_B_A().execute();}}class D_C_B_A{public void execute(){throw new RuntimeException("D_C_B_A");}}
1. Image iconImg = Toolkit.getDefaultToolkit().getImage(url);
2. System.out.println(threadInfo+ " "+ new java.util.Date()+method+" load done:"+imageInCP);
Baoying Thread - 19783394485810 Started
Baoying Thread - 19783394485810:98 wait 30 seconds to let you be ready, and thread will start after sleep
cache: Create from verifier: JarSigningData{hasOnlySignedEntries=true, hasSingleCodeSource=true, hasMissingSignedEntries=false}
cache: Upgrade of entry done
cache: readIndexFile returning success
network: CleanupThread used 1952979 us
Baoying Thread - 19783394485810:98 Fri Jun 12 14:50:57 CST 2015getImageByURL: try to load:/baoying.JPG
Baoying Thread - 19783394485810:98 Fri Jun 12 14:50:57 CST 2015getImageByURL: load url:jar:https://huhuzhu-scs.nott.ime.reuters.com/ptshub/baoying/BaoyingImageShow.jar!/baoying.JPG
network: Cache entry not found [url: http://huhuzhu-scs.nott.ime.reuters.com/crossdomain.xml, version: null]
network: Connecting http://huhuzhu-scs.nott.ime.reuters.com/crossdomain.xml with proxy=DIRECT
network: Connecting http://huhuzhu-scs.nott.ime.reuters.com:80/ with proxy=DIRECT
network: Connecting http://huhuzhu-scs.nott.ime.reuters.com/crossdomain.xml with cookie "63738647932733330794D3=E4F34636C61336A3F6B554; D693E3D38686E6D3E65655F36523964614D683E4041595E4452676F466C5A363D3=A4348516A307F376246553; D693E3D38686E6D3E656550505F3F34656D47334D69595F415642355639407D654=8574E3C644D32364346514; D693E3D38686E6D3E656550505F3F34656D47334D6952375F405F61385057517D4=1426633655C637732795D4; https%3A%2F%2Fhuhuzhu-scs.nott.ime.reuters.com%2Fptshub%2Ftheme=m%3Aid%7Cs%3Areuters%2Cfile%7Cs%3Axtheme-reuters.css"
network: Connecting http://huhuzhu-scs.nott.ime.reuters.com:80/ with proxy=DIRECT
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at java.io.BufferedInputStream.fill(Unknown Source)
at java.io.BufferedInputStream.read1(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at sun.net.www.http.HttpClient.parseHTTPHeader(Unknown Source)
at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.access$200(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$9.run(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$9.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessController.doPrivileged(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at com.sun.deploy.net.CrossDomainXML.check(Unknown Source)
at com.sun.deploy.net.CrossDomainXML.check(Unknown Source)
at sun.plugin2.applet.SecurityManagerHelper.checkConnectHelper(Unknown Source)
at sun.plugin2.applet.AWTAppletSecurityManager.checkConnect(Unknown Source)
at java.net.InetAddress.getAllByName0(Unknown Source)
at java.net.InetAddress.getAllByName(Unknown Source)
at java.net.InetAddress.getAllByName(Unknown Source)
at java.net.InetAddress.getByName(Unknown Source)
at java.net.URLStreamHandler.getHostAddress(Unknown Source)
at java.net.URLStreamHandler.hashCode(Unknown Source)
at java.net.URL.hashCode(Unknown Source)
at sun.net.www.protocol.jar.Handler.hashCode(Unknown Source)
at java.net.URL.hashCode(Unknown Source)
at java.util.HashMap.hash(Unknown Source)
at java.util.HashMap.get(Unknown Source)
at sun.misc.SoftCache.get(Unknown Source)
at sun.awt.SunToolkit.getImageFromHash(Unknown Source)
at sun.awt.SunToolkit.getImage(Unknown Source)
at ImageShowApplet.getImageByURL(ImageShowApplet.java:68)
at ImageShowApplet$1.run(ImageShowApplet.java:37)
at java.lang.Thread.run(Unknown Source)
java.security.AccessControlException: access denied ("java.net.SocketPermission" "huhuzhu-scs.nott.ime.reuters.com" "resolve")
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkConnect(Unknown Source)
at sun.plugin2.applet.SecurityManagerHelper.checkConnectHelper(Unknown Source)
at sun.plugin2.applet.AWTAppletSecurityManager.checkConnect(Unknown Source)
at java.net.InetAddress.getAllByName0(Unknown Source)
at java.net.InetAddress.getAllByName(Unknown Source)
at java.net.InetAddress.getAllByName(Unknown Source)
at java.net.InetAddress.getByName(Unknown Source)
at com.sun.deploy.net.CrossDomainXML.addAccess(Unknown Source)
at com.sun.deploy.net.CrossDomainXML.allowNoAccess(Unknown Source)
at com.sun.deploy.net.CrossDomainXML.check(Unknown Source)
at sun.plugin2.applet.SecurityManagerHelper.checkConnectHelper(Unknown Source)
at sun.plugin2.applet.AWTAppletSecurityManager.checkConnect(Unknown Source)
at java.net.InetAddress.getAllByName0(Unknown Source)
at java.net.InetAddress.getAllByName(Unknown Source)
at java.net.InetAddress.getAllByName(Unknown Source)
at java.net.InetAddress.getByName(Unknown Source)
at java.net.URLStreamHandler.getHostAddress(Unknown Source)
at java.net.URLStreamHandler.hashCode(Unknown Source)
at java.net.URL.hashCode(Unknown Source)
at sun.net.www.protocol.jar.Handler.hashCode(Unknown Source)
at java.net.URL.hashCode(Unknown Source)
at java.util.HashMap.hash(Unknown Source)
at java.util.HashMap.get(Unknown Source)
at sun.misc.SoftCache.get(Unknown Source)
at sun.awt.SunToolkit.getImageFromHash(Unknown Source)
at sun.awt.SunToolkit.getImage(Unknown Source)
at ImageShowApplet.getImageByURL(ImageShowApplet.java:68)
at ImageShowApplet$1.run(ImageShowApplet.java:37)
at java.lang.Thread.run(Unknown Source)
--问题在此:问什么下面这行log能打印出来?按照上面的调用栈,已经明确表示在ImageShowApplet.java:68已经抛出AccessControlException,那么下面的程序应该无法继续执行。线程应该终止。但是程序继续执行,而且还是那个线程。真是百思不得其姐 !
Baoying Thread - 19783394485810:98 Fri Jun 12 14:51:07 CST 2015getImageByURL: load done:/baoying.JPG
Baoying Thread - 19783394485810:98 Fri Jun 12 14:51:07 CST 2015getImageByURL: try to load:/baoying_02.JPG
Baoying Thread - 19783394485810:98 Fri Jun 12 14:51:07 CST 2015getImageByURL: load url:jar:https://huhuzhu-scs.nott.ime.reuters.com/ptshub/baoying/BaoyingImageShow.jar!/baoying_02.JPG
Baoying Thread - 19783394485810:98 Fri Jun 12 14:51:12 CST 2015getImageByURL: load done:/baoying_02.JPG
Baoying Thread - 19783394485810:98 Fri Jun 12 14:51:12 CST 2015getImageByURL: try to load:/baoying_03.JPG
Baoying Thread - 19783394485810:98 Fri Jun 12 14:51:12 CST 2015getImageByURL: load url:jar:https://huhuzhu-scs.nott.ime.reuters.com/ptshub/baoying/BaoyingImageShow.jar!/baoying_03.JPG
Baoying Thread - 19783394485810:98 Fri Jun 12 14:51:16 CST 2015getImageByURL: load done:/baoying_03.JPG
Baoying Thread - 19783394485810:98 re-try the loaded pic baoying_03.JPG
Baoying Thread - 19783394485810:98 Fri Jun 12 14:51:16 CST 2015getImageByURL: try to load:/baoying_03.JPG
Baoying Thread - 19783394485810:98 Fri Jun 12 14:51:16 CST 2015getImageByURL: load url:jar:https://huhuzhu-scs.nott.ime.reuters.com/ptshub/baoying/BaoyingImageShow.jar!/baoying_03.JPG
Baoying Thread - 19783394485810:98 Fri Jun 12 14:51:30 CST 2015getImageByURL: load done:/baoying_03.JPG
import java.applet.Applet;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.Toolkit;
import java.net.URL;
public class ImageShowApplet extends Applet {
private static final long serialVersionUID = 1L;
Thread t = null;
public void paint(Graphics g) {
g.drawString("Welcome in Java Applet.", 40, 20);
synchronized(this){
if(t == null){
String id = String.valueOf(System.nanoTime());
String threadName = "Baoying Thread - " + id;
t = new Thread(new Runnable(){
public void run(){
long threadID = Thread.currentThread().getId();
String name = Thread.currentThread().getName();
String nameAndID = name +":" + threadID;
System.out.println(nameAndID + " wait 30 seconds to let you be ready, and thread will start after sleep");
try {
Thread.sleep(30 * 1000);
} catch (InterruptedException e) {
System.out.println(nameAndID + " interrupted exception");
e.printStackTrace();
}
getImageByURL("/baoying.JPG",nameAndID);
getImageByURL("/baoying_02.JPG",nameAndID);
getImageByURL("/baoying_03.JPG",nameAndID);
System.out.println(nameAndID + " re-try the loaded pic baoying_03.JPG");
getImageByURL("/baoying_03.JPG",nameAndID);
//getImageByFilename();
}
},threadName);
System.out.println(threadName+" is Created");
t.start();
System.out.println(threadName + " Started");
}
}
}
public void getImageByURL(String imageInCP, String threadInfo){
String method = "getImageByURL:";
System.out.println(threadInfo+ " "+ new java.util.Date()+method+" try to load:"+imageInCP);
URL url = this.getClass().getResource(imageInCP);
if(url == null){
System.out.println(threadInfo+ " "+ new java.util.Date()+method+" null url by:"+imageInCP);
return;
}
System.out.println(threadInfo+ " "+ new java.util.Date()+method+" load url:"+url.toString());
Image iconImg = Toolkit.getDefaultToolkit().getImage(url);
if(iconImg == null){
System.out.println(threadInfo+ " "+ new java.util.Date()+method+" null image by:"+imageInCP);
return;
}
System.out.println(threadInfo+ " "+ new java.util.Date()+method+" load done:"+imageInCP);
}
}
[参考]
Another guy(by eagleanec - 2012-08-21 00:58) with similar trace
https://weblogs.java.net/blog/2008/05/28/java-doodle-crossdomainxml-support
another report with same stack trace
https://community.oracle.com/thread/2179788
还有一个csdn的,无满意回复而结贴
http://bbs.csdn.net/topics/360101851
java.security.AccessControlException: access denied ("java.net.SocketPermission" "huhuzhu-scs.nott.ime.reuters.com" "resolve") |
Baoying Thread - 19783394485810:98 Fri Jun 12 14:50:57 CST 2015getImageByURL: load url:jar:https://huhuzhu-scs.nott.ime.reuters.com/ptshub/baoying/BaoyingImageShow.jar!/baoying.JPG |
相关推荐
2016-2017年美国星巴克单杯咖啡销售额.xls
行业数据-2016-2017年美国星巴克单杯咖啡销售额.rar
大学生静态网页设计期末作业—HTML+CSS制作星巴克咖啡静态网页设计.zip 95分以上必过项目,下载即用,无需修改。小白也可实战。 大学生静态网页设计期末作业—HTML+CSS制作星巴克咖啡静态网页设计.zip 95分以上必过...
餐饮-深度复盘星巴克成长路径:咖啡 vs.高端现制茶饮,星巴克 vs.奈雪.pdf
微信小程序星巴克咖啡,手机端界面布局设计源码下载,可直接部署。
行业数据-2007-2019年星巴克营业收入.rar
数据-2009-2019年星巴克各产品类型收入分配情况.rar
行业数据-2005-2019年星巴克国际和美国门店数量.rar
行业数据-2005-2019年公司经营星巴克全球商店不同产品销售额占比.rar
海伦司-HK-深度报告:夜间星巴克,酒馆拼多多,潜力无限.rar
数据-2011-2019年星巴克全球广告支出.rar
数据-2010-2019年星巴克美国广告支出.rar
行业数据-2007-2019年星巴克净利润.rar
数据-2009-2019年星巴克全球季度营收.rar
行业数据-2003-2019年星巴克全球营收.rar
微信小程序代码-星巴克中国.zip,小程序模板代码,可以直接从源码里粘贴复制过来,虽然这样做不利于自己独立编写代码。
星巴克咖啡饮品网页模板是一款咖啡休闲饮料会所网站模板下载。
网页设计期末作业-网上咖啡店(免积分下载),有导航栏,商品标签,搜索栏等等,运用HTML/CSS,链接转到星巴克咖啡,详细信息请看我的文章介绍。
2005-2019年公司经营星巴克全球商店不同产品销售额占比.xls
微信小程序 星巴克中国 (源码)微信小程序 星巴克中国 (源码)微信小程序 星巴克中国 (源码)微信小程序 星巴克中国 (源码)微信小程序 星巴克中国 (源码)微信小程序 星巴克中国 (源码)微信小程序 星巴克中国 (源码)微信...