Skip to main content

Connect back to download server not working

1 reply [Last post]
Joined: 2009-04-07

I have a webstart application that is downloaded via WAR file deployed in JBoss. When I try to make an EJB call back to the JBoss server, I get an access denied exception.

According to the Webstart developer guide:

If an application is written to run in a secure sandbox, it must follow these restrictions:

<br />
    * No access to local disk.<br />
    * All JAR files must be downloaded from the same host.<br />
    * Network connections are enabled only to the host from which the JAR files are downloaded.<br />
...<br />

An EJB connection back to the server I was downloaded from should be allowed without JAR signing, right? I'm running everything on localhost (JBoss and Webstart client).

When I run it I get a security dialog box saying

The application has requested permission to establish network connections to . Do you want to allow this?

The dialog also shows Name, Publisher, and

From: http://localhost:8080

Notice that the From shows localhost and the server it thinks it's connecting to is the external DNS name of localhost. Internally to my Webstart application, I'm creating a JNDI context pointing at localhost (not the external DNS name).

Is this happening because it's getting different names for my local machine?


<br />
java.lang.reflect.InvocationTargetException<br />
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br />
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)<br />
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br />
	at java.lang.reflect.Method.invoke(Unknown Source)<br />
	at com.sun.javaws.Launcher.executeApplication(Unknown Source)<br />
	at com.sun.javaws.Launcher.executeMainClass(Unknown Source)<br />
	at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)<br />
	at Source)<br />
	at Source)<br />
Caused by: java.lang.ExceptionInInitializerError<br />
	at org.jboss.remoting.Version.(<br />
	at org.jboss.remoting.InvokerLocator.(<br />
	at org.jboss.ejb3.proxy.objectfactory.ProxyObjectFactory.createProxyFactoryProxy(<br />
	at org.jboss.ejb3.proxy.objectfactory.ProxyObjectFactory.getObjectInstance(<br />
	at javax.naming.spi.NamingManager.getObjectInstance(Unknown Source)<br />
	at org.jnp.interfaces.NamingContext.getObjectInstance(<br />
	at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(<br />
	at org.jnp.interfaces.NamingContext.lookup(<br />
	at org.jnp.interfaces.NamingContext.lookup(<br />
	at javax.naming.InitialContext.lookup(Unknown Source)<br />
	at com.usairways.cbro.rtd.DepartureService.getFlightService(<br />
	at com.usairways.cbro.rtd.DepartureService.getDepartures(<br />
	at com.usairways.cbro.rtd.swing.TablePanel.(<br />
	at com.usairways.cbro.rtd.swing.RTDRFrame.create(<br />
	at com.usairways.cbro.rtd.swing.Main.main(<br />
	... 9 more<br />
Caused by: access denied (java.util.PropertyPermission skipAccessControl read)<br />
	at Source)<br />
	at Source)<br />
	at java.lang.SecurityManager.checkPermission(Unknown Source)<br />
	at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)<br />
	at java.lang.System.getProperty(Unknown Source)<br />
	at java.lang.Boolean.getBoolean(Unknown Source)<br />
	at org.jboss.remoting.util.SecurityUtility$<br />
	at Method)<br />
	at org.jboss.remoting.util.SecurityUtility.(<br />
	... 24 more<br />

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2007-04-18

How does your client application determine the server name?