Skip to main content

Connect back to download server not working

1 reply [Last post]
bwarren
Offline
Joined: 2009-04-07
Points: 0

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?

Stacktrace:

<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 com.sun.javaws.Launcher.run(Unknown Source)<br />
	at java.lang.Thread.run(Unknown Source)<br />
Caused by: java.lang.ExceptionInInitializerError<br />
	at org.jboss.remoting.Version.(Version.java:53)<br />
	at org.jboss.remoting.InvokerLocator.(InvokerLocator.java:96)<br />
	at org.jboss.ejb3.proxy.objectfactory.ProxyObjectFactory.createProxyFactoryProxy(ProxyObjectFactory.java:188)<br />
	at org.jboss.ejb3.proxy.objectfactory.ProxyObjectFactory.getObjectInstance(ProxyObjectFactory.java:152)<br />
	at javax.naming.spi.NamingManager.getObjectInstance(Unknown Source)<br />
	at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1447)<br />
	at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1464)<br />
	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:818)<br />
	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:682)<br />
	at javax.naming.InitialContext.lookup(Unknown Source)<br />
	at com.usairways.cbro.rtd.DepartureService.getFlightService(DepartureService.java:24)<br />
	at com.usairways.cbro.rtd.DepartureService.getDepartures(DepartureService.java:35)<br />
	at com.usairways.cbro.rtd.swing.TablePanel.(TablePanel.java:45)<br />
	at com.usairways.cbro.rtd.swing.RTDRFrame.create(RTDRFrame.java:53)<br />
	at com.usairways.cbro.rtd.swing.Main.main(Main.java:18)<br />
	... 9 more<br />
Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission skipAccessControl read)<br />
	at java.security.AccessControlContext.checkPermission(Unknown Source)<br />
	at java.security.AccessController.checkPermission(Unknown 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$1.run(SecurityUtility.java:117)<br />
	at java.security.AccessController.doPrivileged(Native Method)<br />
	at org.jboss.remoting.util.SecurityUtility.(SecurityUtility.java:112)<br />
	... 24 more<br />

Reply viewing options

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

How does your client application determine the server name?