3 Replies Latest reply on Feb 24, 2006 5:50 PM by Scott Stark

    classpath trouble: codebase urls

    wzzzrd Newbie

      Hi there,

      We want to deploy all (non third party) libs in the ear file. Some MBeans (also deployed in the ear file) need jars from the ear on their classpaths.

      For MBeans the classpath can be defined via the classpath xml tag in the *-service.xml file. It's attribute codebase takes an URL as value and JBoss uses URLListers as handlers for these protocols.

      But then we noticed that there are only handlers for the protocols file:, http:, https:

      But no handler (or URLLister) is registered for the jar: protocol. After looking at the code we found there is a njar: lister, but it is not beeing registered:


      public class URLListerFactory {
       private static HashMap defaultClasses = new HashMap();
       static {
       defaultClasses.put("file", "org.jboss.net.protocol.file.FileURLLister");
       defaultClasses.put("http", "org.jboss.net.protocol.http.DavURLLister");
       defaultClasses.put("https", "org.jboss.net.protocol.http.DavURLLister");
       private HashMap classes;
       * Create a URLLister with default listers defined for file and http
       * protocols.
       public URLListerFactory() {
       classes = (HashMap) defaultClasses.clone();

      As I see it, it is not possible to create a classpath containing libraries that reside in an ear file. Was that intended?

      OS: Linux
      JBoss-Version: jboss-4.0.3SP1

      Any ideas/ solutions/ workarounds are welcome.

      Thanks in advance,