ejb and java web start problem
chemapo Mar 22, 2004 5:59 AMHi,
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"?>
<!-- JNLP File for klwebspy Demo Application -->
KLWebSpy
Keld Electronics.
KLWebSpy
KLWebSpy.
<all-permissions/>
<j2se version="1.4"/>
<applet-desc
documentBase="http://172.26.0.14:8080/klwebspy/lib"
name="KLWebSpy"
main-class="klwebspy.applets.KLWebSpy"
width="800"
height="600">
</applet-desc>
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