Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-4435

WebAppClassLoader.getResource() fails when the war is deployed as part of an ear

    XMLWordPrintable

Details

    • Bug
    • Resolution: Obsolete
    • Major
    • None
    • None
    • ClassLoading
    • None

    Description

      For some reason WebAppClassLoader.getResource("WEB-INF/wsdl/TestEndpoint.wsdl")
      fails when the war is deployed as part of an ear deployment.

      I use this workaround in

      static class VirtualFileClassLoader extends ClassLoader
      {
      private UnifiedVirtualFile vFile;

      public VirtualFileClassLoader(UnifiedVirtualFile file, ClassLoader parent)

      { super(parent); vFile = file; }

      @Override
      public URL getResource(String name)
      {
      URL url = super.getResource(name);
      if (url == null)
      {
      try

      { url = vFile.findChild(name).toURL(); }

      catch (IOException e)

      { // ignore }

      }
      return url;
      }
      }

      Attachments

        Activity

          People

            starksm64 Scott Stark (Inactive)
            tdiesler@redhat.com Thomas Diesler
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: