0 Replies Latest reply on Jul 12, 2004 2:25 PM by Rahul Jain

    JBoss classloader issues (runtime class loading)

    Rahul Jain Newbie

      Hi,

      I am using JBoss 3.2.4 for deploying our app in an exploded ear format. Now at runtime, our app generates some Java classes on-the-fly and tries to load the resulting classes generated under some package. But the class loading fails because the loader cannot find the classes. The classloader used is the same loader that loads our app. The directory structure of ear is like this (note that we use the exploded format and all the *.*ar names are actual folders and not any archive files):

      myApp.ear
      myApp.ear\META-INF
      myApp.ear\serverCode.jar
      myApp.ear\web.war

      Now the runtime classes are generated under the serverCode.jar folder under some package structure. In this case the classloader fails to find any of the generated classes. So then I started generating the runtime classes under a separate folder names "generated.jar" under <Jboss server>\deploy folder. In this case the classloader is able to load the first generated class but its does not load all the remaining classes and this seems very weird.

      I have tried different thing, but have failed finding a solution to this problem.

      Somebody plz help and give me a pointer as to where should I place the runtime classes in our app so that they can be loaded.

      Thanks.

      Aalap.