我在执行applet时经历了以下堆栈跟踪异常。环境是Win7,Java 1.8.0_31-b13(32位),Applet已签名,DeploymentRuleSet处于活动状态,Domain是“编辑站点列表”。 Applet正在运行,但我不明白为什么我在日志中看到这个异常。我会提前感谢任何有价值的想法。
我的小程序代码是
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-9">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
<TITLE>Application Loading</TITLE>
</HEAD>
<BODY>
Application Loading Please wait...
<APPLET code="tr.system.launcher.AppLauncher" archive="applauncher.jar" width="0" height="0" MAYSCRIPT>
<PARAM name="path1" value="null">
<PARAM name="clientIP" value="10.90.11.83">
</APPLET>
</BODY>
</HTML>
例外是
security: Validate the certificate chain using CertPath API
network: Cache entry not found [url: http://test1.domain.com.tr/MyWeb/, version: null]
network: Cache entry not found [url: http://test1.domain.com.tr/MyWeb/, version: null]
network: Connecting http://test1.domain.com.tr/MyWeb/ with proxy=DIRECT
network: Connecting http://test1.domain.com.tr:80/ with proxy=DIRECT
network: Connecting http://test1.domain.com.tr/MyWeb/ with cookie "JSESSIONID=0000M5-4C-sPPw1_XwY6qz7JFi6:18lklp0ro; LtpaToken2=YW/9z9W+dxG23C7TqaQHeWwNQ0QBKiGU8cgSwBg4XeoywfcDkdtKM+leXqlEsFGO50R95NckBo8lNOVSBwFduu/swyP2+afMCbyIbjBZDUr2fdYsb/qeDd1Rhj6R2ZWdXQ+fmb1vMiDIBIuDymmziAqMliBujIkVNXyYqVvtaLGjq/QnNMq5LOQ3dn3MgMRTUVaELcA2i4/vY1fsAC4BJxpd96TkwWbGlBB8w9nqrTfPJmbxbWxGmjOKk6VRjfMxCRv7r4mvo3m1lEOmrlaOghohOMrbuop4/cX+2SKUymZcyyTj3yMXNcyd9Z4walqrw0oyifdUbBSmJPUjgms3ZHthBmgT53fKPSR6w+dJmLM4ChPrSdk6SUljets2vINX6cavlz5834Xz9cFPvMgN7xD67eV71KvBOxnjrttMe2og3rL/wrw/e9bdwZkbpy44LsTyISMCfpIuYwMOmwq55VpnNQPeU1qo9tZ46drZoXbVb4oGE8QOumwToYJvIWOjV3tUf653NYAUX5l3AmCaqYEXW3YreekxVCSrHwm+kbBuHU0HEryyV44mnXhO0NMZ3eVF3wz1uEDt3U2Rl2o5nm+f550ojj7JbqmkYuYXH2oLZfldCmdvTPScWv8XLptAulMBJDlp9fV7+Kc6JGo2yXDtIEyEGrp7JuNhmCF0bv2asLH6KkKHYu2BREnxRjmw9fWaUifrOir3YBsg4/fXhw==; LtpaToken=U0hXhHcCuoPKvrlldhp0PeTkj4psQoO3J6zoJ+Z4yrrl2fPUy3PNGqadxe7cFFFnQWdIrd69klGOzz7lgPETOyVwf2l0MZqNlTtgUdkfnz9ujxTQKf2sscYPYFoa8J4knflCn/JoPAqMPtUPUE8pz8lhafmR8v+57x3iWpWGubh5VhozXhpynbeAlD6Q1nBXEB3qJUazQL6lVAfn8yBULdH2LQGK5JdOVfqe+SNTxYIBOIif4hcIcte2ZHjIFCQs7RZv3U5gSJj3yRKkzpM2i7W6nb+Atx38ZuMBx1AaqIIQprMZ9IyC86HNDI5JRIm5BZ0kP2LbsipzqYTPr7qymc5RVYSSeE3ljNeX6qcAAzs="
java.io.FileNotFoundException: http://test1.domain.com.tr/MyWeb/
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.HttpUtils.followRedirects(Unknown Source)
at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
at com.sun.deploy.net.BasicHttpRequest.doGetRequestEX(Unknown Source)
at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
at com.sun.deploy.net.DownloadEngine.downloadResource(Unknown Source)
at com.sun.deploy.cache.ResourceProviderImpl.getResource(Unknown Source)
at com.sun.deploy.cache.ResourceProviderImpl.getResource(Unknown Source)
at com.sun.deploy.model.ResourceProvider.getResource(Unknown Source)
at com.sun.deploy.ref.CodeRef.getCodeSigners(Unknown Source)
at com.sun.deploy.security.ruleset.RuleId.contains(Unknown Source)
at com.sun.deploy.security.ruleset.DRSHelper.findRule(Unknown Source)
at com.sun.deploy.security.ruleset.DeploymentRuleSet.getDRS(Unknown Source)
at com.sun.deploy.security.ruleset.DeploymentRuleSet.findDRS(Unknown Source)
at sun.plugin2.applet.Applet2Manager.getMainDeploymentRuleSet(Unknown Source)
at sun.plugin2.main.client.PluginMain.performSSVValidation(Unknown Source)
at sun.plugin2.main.client.PluginMain$StartAppletListener.appletSSVValidation(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.fireAppletSSVValidation(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.initAppletAdapter(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
com.sun.deploy.net.FailedDownloadException: Unable to load resource: http://test1.domain.com.tr/MyWeb/
at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
at com.sun.deploy.net.DownloadEngine.downloadResource(Unknown Source)
at com.sun.deploy.cache.ResourceProviderImpl.getResource(Unknown Source)
at com.sun.deploy.cache.ResourceProviderImpl.getResource(Unknown Source)
at com.sun.deploy.model.ResourceProvider.getResource(Unknown Source)
at com.sun.deploy.ref.CodeRef.getCodeSigners(Unknown Source)
at com.sun.deploy.security.ruleset.RuleId.contains(Unknown Source)
at com.sun.deploy.security.ruleset.DRSHelper.findRule(Unknown Source)
at com.sun.deploy.security.ruleset.DeploymentRuleSet.getDRS(Unknown Source)
at com.sun.deploy.security.ruleset.DeploymentRuleSet.findDRS(Unknown Source)
at sun.plugin2.applet.Applet2Manager.getMainDeploymentRuleSet(Unknown Source)
at sun.plugin2.main.client.PluginMain.performSSVValidation(Unknown Source)
at sun.plugin2.main.client.PluginMain$StartAppletListener.appletSSVValidation(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.fireAppletSSVValidation(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.initAppletAdapter(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
//I delete caused by beacuse same java.io.FileException stack traces.
security: SSV validation:
running: 1.8.0_31
requested: null
range: SECURE
javaVersionParam: null
Rule Set version: null
network: Created version ID: 1.8.0.31
network: Created version ID: 1.8.0.31
network: Created version ID: SECURE
security: Ask user or DRS to use latest
security: continue with running version
network: Created version ID: 1.8.0.31
network: Created version ID: 1.8
network: Created version ID: 8.0.31
LOG LEVEL = null
basic: Applet loaded.
basic: Applet resized and added to parent container
basic: PERF: AppletExecutionRunnable - applet.init() BEGIN ; jvmLaunch dt 130599 us, pluginInit dt 2965578 us, TotalTime: 3096177 us
//After this point our applet run.
19/02/2015 10:00:54 [AppLauncher] [FINEST] [Utils.<clinit>] : java version : 1.8.0_31
19/02/2015 10:00:54 [AppLauncher] [FINEST] [Utils.<clinit>] : java specification version : 1.8
我的DeploymentRuleSet就是那个
<ruleset version="1.1+">
<!-- http://docs.oracle.com/javase/8/docs/technotes/guides/deploy/deployment_rules.html#CIHBCFAJ -->
<rule> <!-- allow anything signed with company's public cert -->
<id>
<certificate hash="hasOfOurCerts" />
</id>
<action permission="run" version="SECURE" />
</rule>
<rule>
<id location="*.domain.com.tr" />
<action permission="run" />
</rule>
<rule>
<id />
<action permission="default"/>
</rule>
</ruleset>