2013-08-06 304 views
0

我知道這個問題類似於其他一些可用的問題,但都沒有給出令人滿意的解決方案。所以這裏有問題。我有一個小程序,在IE中完美工作,但不工作在Chrome或Firefox中。 在Java控制檯中發現的痕跡是這樣的: Java插件10.25.2.17 使用JRE版本1.7.0_25-B17的HotSpot的Java(TM)客戶機VM小應用程序不工作在Chrome瀏覽器,火狐瀏覽器,但在IE瀏覽器工作

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> 

可能是問題,如何解決類似的問題,已經看到像打開的端口,或看到使用applet瀏覽器中結合了安全策略文件授予的所有權限或簽署的jar小程序工作的答案是什麼?但我仍然無法使它在Firefox上工作?

+0

由於您明確指定了Java版本 - 之前它有效嗎?你是否用正式證書籤署你的罐子? (如果沒有,您需要降低java設置中的安全設置)您使用哪個版本的服務器? – Lonzak

+0

jdk不是問題,因爲在所有java版本中都可以看到問題。 簽名jar不起作用。 服務器是Oracle Weblogic服務器-12c – user1004779

回答

1

我曾經有過類似的問題 - 我的小程序也在IE中運行,但在其他瀏覽器中沒有。但是,從您提供的信息量來看,很難說清楚。你可以在訪問applet之前使用認證(如FormLogin,BasicLogin等)嗎?如果是這樣,您可以嘗試以下操作:

將(因此禁用)cookie-http-only設置爲false。

+0

工作就像一個魅力Lonzak – user1004779

相關問題