Skip to main content

j2ee client and java web start

1 reply [Last post]
chema
Offline
Joined: 2006-05-05
Points: 0

Hi,

I'am developing a client side component for our J2EE application. We want to download and launch this client from the app server (jboss) using Java Web Start. We have defined the jnlp file like this:

<?xml version="1.0" encoding="utf-8"?>

KLWebSpy
Keld Electronics.

KLWebSpy
KLWebSpy.

And we have signed the jar file. When we try to launch the client we get the following exception in the java console:

java.security.AccessControlException: access denied (java.net.SocketPermission 172.26.0.14:1098 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.rmi.transport.tcp.TCPChannel.checkConnectPermission(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:528)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:507)
at javax.naming.InitialContext.lookup(Unknown Source)
at klwebspy.locator.ServiceLocator.getHome(ServiceLocator.java:53)
at klwebspy.applets.KLWebSpy.jbInit(KLWebSpy.java:111)
at klwebspy.applets.KLWebSpy.init(KLWebSpy.java:97)
at klwebspy.applets.KLWebSpy.main(KLWebSpy.java:482)
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.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(Unknown Source)

This exception is thrown when the client tries to connect to the ejb components, this components are in the same server that the client jar file. We don't know why this exception is thrown because we have signed the jar and we have provide all permissions in the jnlp file. �Can you help?

Thanks in advance

Regards

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Anonymous

Basically this exception is thrown when your Web Start application tries to connect to a remote host other as the one where it came from. Web Start application are in a similar sandbox as Applets are.

I had the same problem. Reasons:
(1) I used an additional 3rd party JAR file wich was not signed
(2) My JNLP file invoked a secondary jnlp that did NOT have all-permissions granted

Hope that helps,

Patrick