2 Replies Latest reply on Jun 8, 2008 5:36 PM by talios

    envers trunk breaks under OSGi

    talios Newbie

      Hi all,

      I was just checking out the latest trunk release and found that envers stopped working under my OSGi environment. I traced it down to org.jboss.envers.reflection.YMethodsAndClasses#initClasses using Thread.getCurrentThread().getContextClassLoader().

      This meant that the class loading of XClass failed, as the current thread's class loader doesn't know anything about hibernate's classes.

      Simply changing this to:

      ClassLoader cl = YMethodsAndClasses.class.getClassLoader();

      worked around the problem and envers works as expected again.