2 Replies Latest reply on Feb 24, 2012 1:43 AM by Mostafa Far

    ClassNotFoundException though module dependency is defined

    Mostafa Far Newbie

      Hi,

       

      I have migrated a project from Jboss 4.3 to Jboss 7.1.0.CR1b. The deployed application is an ear file including over 80 ejb-jars. For ease of the work all the project libraries were included in the ear/lib folder and the whole application is deployed successfully and some functions are tested and is working perfectly.

       

      for the next step, i wanted to take  the all libraries (over 150 jars) out of the ear file. I already defined a module and included all the library jar files as the resources of that module and defined the dependecy in the jboss-deployment-structure.xml.

       

      While I am sure that Jboss recognizes many of the APIs through module dependecy difintion, still I get many ClassNotFoundException, mostly during runtime.

       

      Each time i have to search to see which jar files it might depends on and as soon as I add that jar file to the ear/lib the exception will be resolved.

       

      I already spend a whole day to resolve these eceptions but it seems finding dependecy one by one is a hectic and very timeconsuming task. ...I reckon this is due to inconsistency with default jboss 7 class loading... Is there any way to tell jboss to give priority to the my defined module or to define a lib folder outside of ear file and tell jboss to take out libraries from there?

       

       

      you help is very appreciated...