1 Reply Latest reply on Dec 13, 2004 1:09 PM by deejboss

    ClassLoader problem when installing ear

    deejboss

      Hi,

      I'm using Jboss 4. When I install ear I get this exception :

      java.lang.ClassNotFoundException: No ClassLoaders

      Can somebody give me tips of how classloader works within an ear file.
      if there is a jar file inside an ear and I want the classes in the jar file to be available to other sar and rar files within that ear file how that works ??

      I have read these articles but in vain.
      http://www.jboss.org/wiki/Wiki.jsp?page=JBossClassLoadingUseCases
      http://www.jboss.org/wiki/Wiki.jsp?page=ClassLoadingConfiguration

      my sar/jboss-service.xml
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE server PUBLIC "-//JBoss//DTD MBean Service 3.2//EN" "http://www.jboss.org/j2ee/dtd/jboss-service_3_2.dtd">

      <loader-repository>ameriquest.dot.com:loader=storageservice.jar</loader-repository>



      The classpath out here defines the root path of the server
      e.g. C:\jboss\jboss\server\default\deploy
      and can reach my ear file but not any jar files inside my ear file. There is some link missing where I can define my classpath for the classloader to understand the path of my jar file within an ear file. Like in weblogic
      APP-INF/lib.

      Please suggest .....
      Thanks

        • 1. Re: ClassLoader problem when installing ear
          deejboss

          Well even though nobody helped me out I have solved the problem myself --------

          Create an sar file and put a llib with all the related jar files and deploy the code in the "all" configuration. Now you can call the resource adapter from a session bean.

          ear
          sar
          -lib
          --jar (which has all the resource adaptor files)
          -rar (with the ra.xml file inside sar)

          If anybody has any question. Reply to this link and I'll try to answer.

          Thanks