0 Replies Latest reply on Apr 1, 2003 5:11 PM by Radu Mateescu

    ClassCastException in JBoss 3.2 RC4 which has never occured

    Radu Mateescu Newbie

      I've got an error reported under JBoss 3.2 RC4 which wasn't in RC3. Here are the details:
      A web application has a startup servlet which gets a reference to a cache MBean and get an attribute. Here is the code:
      try {
      ObjectName eventsCacheMBean = new ObjectName(eventsCacheServiceName);
      _eventsCache = (GenericCache)_mBeanServer.getAttribute(eventsCacheMBean, "EventsCache");

      This was working fine until RC4. Now, I'm getting a ClassCastException at the line with the cast to GenericCache.
      The attribute registered in the MBean server is at the same type with the value returned by the method getAttribute() in the servlet, but I think that the classes have different identities (possible because of different ClassLoaders in .war and .sar?)
      Any suggestions, please?