Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-3950

Add JVM packages to filteredPackages in JBossWeb

    XMLWordPrintable

Details

    • Not Required

    Description

      We have a lot of cases where customers take war files that run fine in Tomcat or other applications servers and when they deploy to JBoss they get various classloading issues. They do not understand why it works in Tomcat and not JBoss since JBossWeb is basically using Tomcat underneath. The reason is many of them have 3rd party apps which are war files and include various jars some of which are api jars such as xml-apis.jar and servlet-api.jar.

      According to Tomcat documentation it will ignore servlet-api.jar if it is packaged in the war and it also seems to ignore other classes which already exist in the JVM as the only way to override them would be to use the endorsed directory option.

      I found that adding packages to the filteredPackages makes JBoss behave more like Tomcat, where it will ignore classes which are in the JVM.

      Is there a reason we are not already filtering JVM packages? Because if a user packages any of the classes in the JVM and they get used they will have ClassCast errors. Below are the ones I had to add, but it seems we would list all packages that the JVM contains.

      deployers/jbossweb.deployer/META-INF/war-deployers-jboss-beans.xml
      <property
      name="filteredPackages">javax.servlet,org.apache.commons.logging,javax.xml,org.w3c.dom,org.xml.sax</property>

      Attachments

        Activity

          People

            rmaucher Remy Maucherat
            rhn-support-bmaxwell Brad Maxwell
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: