2 Replies Latest reply on Sep 27, 2003 3:10 AM by gnangoma

    Applet error accessing JNDI

    bferguson2

      Not sure if this should go here or the Security forum.

      When I try to access JNDI from inside an applet, I am receiving the following exception:

      java.security.AccessControlException: access denied (java.net.SocketPermission 230.0.0.4 connect,accept,resolve)
      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.SecurityManager.checkMulticast(SecurityManager.java:1198)
      at java.net.DatagramSocket.send(DatagramSocket.java:549)
      at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1033)
      at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1127)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:478)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:471)
      at javax.naming.InitialContext.lookup(InitialContext.java:347)
      .............

      The address, 230.0.0.4, is a multicast address and is in noway directly associated with my computer.

      1. What is the address being used for?
      2. Can this be disabled or is there another way around accessing JNDI from an applet.

      Thanks,
      --Bruce II

        • 1. Re: Applet error accessing JNDI
          haraldgliebe

          >
          > 1. What is the address being used for?
          It's used to automatically discover the nameservice via multicast.

          > 2. Can this be disabled or is there another way
          > around accessing JNDI from an applet.
          Add jnp.disableDiscovery=true to the properties when you create the InitalContext.

          Regards,
          Harald

          • 2. Re: Applet error accessing JNDI

            > >
            > > 1. What is the address being used for?
            > It's used to automatically discover the nameservice
            > via multicast.
            >
            > > 2. Can this be disabled or is there another way
            > > around accessing JNDI from an applet.
            > Add jnp.disableDiscovery=true to the properties when
            > you create the InitalContext.
            >
            > Regards,
            > Harald
            Hello Harald,
            Thanks for your response. I had similar problem, though in my case I am running application from a win 98 machine. My server is Linux box (SUSE).
            After adding what you suggested, I got different error messages: javax.naming.CommunicationException: Could not obtain connection to any of these urls: 192.168.0.6:1099. However, I can ping from my window 98 to 192.168.0.6. Why my application was not able to see the server node...