Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-617

Can not find beans when deploying compressed Archive to Tomcat

    Details

    • Workaround:
      Workaround Exists
    • Workaround Description:
      Hide

      Use exploded deployment

      Show
      Use exploded deployment

      Description

      When deploying a compressed Archive on Tomcat, WebAppBeanDeploymentArchive.scan fails to find and classes.

      In WebAppBeanDeploymentArchive.scan we try to get the File object representation of the WEB-INF/classes directory so we can recursively scan for classes, but in Tomcat this is a URL to jndi backed by a DirContext.

      WebAppBeanDeploymentArchive.scan
      { // inside scan
      File webInfClasses = Servlets.getRealFile(servletContext, WEB_INF_CLASSES);

      { // inside getRealFile String realPath = servletContext.getRealPath(path); realPath == null URL resourcePath = servletContext.getResource(path); resourcePath == jndi:/localhost/test/WEB-INF/classes }

      webInfClasses == null
      }

      End result is no classes are found.

        Gliffy Diagrams

          Activity

          Hide
          alesj Ales Justin added a comment -

          Custom TomcatListener knows how to deal with packed deployments.

          Show
          alesj Ales Justin added a comment - Custom TomcatListener knows how to deal with packed deployments.

            People

            • Assignee:
              alesj Ales Justin
              Reporter:
              aslak Aslak Knutsen
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development