anthony0007
asked on
JNLP "Access Denied" URL
I have a java app that makes a connection to a webserver. It requests a .jar file that contains 1 file. The URL is as follows: jar://myserver/test.jar!/f act_list.t xt . This works fine when it is run as an application. HOwever, when I try to run it as a .jnlp file I encounter a error:
java.security.AccessContro lException : access denied (java.net.SocketPermission 199.43.2.201:8080 connect,resolve)
at java.security.AccessContro lContext.c heckPermis sion(Unkno wn Source)
at java.security.AccessContro ller.check Permission (Unknown Source)
at java.lang.SecurityManager. checkPermi ssion(Unkn own Source)
at java.lang.SecurityManager. checkConne ct(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 sun.net.www.protocol.jar.URLJarFile.retrieve(Unknown Source)
at sun.net.www.protocol.jar.URLJarFile.getJarFile(Unknown Source)
at sun.net.www.protocol.jar.JarFileFactory.get(Unknown Source)
at sun.net.www.protocol.jar.JarURLConnection.connect(Unknown Source)
at sun.net.www.protocol.jar.JarURLConnection.getInputStream(Unknown Source)
at fdw.EditorLookUpSettings.l oadVendors (EditorLoo kUpSetting s.java:28)
at fdw.DefineRatio.<init>(Def ineRatio.j ava:24)
at visualcomponents.FDW_Appli cation.mai n(FDW_Appl ication.ja va:14)
at sun.reflect.NativeMethodAc cessorImpl .invoke0(N ative Method)
at sun.reflect.NativeMethodAc cessorImpl .invoke(Un known Source)
at sun.reflect.DelegatingMeth odAccessor Impl.invok e(Unknown Source)
at java.lang.reflect.Method.i nvoke(Unkn own Source)
at com.sun.javaws.Launcher.ex ecuteAppli cation(Unk nown Source)
at com.sun.javaws.Launcher.ex ecuteMainC lass(Unkno wn Source)
at com.sun.javaws.Launcher.co ntinueLaun ch(Unknown Source)
at com.sun.javaws.Launcher.ha ndleApplic ationDesc( Unknown Source)
at com.sun.javaws.Launcher.ha ndleLaunch File(Unkno wn Source)
at com.sun.javaws.Launcher.ru n(Unknown Source)
at java.lang.Thread.run(Unkno wn Source)
I have not signed the .jar file that contains my application. I didn't think I needed to sign it because it is trying to access the same server from which it was downloaded. Any ideas on what I am missing?
Anthony
java.security.AccessContro
at java.security.AccessContro
at java.security.AccessContro
at java.lang.SecurityManager.
at java.lang.SecurityManager.
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 sun.net.www.protocol.jar.URLJarFile.retrieve(Unknown Source)
at sun.net.www.protocol.jar.URLJarFile.getJarFile(Unknown Source)
at sun.net.www.protocol.jar.JarFileFactory.get(Unknown Source)
at sun.net.www.protocol.jar.JarURLConnection.connect(Unknown Source)
at sun.net.www.protocol.jar.JarURLConnection.getInputStream(Unknown Source)
at fdw.EditorLookUpSettings.l
at fdw.DefineRatio.<init>(Def
at visualcomponents.FDW_Appli
at sun.reflect.NativeMethodAc
at sun.reflect.NativeMethodAc
at sun.reflect.DelegatingMeth
at java.lang.reflect.Method.i
at com.sun.javaws.Launcher.ex
at com.sun.javaws.Launcher.ex
at com.sun.javaws.Launcher.co
at com.sun.javaws.Launcher.ha
at com.sun.javaws.Launcher.ha
at com.sun.javaws.Launcher.ru
at java.lang.Thread.run(Unkno
I have not signed the .jar file that contains my application. I didn't think I needed to sign it because it is trying to access the same server from which it was downloaded. Any ideas on what I am missing?
Anthony
Is the server redirecting?
ASKER
No, it works fine when I run it as an application.
Well redirects would be followed OK by an application. Is that address public so we can test it?
ASKER
Sorry, its not. I will need to see my administrator to find a public server. However, I don't think it is a redirecting issue. I notice that the address I am accessing is http://199.43.2.201:8080/fdw/test.html and the address in the exception is the same:
java.security.AccessContro lException : access denied (java.net.SocketPermission 199.43.2.201:8080 connect,resolve)
java.security.AccessContro
What is the actual jnlp file url?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
yep, that worked. thanks!
>>yep, that worked. thanks!
I thought you said you were already doing that? (see below)
>>because it is trying to access the same server from which it was downloaded
I thought you said you were already doing that? (see below)
>>because it is trying to access the same server from which it was downloaded