2 Replies Latest reply on Jan 28, 2006 7:58 PM by Gerry Matte

    ClassNotFound(No security Manager,RMI disabled)

    Gerry Matte Newbie

      I've been struggling with Jboss 4.0.3RC1 to perform a simple JNDI list from a servlet running under Tomcat 5.5 in a separate JVM (not the embedded Tomcat). The same error occurs in a standalone java class (not a servlet).

      The servlet works fine when deployed to the embedded Tomcat.

      When running in a stand alone Tomcat server (with base port 8086 instead of the 8080 used by the jboss embedded Tomcat), I can create a JNDI InitalContext and execute it's list() method but the listBindings() method throws the exception:
      javax.naming.CommunicationException [Root exception is java.lang.ClassNotFoundException: org.jboss.ejb.plugins.keygenerator.hilo.HiLoKeyGeneratorFactory (no security manager: RMI class loader disabled)]

      I have seen this ClassNotFound(no security manager: RMI class loader disabled) in a number of unanswered posts in this forum. Is this problem too elementary for anyone to respond to ?

      Having read the JVM tutorial and the security manager javadoc, I have been able to start my standalone program with a security manager and policy activated. The exception I now see is:
      javax.naming.CommunicationException [Root exception is java.lang.ClassNotFoundException: org.jboss.ejb.plugins.keygenerator.hilo.HiLoKeyGeneratorFactory]

      And the jBoss console shows:
      00:04:00,316 ERROR [UDP] exception=java.net.SocketException: Interrupted function call: Datagram send failed, msg=[dst: 230.1.2.7:45577, src: tia1013:1952 (2 headers), size = 0 bytes], mcast_addr=230.1.2.7:45577

      I've ensured (I think) that all the jars in the jBoss client directory are on the classpath - so it shouldn't be a true ClassNotFoundException.

      I don't mind doing my own reading and learning but I have no idea where to start. Can anyone give me an idea where to look next ?

      Thanks in advance.

      FYI - the code to create the initial context is:
      Properties props = new Properties();
      props.setProperty("java.naming.provider.url", "jnp://localhost:1099");
      props.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming");
      props.setProperty("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
      InitialContext ctx = new InitialContext( props );

      and the listBindings code that throws the exception is:
      nenum = ctx.listBindings("java:");
      while (nenum.hasMoreElements() ) {
      System.out.println("Binding: " + nenum.nextElement() +"") ;
      }