Applet无法在Chrome,Firefox中工作但在IE中工作

时间:2013-08-06 13:38:20

标签: applet

我知道主题类似于其他一些可用的问题,但没有一个给出令人满意的解决方案。所以问题就在这里。我有一个在IE中完美运行但在Chrome或Firefox中无法运行的applet。 在Java控制台中找到的跟踪是这样的: Java插件10.25.2.17 使用JRE版本1.7.0_25-b17 Java HotSpot(TM)客户端VM

java.security.AccessControlException: access denied ("java.net.SocketPermission" "www.w3.org:80" "connect,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 sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.http.HttpClient.<init>(Unknown Source)
    at sun.net.www.http.HttpClient.New(Unknown Source)
    at sun.net.www.http.HttpClient.New(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.dispatch(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
    at com.nwoods.jgo.svg.DefaultDocument.a(Unknown Source)
    at com.nwoods.jgo.svg.DefaultDocument.SVGReadDoc(Unknown Source)
    at com.bea.dsp.oam.console.metadatabrowser.datalineage.LineageGraphApplet.start(LineageGraphApplet.java:53)
    at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter.start(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
java.lang.NullPointerException
    at com.nwoods.jgo.svg.DefaultElement.getAttribute(Unknown Source)
    at com.nwoods.jgo.svg.DefaultDocument.buildJGoDoc(Unknown Source)
    at com.nwoods.jgo.svg.DefaultDocument.SVGReadDoc(Unknown Source)
    at com.bea.dsp.oam.console.metadatabrowser.datalineage.LineageGraphApplet.start(LineageGraphApplet.java:53)
    at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter.start(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

页面中的applet标记如下:

<applet width="100%" code="/LineageGraphApplet.class"archive="/DataLineageApplet.jar" style="border:0px"   id="lineageapplet" MAYSCRIPT>
<param name="viewDocumentUrl" value="/generateDocument.do?mode=0"/>
</applet>

可能是什么问题以及如何解决它?类似的问题已经看到了诸如打开端口或看到applet使用applet查看器与安全策略文件结合授予所有权限或签署jar的答案。但我仍然是无法在Firefox上运行?

1 个答案:

答案 0 :(得分:1)

我有一个类似的问题 - 我的applet也在IE中运行,但在其他浏览器中没有。但是,根据您提供的信息量,很难说清楚。您是否可以在访问applet之前使用身份验证(如FormLogin,BasicLogin等)?如果是这样,您可以尝试以下方法:

cookie-http-only设置(因此禁用)为false。