Webstart AccessControlException

I am getting the following exception when I start my application via Webstart:
java.security.AccessControlException: access denied (java.util.PropertyPermission java.util.logging.config.file read)
     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.checkPropertyAccess(Unknown Source)
     at java.lang.System.getProperty(Unknown Source)
     at com.company.logging.LoggerFactory.getFactory(LoggerFactory.java:23)
     at com.company.app.StudentsWeb.main(StudentsWeb.java:47)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
     at java.lang.reflect.Method.invoke(Unknown Source)
     at com.sun.javaws.Launcher.executeApplication(Unknown Source)
     at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
     at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
     at com.sun.javaws.Launcher.run(Unknown Source)
     at java.lang.Thread.run(Unknown Source)
The application jar is signed. The application runs outside of Webstart.
Here is the jnlp code:
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.4+" codebase=" http://localhost" >
<information>
<title>Students Application</title>
<vendor>Company</vendor>
<homepage href="index.html"/>
<description kind="one-line">Students Application</description>
<icon href="images/w-smalllogo.gif"/>
<icon kind="splash" href="images/students_splash.gif"/>
<offline-allowed/>
<shortcut online="false">
<desktop/>
<menu submenu="Students App - Java Web Start"/>
</shortcut>
<security>          
          <all-permissions/>
     </security>
</information>
<resources>
     <j2se version="1.6+" />
     <jar href="StudentsApp.jar"/>
</resources>
<application-desc main-class="com.company.StudentsWeb">
<argument>post</argument>
<argument>Students</argument>
<argument>key</argument>
</application-desc>
</jnlp>
Any help is appreciated.
Edited by: mkodeih on Sep 15, 2009 4:17 PM

mkodeih wrote:
I am getting the following exception when I start my application via Webstart:
Any help is appreciated.Did you have a question?
I have two more questions for you..
1) Did you validate your JNLP against a DTD or XSD?
2) At time of download, were you prompted to trust the digitally signed code?
I can already guess the answer to (1), but I'd like to hear it from you. The JaNeLA *(<- link)* & [YAX-V|http://pscode.org/xml/xmltools.html#yaxv] *(<- link)* tools on my website are provided to do validation (though JaNeLA does more).

Similar Messages

  • HTTP tunneling T3 when using WebStart - java.security.AccessControlException: access denied

    Hi !
    WLS version: 5.1 with SP10
    Server OS: NT4
    Client distr.: Java WebStart
    Client OS: Windows 2000
    I get the following exception when I try to create a T3 connection
    (tunnelled through HTTP) to my WLS server:
    java.security.AccessControlException: access denied
    (java.util.PropertyPermission proxyHost read)
    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.checkPropertyAccess(Unknown Source)
    at java.lang.System.getProperty(Unknown Source)
    at weblogic.net.http.HttpClient.resetProperties(HttpClient.java:62)
    at weblogic.net.http.HttpClient.openServer(HttpClient.java:186)
    at weblogic.net.http.HttpClient.<init>(HttpClient.java:85)
    at weblogic.net.http.HttpClient.New(HttpClient.java:117)
    at weblogic.net.http.HttpURLConnection.connect(HttpURLConnection.java:97)
    at
    weblogic.net.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1
    44)
    at weblogic.socket.JVMSocketHTTPClient.sendMsg(JVMSocketHTTPClient.java:260)
    at weblogic.socket.JVMAbbrevSocket.sendOutMsg(JVMAbbrevSocket.java:348)
    at weblogic.socket.JVMAbbrevSocket.sendMsg(JVMAbbrevSocket.java:237)
    at weblogic.rjvm.ConnectionManager.sendMsg(ConnectionManager.java:420)
    at weblogic.rjvm.RJVMImpl.send(RJVMImpl.java:564)
    at
    weblogic.rjvm.MsgAbbrevOutputStream.flushAndSendRaw(MsgAbbrevOutputStream.ja
    va:155)
    at
    weblogic.rjvm.MsgAbbrevOutputStream.flushAndSend(MsgAbbrevOutputStream.java:
    163)
    at
    weblogic.rjvm.MsgAbbrevOutputStream.sendRecv(MsgAbbrevOutputStream.java:186)
    at
    weblogic.rmi.internal.BasicOutgoingRequest.sendRecv(BasicOutgoingRequest.jav
    a:23)
    at
    weblogic.rmi.extensions.AbstractRequest.sendReceive(AbstractRequest.java:73)
    at
    com.unitor.message.server.UserInformationServiceBeanHomeImpl_WLStub.create(U
    serInformationServiceBeanHomeImpl_WLStub.java:151)
    at
    com.unitor.message.server.UserInformationServiceBeanHomeImpl_ServiceStub.cre
    ate(UserInformationServiceBeanHomeImpl_ServiceStub.java:121)
    at
    com.unitor.message.beans.gui.MessageLogic.getUserInformationService(MessageL
    ogic.java:230)
    at
    com.unitor.message.beans.gui.MessageLogic.addUserInformation(MessageLogic.ja
    va:186)
    at com.unitor.message.beans.gui.MessageLogic.<init>(MessageLogic.java:104)
    at
    com.unitor.message.beans.gui.MessageApplication.internalStartApplication(Mes
    sageApplication.java:64)
    at
    com.unitor.ifs.util.gui.UnitorApplication.startApplication(UnitorApplication
    .java:167)
    at
    com.unitor.ifs.util.gui.DesktopApplication$ApplicationLoader.run(DesktopAppl
    ication.java:676)
    at
    com.unitor.ifs.util.gui.DesktopApplication.startApplication(DesktopApplicati
    on.java:303)
    at
    com.unitor.ifs.util.gui.UnitorDesktopAppStarter$SwingEventCall.run(UnitorDes
    ktopAppStarter.java:294)
    at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
    The strange thing is that I can connect to my server if I run the client on
    NT4 !!!
    I solved the problem by modifying my local java.policy file with the
    following settings:
    // Test with HTTP tunnelling. 18.10.2001
    [email protected]
    permission java.util.PropertyPermission "proxyHost", "read";
    permission java.util.PropertyPermission "proxyPort", "read";
    permission java.util.PropertyPermission "http.proxyHost", "read";
    permission java.util.PropertyPermission "http.proxyPort", "read";
    permission java.net.SocketPermission "*","connect,resolve";
    // Test with HTTP tunnelling. 18.10.2001
    [email protected]
    Have someone else experienced the same or similar problems ?
    How can I make sure that the client gets access to read the properties
    http.proxyHost, http.proxyPort, proxyHost and proxyPort without telling the
    users of the client application to modify their java.policy files ?
    Any leads will be greatly appreciated !
    Regards
    Sten Richard

    This is in reply to the first post. I don't know what happened after.
    Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission sun.arch.data.model read)
         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.checkPropertyAccess(Unknown Source)
         at java.lang.System.getProperty(Unknown Source)
         at org.eclipse.swt.internal.Library.loadLibrary(Library.java:167)
         at org.eclipse.swt.internal.Library.loadLibrary(Library.java:151)
         at org.eclipse.swt.internal.C.<clinit>(C.java:21)
    If you read the above trace from bottom to top, it shows none of you classes, only classes from that Eclipse library, which seems to loadLibrary() a native DLL. In order to do this, it needs to call System.getProperty( "sun.arch.data.model" ). This call is not allowed from un unsigned applet. So I guess you need to sign the applet and this problem will go away. Many other problems may follow. Just read very very carefully all the related documentation, which I did not.

  • AccessControlException when trying WebStart an RCP plugin

    Hello!
    I have the following scenario: I have an RCP plugin and I would like to be able to run it using WebStart. But unfortunately I get the following exception:
    java.security.AccessControlException: access denied (java.util.PropertyPermission eclipse.exitcode write)
    at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
    at java.security.AccessController.checkPermission(AccessController.java:546)
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
    at org.eclipse.osgi.framework.internal.core.FrameworkProperties.setProperty(FrameworkProperties.java:64)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:219)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
    at org.eclipse.equinox.launcher.WebStartMain.basicRun(WebStartMain.java:73)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
    at org.eclipse.equinox.launcher.WebStartMain.main(WebStartMain.java:51)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sun.javaws.Launcher.executeApplication(Launcher.java:1421)
    at com.sun.javaws.Launcher.executeMainClass(Launcher.java:1367)
    at com.sun.javaws.Launcher.doLaunchApp(Launcher.java:1197)
    at com.sun.javaws.Launcher.run(Launcher.java:114)
    at java.lang.Thread.run(Thread.java:619)
    The sad story is that this exception occurs to me (apparently)randomly! That is, sometimes the app starts, while other times it just shows nothing and it only outputs the above-mentioned stacktrace to the log file.
    As you can see from the stacktrace, the faulty code is in org.eclipse.osgi.framework.internal.core.FrameworkProperties.setProperty(FrameworkProperties.java:64) which is:
    sm.checkPermission(new PropertyPermission(key, "write"));
    The class FrameworkProperties is inside org.eclipse.osgi_3.4.2.R34x_v20080826-1230.jar, which I have of course signed and given <all-permissions/> inside the jnlp file.
    I have tried to deploy a simple RCP plugin which only displays a simple window. This plugin also packs org.eclipse.osgi_3.4.2.R34x_v20080826-1230.jar, and it works to start it using javaws.
    If I give AllPermissions inside $JAVA_HOME/jre/lib/security/javaws.policy it works. So I'm suspecting it's a security configuration problem, but I don't know how/where to get further info on the problem.
    Any ideas?
    Thanks,
    Florin.

    shirleymck wrote:
    Where can I find an example of how to create a URL for a file that is in the same directory with the applet without hard-coding it?This page from the Swing tutorial is relevant:
    http://java.sun.com/docs/books/tutorial/uiswing/components/applet.html#images
    The linked code used method getParameter to get values from the HTML page, so that they are not hard-coded into the applet. It used getResourceAsStream to read from a URL, but you can also use the Class method getResource to get a URL.

  • Call a Web Service from JavaFX running als WebStart or embed in a Browser

    Calling a Web Service from a JavaFX running as a application all is fine.
    Wenn run the same JavaFX as WebStart or Browser embed I get a runtime exception:
    =================================
    Java-Plug-in 10.7.2.10
    JRE-Version verwenden 1.7.0_07-b10 Java HotSpot(TM) Client VM
    Benutzer-Home-Verzeichnis = C:\Users\Olaf
    c: Konsolenfenster löschen
    f: Objekte in Finalisierungs-Queue finalisieren
    g: Garbage Collect
    h: Diese Hilfemeldung anzeigen
    l: Class Loader-Liste ausgeben
    m: Speicherauslastung drucken
    o: Logging auslösen
    q: Konsole ausblenden
    r: Policy-Konfiguration neu laden
    s: System- und Deployment-Eigenschaften ausgeben
    t: Threadliste ausgeben
    v: Thread-Stack ausgeben
    x: Class Loader-Cache leeren
    0-5: Trace-Ebene auf <n> setzen
         Match: beginTraversal
    Match: digest selected JREDesc: JREDesc[version 1.6+, heap=-1--1, args=null, href=http://java.sun.com/products/autodl/j2se, sel=false, null, null], JREInfo: JREInfo for index 0:
    platform is: 1.7
    product is: 1.7.0_07
    location is: http://java.sun.com/products/autodl/j2se
    path is: C:\Program Files (x86)\Java\jre7\bin\javaw.exe
    args is:
    native platform is: Windows, x86 [ x86, 32bit ]
    JavaFX runtime is: JavaFX 2.2.0 found at C:\Program Files (x86)\Java\jre7\
    enabled is: true
    registered is: false
    system is: true
         Match: ignoring maxHeap: -1
         Match: ignoring InitHeap: -1
         Match: digesting vmargs: null
         Match: digested vmargs: [JVMParameters: isSecure: true, args: ]
         Match: JVM args after accumulation: [JVMParameters: isSecure: true, args: ]
         Match: digest LaunchDesc: file:/C:/Users/Olaf/Documents/NetBeansProjects/JavaFXApplication4/dist/JavaFXApplication4.jnlp
         Match: digest properties: []
         Match: JVM args: [JVMParameters: isSecure: true, args: ]
         Match: endTraversal ..
         Match: JVM args final:
         Match: Running JREInfo Version match: 1.7.0.07 == 1.7.0.07
         Match: Running JVM args match: have:<> satisfy want:<>
    CacheEntry[file:/C:/Users/Olaf/Documents/NetBeansProjects/JavaFXApplication4/dist/JavaFXApplication4.jar]: updateAvailable=true,lastModified=Tue Sep 04 21:16:35 CEST 2012,length=39432
    java.lang.ExceptionInInitializerError
         at com.sun.xml.internal.ws.util.xml.XmlUtil.createDefaultCatalogResolver(Unknown Source)
         at com.sun.xml.internal.ws.client.WSServiceDelegate.parseWSDL(Unknown Source)
         at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source)
         at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source)
         at com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown Source)
         at javax.xml.ws.Service.<init>(Unknown Source)
         at javafxapplication4.ws.NewWebService_Service.<init>(NewWebService_Service.java:42)
         at javafxapplication4.JavaFXApplication4.start(JavaFXApplication4.java:25)
         at com.sun.javafx.applet.FXApplet2$1.run(FXApplet2.java:131)
         at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:173)
         at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
         at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:29)
         at com.sun.glass.ui.win.WinApplication$2$1.run(WinApplication.java:67)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "xml.catalog.ignoreMissing" "read")
         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.checkPropertyAccess(Unknown Source)
         at java.lang.System.getProperty(Unknown Source)
         at com.sun.org.apache.xml.internal.resolver.CatalogManager.<init>(Unknown Source)
         at com.sun.org.apache.xml.internal.resolver.CatalogManager.<clinit>(Unknown Source)
         ... 14 more
    ======================================================
    Any hint for me.
    thx
    Olaf

    Sign your application.
    http://docs.oracle.com/javafx/2/deployment/deploy_overview.htm#CEGJGHDA

  • Webstart no longer works after update from Java 7 Update 67 to Java 7 Update 71/72

    Hi,
    We have an application that is launched via Webstart.  Last year, we had to make a bunch of changes to the application in order to work with Java 7 Update 45.  It has been working fine up to and including Java 7 Update 67.  However, it is no failing with Java 7 Update 71 and 72.  Upon launch it is giving the error below. I have searched online and found other articles related to the AccessControlException but they are about 7 years old.  I also tried adding this to the java.policy file with no luck.  Any ideas or help would be appreciated to determine what I can do to get this to work for update 71.
    java.security.AccessControlException: access denied ("java.util.PropertyPermission" "eclipse.exitcode" "write")
        at java.security.AccessControlContext.checkPermission(Unknown Source)
        at java.security.AccessController.checkPermission(Unknown Source)
        at java.lang.SecurityManager.checkPermission(Unknown Source)
        at org.eclipse.osgi.framework.internal.core.FrameworkProperties.setProperty(FrameworkProperties.java:64)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:216)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
        at org.eclipse.equinox.launcher.WebStartMain.basicRun(WebStartMain.java:78)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
        at org.eclipse.equinox.launcher.WebStartMain.main(WebStartMain.java:56)

    krubar wrote:
    I have same problem on Sparc system (Solaris 10). Does anybody know how to fix it ? I can't change symbolic link for javaAre you certain that you are experiencing exactly the same issue? Did you follow the hyperlinks to the Sun Solve documents above?
    The Sun Solve document itself states:
    1. Solaris 8 and 9 and OpenSolaris and Solaris 10 on the SPARC platform are not impacted by this issue.I would suggest that you open a Support Call with your local solutions centre.

  • Java.rmi.ConnectException using webstart Swing client with WL 8.1 SP2 in a

    Hi all,
    I'm receiving the following exception when invoking a remote method on
    a cached remote stub. This only happens if there are at least two
    nodes running in a cluster. It happens more often the more nodes are
    running.
    It seems that the exception occurs if for a call to a remote method a
    cached stub is used, and if that call is referred to a different node
    in the cluster by the load balancer than the one that the stub
    originally came from. But I'm not completely sure about that...
    Client side config:
    Webstart
    JDK 1.4.2_05
    weblogic.jar (we're experiencing other problems already discussed in
    this group when using wlclient.jar)
    Server side config:
    Weblogic 8.1 SP2
    cluster on Sun Solaris machines (two nodes, one manager)
    Here is the exception stacktrace:
    java.rmi.ConnectException: Could not establish a connection with
    2198062098923170717S:shebea219:[7001,7001,-1,-1,7001,-1,-1,0,0]:SHEBEA219,SHEBEA334:DaGama:DaGamaNode1,
    java.security.AccessControlException: access denied
    (java.net.SocketPermission shebea219 resolve)
    at weblogic.rjvm.RJVMImpl.getOutputStream(RJVMImpl.java:316)
    at weblogic.rjvm.RJVMImpl.getRequestStream(RJVMImpl.java:488)
    at weblogic.rjvm.RJVMImpl.getOutboundRequest(RJVMImpl.java:584)
    at
    weblogic.rmi.internal.BasicRemoteRef.getOutboundRequest(BasicRemoteRef.java:91)
    at
    weblogic.rmi.internal.activation.ActivatableRemoteRef.invoke(ActivatableRemoteRef.java:69)
    at
    de.conet.dagama.interesengine.nativesession.SBNativeSession_8da95c_EOImpl_812_WLStub.isConnected(Unknown
    Source)
    at
    de.conet.dagama.agent.flight.nativ.FlightNativeListener.doExitNativeSession(FlightNativeListener.java:244)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at
    de.objektpark.framework.command.CommandInvoker.invoke(CommandInvoker.java:132)
    at
    de.objektpark.framework.command.CommandProcessor.doService(CommandProcessor.java:169)
    at
    de.objektpark.framework.command.CommandProcessor.service(CommandProcessor.java:131)
    at
    de.objektpark.framework.command.CommandProcessor.execute(CommandProcessor.java:71)
    at
    de.conet.webactiv.swing.command.GUICommandProcessor.execute(GUICommandProcessor.java:87)
    at
    de.conet.webactiv.swing.controller.GUICommandController.execute(GUICommandController.java:98)
    at
    de.conet.webactiv.swing.controller.GUICommandController.execute(GUICommandController.java:124)
    at
    de.conet.dagama.agent.flight.nativ.FlightFreeNativeView.this_windowClosing(FlightFreeNativeView.java:84)
    at
    de.conet.dagama.agent.flight.nativ.FlightFreeNativeView$1.windowClosing(FlightFreeNativeView.java:73)
    at java.awt.AWTEventMulticaster.windowClosing(Unknown Source)
    at java.awt.Window.processWindowEvent(Unknown Source)
    at javax.swing.JFrame.processWindowEvent(Unknown Source)
    at java.awt.Window.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown
    Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    Has anyone ever come across the same problem and possibly found a
    solution?
    Any help would be greatly appreciated.
    Thanks in advance
    Rolf

    Hi all,
    I'm receiving the following exception when invoking a remote method on
    a cached remote stub. This only happens if there are at least two
    nodes running in a cluster. It happens more often the more nodes are
    running.
    It seems that the exception occurs if for a call to a remote method a
    cached stub is used, and if that call is referred to a different node
    in the cluster by the load balancer than the one that the stub
    originally came from. But I'm not completely sure about that...
    Client side config:
    Webstart
    JDK 1.4.2_05
    weblogic.jar (we're experiencing other problems already discussed in
    this group when using wlclient.jar)
    Server side config:
    Weblogic 8.1 SP2
    cluster on Sun Solaris machines (two nodes, one manager)
    Here is the exception stacktrace:
    java.rmi.ConnectException: Could not establish a connection with
    2198062098923170717S:shebea219:[7001,7001,-1,-1,7001,-1,-1,0,0]:SHEBEA219,SHEBEA334:DaGama:DaGamaNode1,
    java.security.AccessControlException: access denied
    (java.net.SocketPermission shebea219 resolve)
    at weblogic.rjvm.RJVMImpl.getOutputStream(RJVMImpl.java:316)
    at weblogic.rjvm.RJVMImpl.getRequestStream(RJVMImpl.java:488)
    at weblogic.rjvm.RJVMImpl.getOutboundRequest(RJVMImpl.java:584)
    at
    weblogic.rmi.internal.BasicRemoteRef.getOutboundRequest(BasicRemoteRef.java:91)
    at
    weblogic.rmi.internal.activation.ActivatableRemoteRef.invoke(ActivatableRemoteRef.java:69)
    at
    de.conet.dagama.interesengine.nativesession.SBNativeSession_8da95c_EOImpl_812_WLStub.isConnected(Unknown
    Source)
    at
    de.conet.dagama.agent.flight.nativ.FlightNativeListener.doExitNativeSession(FlightNativeListener.java:244)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at
    de.objektpark.framework.command.CommandInvoker.invoke(CommandInvoker.java:132)
    at
    de.objektpark.framework.command.CommandProcessor.doService(CommandProcessor.java:169)
    at
    de.objektpark.framework.command.CommandProcessor.service(CommandProcessor.java:131)
    at
    de.objektpark.framework.command.CommandProcessor.execute(CommandProcessor.java:71)
    at
    de.conet.webactiv.swing.command.GUICommandProcessor.execute(GUICommandProcessor.java:87)
    at
    de.conet.webactiv.swing.controller.GUICommandController.execute(GUICommandController.java:98)
    at
    de.conet.webactiv.swing.controller.GUICommandController.execute(GUICommandController.java:124)
    at
    de.conet.dagama.agent.flight.nativ.FlightFreeNativeView.this_windowClosing(FlightFreeNativeView.java:84)
    at
    de.conet.dagama.agent.flight.nativ.FlightFreeNativeView$1.windowClosing(FlightFreeNativeView.java:73)
    at java.awt.AWTEventMulticaster.windowClosing(Unknown Source)
    at java.awt.Window.processWindowEvent(Unknown Source)
    at javax.swing.JFrame.processWindowEvent(Unknown Source)
    at java.awt.Window.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown
    Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    Has anyone ever come across the same problem and possibly found a
    solution?
    Any help would be greatly appreciated.
    Thanks in advance
    Rolf

  • JAXB v1.0.2 and Webstart

    Hi,
    I'm trying to use JAXB within an app that is started via JNLP and WebStart.
    If i add all the JAXP jars to the JNLP file the app fails to start when JAXB calls into some xerces code that tries to access java.home.
    java.security.AccessControlException: access denied (java.util.PropertyPermission java.home read)
    /* stack trace */
         at org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParser(SAXParserFactoryImpl.java:95)
         at javax.xml.bind.helpers.AbstractUnmarshallerImpl.getXMLReader(AbstractUnmarshallerImpl.java:80)
    If i dont put in the JAXP jars then i get the following:
    Caused by: java.lang.RuntimeException: Installation Problem??? Couldn't load messages: Can't find bundle for base name org.apache.xerces.impl.xpath.regex.message, locale en_US
         at com.sun.msv.datatype.xsd.regex.RegexParser.setLocale(RegexParser.java:132)
         at com.sun.msv.datatype.xsd.regex.RegexParser.<init>(RegexParser.java:122)
    If i put the jaxp jars in jre/lib/endorsed, then everything works - except that isnt going to work for a remote client.
    So, question is why does xerces require access to java.home ?

    I am getting essentially the same exception when running my app from command line:
    java.lang.RuntimeException: Installation Problem??? Couldn't load messages: Can't find bundle for base name org.apache.xerces.impl.xpath.rege
    x.message, locale en_US
    at com.sun.msv.datatype.xsd.regex.RegexParser.setLocale(RegexParser.java:132)
    at com.sun.msv.datatype.xsd.regex.RegexParser.<init>(RegexParser.java:122)
    at com.sun.msv.datatype.xsd.regex.ParserForXMLSchema.<init>(ParserForXMLSchema.java:71)
    [ snip ]
    The same code works find when running inside a webapp on Tomcat 5.
    Did you ever find the source of your problem, and indeed a solution?

  • Access Denied Socket Permission Error using 3rdParty jar in webstart

    Hi,
    I am trying to create a multisocket in my application, and this app is downloaded through webstart,
    Following are the things I ve done,
    1. I use two jnlp file, one mail jnlp file (say a.jnlp) and the other an extension jnlp file (a_ext.jnlp) which contains the third party jars.
    2. I used <security><allpermission/><security/> in both the jnlp files.
    3. If I try to create a multisocket in my code that is downloaded through main jnlp i.e. a.jnlp file, then it is working fine.
    4. But the problem is, the third party jar which is downloaded throught "a_ext.jnlp" file is trying to create a multisocket
    and i am getting the following error,
    +java.security.AccessControlException: access denied (java.net.SocketPermission 228.0.0.4 connect,accept,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.checkMulticast(Unknown Source)+
    + at java.net.MulticastSocket.joinGroup(Unknown Source)+
    + at inria.net.MulticastSession.initialize(MulticastSession.java:143)+
    + at inria.net.lrmp.LrmpImpl.<init>(LrmpImpl.java:105)+
    + at inria.net.lrmp.LrmpImpl.<init>(LrmpImpl.java:89)+
    + at inria.net.lrmp.Lrmp.<init>(Lrmp.java:194)+Please help me.
    Note that I dont want to create any policy file, I want some configurations to be done in jnlp files or in the jars, because i cannot create a policy file and copy it manually in each client deployment.

    >
    And sorry that jnlp is a valid jnlp only, ..>
    How do you know? Did you validate it, or are you just guessing?
    >
    ..and it was a typing mistake, ..>So don't retype these things, instead copy/paste them.
    >
    it is </security> not <security/>>it is also <all-permissions/>, not <allpermission/>
    >
    and when i start through webstart it is asking for confirmation also, so i think this <security> tag is working fine.>Stop thinking and start validating.
    >
    But the problem is with security for the 3rdParty jar downloaded through jnlp extension. >So it will be most important to validate that. Note that if this 3rd party extension is signed by the people that supplied it, you should get a second security prompt.
    >
    ... I hope JNLP doesnt check or give permission for the jars downloaded via extension jnlp?>What does that mean?
    OTOH, I just noticed you assigned the princely sum of 1 entire duke star for this question. It is obviously of only minor importance to you, so my time is better spent elsewhere.
    Good luck with it.

  • Bi Beans session connect method and JWS gives accesscontrolexception

    Hi,
    I have folowing code for connecting to Bi session and am trying to load my application using java web start technology. When I try to run the code from Jdeveloper it works fine but when trying to run from java web start gives following error.
    Error:
    Exception occurred during event dispatching:
    java.security.AccessControlException: access denied (java.util.PropertyPermission apple.awt.showGrowBox read)
         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.checkPropertyAccess(Unknown Source)
         at java.lang.System.getProperty(Unknown Source)
         at oracle.bali.ewt.elaf.basic.BasicLookAndFeel$2.createValue(Unknown Source)
         at javax.swing.UIDefaults.getFromHashtable(Unknown Source)
         at javax.swing.UIDefaults.get(Unknown Source)
         at javax.swing.MultiUIDefaults.get(Unknown Source)
         at javax.swing.UIDefaults.getInsets(Unknown Source)
         at javax.swing.UIManager.getInsets(Unknown Source)
         at oracle.bali.ewt.button.DialogBarLayout.preferredLayoutSize(Unknown Source)
         at java.awt.Container.preferredSize(Unknown Source)
         at java.awt.Container.getPreferredSize(Unknown Source)
         at javax.swing.JComponent.getPreferredSize(Unknown Source)
         at java.awt.BorderLayout.preferredLayoutSize(Unknown Source)
         at java.awt.Container.preferredSize(Unknown Source)
         at java.awt.Container.getPreferredSize(Unknown Source)
         at javax.swing.JComponent.getPreferredSize(Unknown Source)
         at java.awt.BorderLayout.preferredLayoutSize(Unknown Source)
         at java.awt.Container.preferredSize(Unknown Source)
         at java.awt.Container.getPreferredSize(Unknown Source)
         at javax.swing.JComponent.getPreferredSize(Unknown Source)
         at java.awt.BorderLayout.preferredLayoutSize(Unknown Source)
         at java.awt.Container.preferredSize(Unknown Source)
         at java.awt.Container.getPreferredSize(Unknown Source)
         at javax.swing.JComponent.getPreferredSize(Unknown Source)
         at javax.swing.JRootPane$RootLayout.preferredLayoutSize(Unknown Source)
         at java.awt.Container.preferredSize(Unknown Source)
         at java.awt.Container.getPreferredSize(Unknown Source)
         at javax.swing.JComponent.getPreferredSize(Unknown Source)
         at java.awt.BorderLayout.preferredLayoutSize(Unknown Source)
         at java.awt.Container.preferredSize(Unknown Source)
         at java.awt.Container.getPreferredSize(Unknown Source)
         at oracle.bali.ewt.dialog.JEWTDialog.getPreferredSize(Unknown Source)
         at java.awt.Window.pack(Unknown Source)
         at oracle.bali.ewt.dialog.JEWTDialog.pack(Unknown Source)
         at oracle.bali.ewt.dialog.JEWTDialog.runDialog(Unknown Source)
         at oracle.dss.util.gui.BIExceptionDialog.display(BIExceptionDialog.java:199)
         at gecf.pmg.PmgBiOlapApp.showExceptionDialog(PmgBiOlapApp.java:2560)
         at gecf.pmg.PmgBiOlapApp.connect(PmgBiOlapApp.java:2823)
         at gecf.pmg.PmgBiOlapApp$39.actionPerformed(PmgBiOlapApp.java:2886)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.plaf.basic.BasicButtonListener$ReleasedAction.actionPerformed(Unknown Source)
         at javax.swing.JComponent$ActionStandin.actionPerformed(Unknown Source)
         at javax.swing.SwingUtilities.notifyAction(Unknown Source)
         at javax.swing.JComponent.processKeyBinding(Unknown Source)
         at javax.swing.JComponent.processKeyBindings(Unknown Source)
         at javax.swing.JComponent.processKeyEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.Dialog$1.run(Unknown Source)
         at java.awt.event.InvocationEvent.dispatch(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.Dialog$1.run(Unknown Source)
         at java.awt.event.InvocationEvent.dispatch(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Code:
    //1. create session
    m_biSession = new BISession();
    m_biSession.setBIUser(new BIUser(userName));
    m_biSession.setDeploymentOption("LOCAL");
    m_biSession.setProperty("Mode","ERROR");
    DefaultErrorHandler m_handler = new DefaultErrorHandler();
    m_handler.setDebugMode(DefaultErrorHandler.SHOW_ERROR);
    m_biSession.addErrorHandler(m_handler);
    //2.
    m_connection = new Connection();
    DefaultErrorHandler o_handler = new DefaultErrorHandler();
    o_handler.setDebugMode(DefaultErrorHandler.SHOW_ERROR);
    m_connection.addErrorHandler(o_handler);
    m_connection.setSession(m_biSession);
    m_connection.setDriverType("MDM");
    m_connection.setServerType("OLAPServer");
    m_connection.setJdbcDriverType("thin");
    m_connection.setHostName(m_hostName);
    m_connection.setPortNumber(Integer.parseInt(m_port));
    m_connection.setSID(m_olapSid);
    m_connection.setUsername(userName);
    m_connection.setPassword(password);
    //3.
    p_connection = new Connection();
    DefaultErrorHandler p_handler = new DefaultErrorHandler();
    p_handler.setDebugMode(DefaultErrorHandler.SHOW_ERROR);
    p_connection.addErrorHandler(p_handler);
    p_connection.setSession(m_biSession);
    p_connection.setDriverType(MDU.PERSISTENCE);
    p_connection.setJdbcDriverType("thin");
    p_connection.setHostName(m_hostName);
    p_connection.setPortNumber(Integer.parseInt(m_port));
    p_connection.setUsername("CATLOGADMIN");
    p_connection.setPassword("CATLOGADMINPWD");
    p_connection.setSID(m_catSid);
    p_connection.setProperty(PSRConstants.STORAGEMANAGER_DRIVER, "oracle.dss.persistence.storagemanager.bi.BIStorageManagerImpl",1,1);
    //4.
    m_metadataManager = new MetadataManager();
    DefaultErrorHandler md_handler = new DefaultErrorHandler();
    md_handler.setDebugMode(DefaultErrorHandler.SHOW_ERROR);
    m_metadataManager.addErrorHandler(md_handler);
    m_metadataManager.setSession(m_biSession);
    m_metadataManager.setConnection(p_connection);
    m_metadataManager.setConnection(m_connection);
    try{
    m_biSession.connect();
    }catch (Exception e)
    System.out.println("error connecting to bisession");
    e.printStackTrace();
    m_metadataManager.attach();
    It is giving me the error at "m_biSession.connect();" line.
    Please help asap.
    Thanks and Regards,
    Ujwala

    Did you follow the points outlined in the Release Notes:
    http://www.oracle.com/technology/products/bib/htdocs/904/readme_bibeans.html#webstart
    Hope this helps
    Business Intelligence Beans Product Management Team
    Oracle Corporation

  • AccessControlException when using jnlp allpermissions on Solaris 10

    Hi all,
    A user of our free webstartable product yEd:
    http://www.yworks.com/products/yed
    running Solaris 10 x86:
    $ java -version
    java version "1.5.0_06"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
    Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)
    reports the following problem when launching our program:
    Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission com.sun.media.imageio.disableCodecLib read)
         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
         at java.security.AccessController.checkPermission(AccessController.java:427)
         at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
         at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1285)
         at java.lang.System.getProperty(System.java:627)
         at java.lang.Boolean.getBoolean(Boolean.java:221)
         at com.sun.media.imageioimpl.common.PackageUtil.isCodecLibAvailable(PackageUtil.java:70)
         at com.sun.media.imageioimpl.plugins.jpeg.CLibJPEGImageReaderSpi.onRegistration(CLibJPEGImageReaderSpi.java:70)
         at javax.imageio.spi.SubRegistry.registerServiceProvider(ServiceRegistry.java:698)
         at javax.imageio.spi.ServiceRegistry.registerServiceProvider(ServiceRegistry.java:285)
         at javax.imageio.spi.IIORegistry.registerApplicationClasspathSpis(IIORegistry.java:183)
         at javax.imageio.spi.IIORegistry.<init>(IIORegistry.java:117)
         at javax.imageio.spi.IIORegistry.getDefaultInstance(IIORegistry.java:138)
         at javax.imageio.ImageIO.<clinit>(ImageIO.java:46)
    It seems like ImageIO cannot be loaded on Solaris 10 because the SecurityManager prohibiting access to the System property "com.sun.media.imageio.disableCodecLib" although we have "allpermissions" declared in our jnl file:
    http://www.yworks.com/products/yed/demo/yed.jnlp
    Can anyone running Solaris 10 reproduce this behavior or does someone have a clue as to what is going wrong here. I don't want to believe it is a bug in Java Webstart on Solaris. After all using ImageIO shouldn't be that special.
    regards - Sebastian

    Sounds very much like http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6421652

  • Java.security.AccessControlException: access denied (java.lang.RuntimePerm

    Hi, I am receiving the following error when I attempt to add a crypto provider.
    java.lang.ExceptionInInitializerError
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
         at java.lang.reflect.Constructor.newInstance(Unknown Source)
         at java.lang.Class.newInstance0(Unknown Source)
         at java.lang.Class.newInstance(Unknown Source)
         at sun.security.jca.ProviderConfig$3.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.security.jca.ProviderConfig.doLoadProvider(Unknown Source)
         at sun.security.jca.ProviderConfig.getProvider(Unknown Source)
         at sun.security.jca.ProviderList.loadAll(Unknown Source)
         at sun.security.jca.ProviderList.removeInvalid(Unknown Source)
         at sun.security.jca.Providers.getFullProviderList(Unknown Source)
         at java.security.Security.removeProvider(Unknown Source)
         at com.gro.applet.GROAuthenticateApplet$2.run(GROAuthenticateApplet.java:192)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.gro.applet.GROAuthenticateApplet.validateUser(GROAuthenticateApplet.java:181)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at sun.plugin.javascript.JSInvoke.invoke(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at sun.plugin.javascript.JSClassLoader.invoke(Unknown Source)
         at sun.plugin.com.MethodDispatcher.invoke(Unknown Source)
         at sun.plugin.com.DispatchImpl.invokeImpl(Unknown Source)
         at sun.plugin.com.DispatchImpl$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.plugin.com.DispatchImpl.invoke(Unknown Source)
    Caused by: java.security.AccessControlException: access denied (java.lang.RuntimePermission loadLibrary.sunmscapi)
         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.checkLink(Unknown Source)
         at java.lang.Runtime.loadLibrary0(Unknown Source)
         at java.lang.System.loadLibrary(Unknown Source)
         at sun.security.mscapi.SunMSCAPI$1.run(SunMSCAPI.java:34)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.security.mscapi.SunMSCAPI.<clinit>(SunMSCAPI.java:32)
         ... 32 more
    java.lang.Exception: java.lang.ExceptionInInitializerError
         at sun.plugin.com.DispatchImpl.invokeImpl(Unknown Source)
         at sun.plugin.com.DispatchImpl$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.plugin.com.DispatchImpl.invoke(Unknown Source)I read somewhere that it is "Due to an additional dll that needs to be loaded for the Sun Java SE 6 JVM we get an exception during initialization"
    Does anyone have any other information on this bug?

    I have just bumped into this with a Webstart application.
    It seems to happen only on certain machines.
    Is there a solution to this problem?

  • Security Exception with JavaHelp and Webstart

    I have seen several posts on here concerning JavaHelp with Webstart, but no one seems to be getting the same error that I have. Everything works fine if I run the application and launch help outside of Webstart.
    When I download the app using webstart, my helpset seems to get loaded properly, but I get the following error when trying to launch JavaHelp from within the application:
    Parsing failed for null
    Exception caught while parsing nulljava.security.AccessControlException: access denied (java.util.PropertyPermission user.home read)
    java.lang.NullPointerException
    I'm not quite sure why it's trying to access the property user.home, but it doesn't seem that others that have post get this error.
    Does anyone have any suggestions?
    Thanks.

    Ok... this appears to be an issue with the new JavaHelp 2.0 because it works perfectly fine in version 1.3
    It appears that version 2.0 has a "favorites" section that, I'm guessing here, stores the users favorites locally. That would be why the user.home property gets accessed and the security policy is violated with Webstart.
    I can't say that this is a bug... maybe I can disable the "favorites" feature... either that or I need to stick with JavaHelp 1.3
    Thanks.

  • WebStart, custom security policy and debugging

    Hi,
    Please forgive the long post, it's an obscure problem.
    A year ago I implemented a custom instance-centric security policy that uses a database for storing permission data. It has served our needs very well on the server side. Now, however, I need to reuse it in a client application deployed to about 50 users via WebStart (there are more similar applications coming which will take the user base to about 200).
    For some reason, the permissions are not being properly evaluated under WebStart. Tracing through my policy code, I can see that calls to imply() return with expected true/false values, however, when the internals of Java's underlying security API aggregate the results, calls to AccessController.checkPermission() don't raise exceptions when and where they are expected to.
    This is really a hard problem to debug/trace. When I run the application locally, I have no problems with security checks even if I run it under a security manager (via -D.java.security.manager). Tracing to standard helps to a point and I can see that there is a difference: during the local runs, calls to MyCustomPolicy.implies(Permission, Domain) are made once per every AccessController.checkPermission() call made from the business layer. Under WebStart, there are three calls to MyCustomPolicy.implies() per every call to AccessController.checkPermission(). All three calls seem to come from the same stack frame. All three return 'false', yet AccessController.checkPermission() doesn't raise an exception.
    Analyzing stack's state at the point MyCustomPolicy.implies() is been called, I think the answer to my problem may lie in the following code snippet of AccessControlContext.checkPermission(Permission):
            for (int i=0; i< context.length; i++) {
                if (context[i] != null &&  !context.implies(perm)) {
    if (debug != null) {
    debug.println("access denied "+perm);
    if (Debug.isOn("failure")) {
    Thread.currentThread().dumpStack();
    final ProtectionDomain pd = context[i];
    final Debug db = debug;
    AccessController.doPrivileged (new PrivilegedAction() {
    public Object run() {
    db.println("domain that failed "+pd);
    return null;
    throw new AccessControlException("access denied "+perm, perm);
    I believe that somehow one of the iterations gets to "return null" line, but at the moment I have no way of verifying this.
    I'm finally getting to my question. In order for me to understand what's going on, I need to enable debugging of AccessControlContext. I can do this by setting java.security.debug system property. Again, I have no problem enabling debugging on a local system, but not under WebStart.
    Here's what the relevant markup in the .jnlp file looks like:
    <resources>
    <j2se version="1.5" max-heap-size="128m" initial-heap-size="32m" java-vm-args="-Djava.security.debug=all">
    </j2se>
    <!-- a bunch of jar declarations -->
    <property name="java.security.auth.login.config" value="jar:swing-app-SNAPSHOT.jar!/jaas_login.properties">
    </property>
    <property name="java.security.debug" value="all">
    </property>
    </resources>
    this seems to have no effect and no debugging output appears. Any ideas why? Is there anything else I can do to enable debugging of AccessControlContext under WebStart?
    I don't expect too many replies to my post (unless 3 sleepless weeks made me miss something really obvious), but if anyone can offer a hit/hit/insightful comment :), that would be great.
    Dmitry

    Hey
    I have just finished such a policy implemention - boy could I have done with your help!
    I've never seen the java.security.debug property before - not to say it doesn't exist, but don't confuse system properties and security properties. Try setting it programmatically via Security.setProperty() or the Java Admin console [if you can], or even in the JRE WebStart uses via the java.security file.
    When you run it locally with security switched on, do you observe the 3-to-1 behaviour also? I'm not sure if this is important - depends on your answer. As for the checks being performed from the same stack frame, the AC iterates over the protection domains as it checks them; the 3-to-1 behaviour is the result of there being 3 extra frames to check, possibly due to the fact your executing from JWS [although I'd expect JWS to be considered system code]. If the execution in AC gets to return null; then Debug.isOn("failure") must evaluate to true [...I'd slump in my chair at this point] but there's no way to figure out accurately what the semantics of this is AS THERE'S NO FRICKIN SRC AVAILABLE [...this really annoys me]. The only thing I can suggest for that is to not try and switch debugging on.
    I suspect you are using JAAS [hence the dynamic policy need]? I have an idea if you are.
    I totally know what you mean about the sleepless nights mate - I'm glad I done it all now, learnt all about security within Java which I knew nothing about 6 months ago.
    Warm regads,
    D

  • Problem with webstart

    I am having trouble launchng this webstart:
    http://ajmas.dyndns.org/webstart/applications/gpsviewer.jnlp
    I trust the certificate but I get a security exception. This JNLP references another JNLP, which contains native binaries. I have signed all the jars in both JNLPs. I have been testing on MacOS X.
    The exception is:
    Caused by: java.security.AccessControlException: access denied (java.lang.RuntimePermission loadLibrary.rxtxSerial)
    I am new to native libs with webstart, so any help would be appreciated.

    With a little help the issue was resolved. Basically I was missing the security/all-permissions section from my main jnlp. Below is what it should be like.
    The first JNLP is (gpsviewer.jnlp):
    <?xml version="1.0" encoding="utf-8"?>
    <jnlp codebase="http://ajmas.dyndns.org/webstart/applications"
         href="gpsviewer.jnlp">
    <information>
       <title>GPSViewer</title>
       <vendor>ajmas</vendor>
       <homepage href="http://jogl-demos.dev.java.net/"/>
       <description>Program displaying data from NMEA compatible GPS device</description>
       <description kind="short">Displays data from a NMEA GPS device</description>
       <offline-allowed/>
    </information>
    <security>
         <all-permissions/>
    </security>
       <resources>
         <j2se href="http://java.sun.com/products/autodl/j2se" version="1.5+"/>
         <jar href="geonavapps.jar" main="true"/>
         <jar href="geonav.jar" main="false"/>
         <extension name="rxtx" href="http://ajmas.dyndns.org/webstart/rxtx/rxtx.jnlp" />
       </resources>
    <application-desc main-class="osj.geonav.gpsviewer.GPSViewer"/>
    </jnlp>and the second is (rxtx.jnlp):
    <?xml version="1.0" encoding="utf-8"?>
    <jnlp codebase="http://ajmas.dyndns.org/webstart/rxtx/"
         href="rxtx.jnlp">
    <information>
       <title>RXTX</title>
       <vendor>ajmas</vendor>
       <homepage href="http://www.rxtx.org"/>
       <description>Java API for serial port communication</description>
       <description kind="short">Java API for serial port communication.</description>
       <offline-allowed/>
    </information>
    <security>
         <all-permissions/>
    </security>
       <resources>
         <jar href="rxtx-comm.jar" />
       </resources>
       <resources os="Windows" arch="x86">
         <nativelib href="rxtx-comm-natives-windows-i586.jar" />
       </resources>
       <resources os="Linux" arch="i686">
         <nativelib href="rxtx-comm-natives-linux-i686-32.jar" />
       </resources>
       <resources os="Linux" arch="i386">
         <nativelib href="rxtx-comm-natives-linux-i686-32.jar" />
       </resources>
       <resources os="Linux" arch="x86">
         <nativelib href="rxtx-comm-natives-linux-i686-32.jar" />
       </resources>
       <resources os="Mac OS X" >
         <nativelib href="rxtx-comm-natives-macosx-universal.jar" />
       </resources>
    <component-desc />
    </jnlp>

  • AccessControlException even with all-permissions

    Hi, I have a webstart app that I am trying to get working. My problem is this: I give the app "all-permissions" in the jnlp file, and webstart asks me if I want to give unrestricted access to the app, I click "Start", and then I get an AccessControlException.
    Here is my jnlp file:
    <?xml version="1.0"?>
    <jnlp codebase="$$codebase" href="launchDev.jnlp">
    <information>
    <title>My Dashboard</title>
    <vendor>My Company</vendor>
    <description>A Dashboard</description>
    </information>
    <security>
    <all-permissions/>
    </security>
    <resources>
    <j2se version="1.4"/>
    <jar href="dashboard-signed.jar"/>
    <jar href="tradetone-signed.jar"/>
    <jar href="log4j-signed.jar"/>
    </resources>
    <resources os="Windows\ NT">
    <jar href="tibrvj-66-signed.jar"/>
    </resources>
    <resources os="Windows\ XP Windows\ 2000">
    <jar href="tibrvj-69-signed.jar"/>
    </resources>
    <application-desc main-class="com.mycompany.dashboard.Dashboard">
    <argument>Dev</argument>
    <argument>$$context</argument>
    </application-desc>
    </jnlp>
    Here is the code I'm trying to run:
    URL testUrl = Thread.currentThread().getContextClassLoader().getResource("myfile.txt");
    And here is the exception I get:
    com.mycompany.dashboard.DashboardException: java.security.AccessControlException: access denied (java.lang.RuntimePermission getClassLoader)
         at com.mycompany.dashmodules.servicelauncher.ServiceLauncher.init(ServiceLauncher.java:119)
         at com.mycompany.dashboard.Dashboard.<init>(Dashboard.java:119)
         at com.mycompany.dashboard.Dashboard.main(Dashboard.java:264)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.sun.javaws.Launcher.executeApplication(Unknown Source)
         at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
         at com.sun.javaws.Launcher.continueLaunch(Unknown Source)
         at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
         at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
         at com.sun.javaws.Launcher.run(Unknown Source)
         at java.lang.Thread.run(Thread.java:536)
    Caused by: java.security.AccessControlException: access denied (java.lang.RuntimePermission getClassLoader)
         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:270)
         at java.security.AccessController.checkPermission(AccessController.java:401)
         at java.lang.SecurityManager.checkPermission(SecurityManager.java:542)
         at java.lang.Thread.getContextClassLoader(Thread.java:1189)
         at com.mycompany.dashmodules.servicelauncher.ServiceLauncher.init(ServiceLauncher.java:106)
         ... 13 more
    Does anyone have any idea what is going on? I also get an AccessControlAcception with the following line:
    System.getProperty("java.util.prefs.PreferencesFactory");
    Thanks!
    Jason

    I figured it out. For some reason, the classes I loaded with my own URLClassLoader didn't have the same permissions as the classes loaded directly through WebStart. What I did was to include my own policy file in a jar with webstart, which granted java.security.AllPermissions to everything, i.e. all code bases. Then in my Main Class, I did:
    URL policyUrl = Thread.currentThread().getContextClassLoader().getResource("my.java.policy");
    Policy.getPolicy().refresh();
    This fixed it. I am guessing that when you give "all-permissions" to your webstart app, it assigns java.security.AllPermissions to code loaded from the webstart codebase, but not to code from other codebases. Changing the Policy widened this permission to everything.
    Another alternative would have been to write my own Policy subclass which permitted everything and then call Policy.setPolicy() with it.
    Jason

Maybe you are looking for