0

我知道这个主题与其他一些可用的问题相似,但没有一个给出令人满意的解决方案。所以问题来了。我有一个在 IE 中完美运行但在 Chrome 或 Firefox 中不起作用的小程序。在 Java 控制台中找到的跟踪是:Java Plug-in 10.25.2.17 Using JRE version 1.7.0_25-b17 Java HotSpot(TM) Client 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 width="100%" code="/LineageGraphApplet.class"archive="/DataLineageApplet.jar" style="border:0px"   id="lineageapplet" MAYSCRIPT>
<param name="viewDocumentUrl" value="/generateDocument.do?mode=0"/>
</applet>

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

4

1 回答 1

1

我曾经遇到过类似的问题——我的小程序也在 IE 中运行,但在其他浏览器中没有。但是,从您提供的信息量来看,很难说。在访问小程序之前,您是否使用了身份验证(如 FormLogin、BasicLogin 等)?如果是这样,您可以尝试以下方法:

将cookie-http-only设置(从而禁用)为 false。

于 2013-08-07T11:36:52.150 回答