0 Replies Latest reply on Feb 3, 2013 1:44 PM by Chaturvedi Dewashish

    Class def not found in jboss as 7.X when using classloader for custom jar

    Chaturvedi Dewashish Newbie

      I have a project structure as



      //Now I tried to load classes from classloader as 
      ClassLoader cl = Thread.currentThread().getContextClassLoader();
      clazz = Class.forName(my-custom-classes.class1.class.getName(), true, cl);

      Esper uses this way to load events type for pojo classes, but this will not work as current thread is of jboss and jboss has not any identification of my-custom-classes.jar.


      So my question is how this can be done with jboss? I have to have to load class definition at runtime. Is there any way in "jboss-deployment-structure" I can define how to load classes before deploying EAR?

      I also tried moving class definition from my-custom-classes.jar to my-custom-ejb.jar and loading class definition on to current thread, but this also didn't work.