2 Replies Latest reply on Apr 6, 2011 2:53 AM by Philani Dlamini

    how to look up CacheManager on JBOSS 6

    Philani Dlamini Newbie

      HI guys

       

      When looking up CacheManager from JNDI on JBOSS 6 as follows:

       

       

      1. ctx                                         = new InitialContext();

      2. manager                                        = (CacheManager)ctx.lookup("java:CacheManager");

       

       

       

      I get the below exception on line 2:

       

      java.lang.ClassCastException: org.jnp.interfaces.NamingContext cannot be cast to org.jboss.cache.CacheManager

       

       

      Why is the cast to CacheManager failing? pls help