0 Replies Latest reply on May 17, 2004 11:39 AM by olivierscalbert

    Problem with the JNDIMap example

    olivierscalbert Newbie

      I have a problem with the JNDIMap example (from The JBoss JMX Microkernel)
      The MBean is succesfully deployed on the server, but when I try the following client code, I receive a ClassCastException ...
      InitialContext ctx = new InitialContext();
      HashMap map = (HashMap) ctx.lookup("inmemory/maps/MapTest");

      If I change the code:
      Object map = ctx.lookup("inmemory/maps/MapTest");

      I have:
      Reference Class Name: java.util.HashMap
      Type: nns
      Content: inmemory/maps/MapTest

      Any ideas ?