1 Reply Latest reply on May 8, 2003 10:32 AM by sys user

    AccessControlException

    sys user Master

      I recently switched from jboss-3.0.4_tomcat-4.1.x to jboss-3.2.1_tomcat-4.1.24.

      in 3.0.4 i was able to listBindings to display all the deployed beans. i am now getting an error when trying to do this in 3.2.1. are there some permissions to change? I am using the default server.policy:
      grant {
      // Allow everything for now
      permission java.security.AllPermission;
      };


      Properties p = new Properties();
      p.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
      p.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
      p.put(Context.PROVIDER_URL, "localhost:1099");
      Context ctx = new javax.naming.InitialContext(p);
      NamingEnumeration ne = ctx.listBindings("");
      while (ne.hasMoreElements())
      {
      NameClassPair b = (NameClassPair)ne.nextElement();
      System.out.println("name " + b.getName());
      System.out.println("type " + b.getClassName());
      System.out.println();
      }


      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.listBindings(NamingContext.java:706)
      at org.jnp.interfaces.NamingContext.listBindings(NamingContext.java:699)
      at javax.naming.InitialContext.listBindings(InitialContext.java:396)
      at clients.TestClient.main(TestClient.java:87)

      any suggestions?
      thanks