3 Replies Latest reply on Dec 23, 2009 10:14 AM by David Lloyd

    Classloading issues due to jboss-classloading.xml contained in jars

    Noel O'Connor Novice

      Hi,

      We're working on some stuff for the Infinispan project and today we hit an issue with the Infinispan-rest web application on EAP 5.

      It seemed that a jboss-classloading.xml file in one of the dependent jars shipped with the web application caused classloading issues when

      deployed so much so that deployer wasn't able to find the  javax/servlet/http/HttpServlet.

      The cause of this issue it seems is that the marshalling-api-1.2.0.GA.jar has a META-INF/jboss-classloading.xml and when we removed this file, repacked the jar and redeployed the WAR the CL issue went away. We have raised a JIRA for this https://jira.jboss.org/jira/browse/JBAS-7572.

      Is this exepcted behaviour or is there something I'm missing. I didn't think that a JAR could have an influence on the AS classloading.

       

      regards

      Noel

       

      This is the contents of the marshalling-api-1.2.0.GA.jar/META-INF/jboss-classloading.xml

      <?xml version="1.0" encoding="UTF-8"?>

      <classloading name="marshalling-api" version="1.1.0.GA" xmlns="urn:jboss:classloading:1.0">
          <capabilities>
              <module name="marshalling-api" version="1.1.0.GA"/>
              <package name="org.jboss.marshalling"/>
              <package name="org.jboss.marshalling.reflect"/>
          </capabilities>
      </classloading>

       

      The following appears in the logs:

      2009-12-23 12:45:26,693 DEBUG [org.jboss.xb.util.JBossXBHelper] (HDScanner) Parsing file: infinispan.war/WEB-INF/lib/marshalling-api-1.2.0.GA.jar/META-INF/jboss-classloading.xml for type: class org.jboss.classloading.spi.metadata.ClassLoadingMetaData
      2009-12-23 12:45:26,693 DEBUG [org.jboss.xb.binding.parser.sax.SaxJBossXBParser] (HDScanner) Created parser: org.apache.xerces.jaxp.SAXParserImpl@136b124, isNamespaceAware: true, isValidating: true, isXIncludeAware: true
      2009-12-23 12:45:26,694 DEBUG [org.jboss.xb.binding.parser.sax.SaxJBossXBParser] (HDScanner) http://xml.org/sax/features/validation set to: true
      2009-12-23 12:45:26,694 DEBUG [org.jboss.xb.binding.parser.sax.SaxJBossXBParser] (HDScanner) http://xml.org/sax/features/namespaces set to: true
      2009-12-23 12:45:26,694 DEBUG [org.jboss.xb.binding.parser.sax.SaxJBossXBParser] (HDScanner) http://apache.org/xml/features/xinclude/fixup-base-uris set to: false
      2009-12-23 12:45:26,694 DEBUG [org.jboss.xb.binding.parser.sax.SaxJBossXBParser] (HDScanner) http://apache.org/xml/features/xinclude/fixup-language set to: false
      2009-12-23 12:45:26,694 DEBUG [org.jboss.xb.binding.parser.sax.SaxJBossXBParser] (HDScanner) http://apache.org/xml/features/validation/dynamic set to: true
      2009-12-23 12:45:26,694 DEBUG [org.jboss.xb.binding.parser.sax.SaxJBossXBParser] (HDScanner) http://apache.org/xml/features/validation/schema set to: true
      2009-12-23 12:45:26,694 DEBUG [org.jboss.xb.binding.parser.sax.SaxJBossXBParser] (HDScanner) http://xml.org/sax/features/validation set to: true
      2009-12-23 12:45:26,694 DEBUG [org.jboss.xb.binding.parser.sax.SaxJBossXBParser] (HDScanner) Created parser: org.apache.xerces.jaxp.SAXParserImpl@136b124, isNamespaceAware: true, isValidating: true, isXIncludeAware: true
      2009-12-23 12:45:26,697 DEBUG [org.jboss.xb.util.JBossXBHelper] (HDScanner) Parsed file: infinispan.war/WEB-INF/lib/marshalling-api-1.2.0.GA.jar/META-INF/jboss-classloading.xml to: ClassLoadingMetaData10@1758986{name=marshalling-api version=1.1.0.GA parent-first=true capabilities=[ModuleCapability{marshalling-api 1.1.0.GA}, PackageCapability{org.jboss.marshalling 0.0.0}, PackageCapability{org.jboss.marshalling.reflect 0.0.0}]}
      2009-12-23 12:45:26,701 DEBUG [org.jboss.xb.util.JBossXBHelper] (HDScanner) Parsing file: infinispan.war/WEB-INF/web.xml for type: class org.jboss.metadata.web.spec.WebMetaData
      2009-12-23 12:45:26,701 DEBUG [org.jboss.xb.binding.parser.sax.SaxJBossXBParser] (HDScanner) Created parser: org.apache.xerces.jaxp.SAXParserImpl@197fbbc, isNamespaceAware: true, isValidating: true, isXIncludeAware: true
      2009-12-23 12:45:26,701 DEBUG [org.jboss.xb.binding.parser.sax.SaxJBossXBParser] (HDScanner) http://xml.org/sax/features/validation set to: true
      2009-12-23 12:45:26,701 DEBUG [org.jboss.xb.binding.parser.sax.SaxJBossXBParser] (HDScanner) http://xml.org/sax/features/namespaces set to: true
      2009-12-23 12:45:26,701 DEBUG [org.jboss.xb.binding.parser.sax.SaxJBossXBParser] (HDScanner) http://apache.org/xml/features/xinclude/fixup-base-uris set to: false
      2009-12-23 12:45:26,701 DEBUG [org.jboss.xb.binding.parser.sax.SaxJBossXBParser] (HDScanner) http://apache.org/xml/features/xinclude/fixup-language set to: false
      2009-12-23 12:45:26,701 DEBUG [org.jboss.xb.binding.parser.sax.SaxJBossXBParser] (HDScanner) http://apache.org/xml/features/validation/dynamic set to: true
      2009-12-23 12:45:26,701 DEBUG [org.jboss.xb.binding.parser.sax.SaxJBossXBParser] (HDScanner) http://apache.org/xml/features/validation/schema set to: true
      2009-12-23 12:45:26,701 DEBUG [org.jboss.xb.binding.parser.sax.SaxJBossXBParser] (HDScanner) http://xml.org/sax/features/validation set to: true
      2009-12-23 12:45:26,701 DEBUG [org.jboss.xb.binding.parser.sax.SaxJBossXBParser] (HDScanner) Created parser: org.apache.xerces.jaxp.SAXParserImpl@197fbbc, isNamespaceAware: true, isValidating: true, isXIncludeAware: true
      2009-12-23 12:45:26,728 DEBUG [org.jboss.xb.util.JBossXBHelper] (HDScanner) Parsed file: infinispan.war/WEB-INF/web.xml to: org.jboss.metadata.web.spec.Web23MetaData@1f
      2009-12-23 12:45:26,730 DEBUG [org.jboss.deployers.vfs.plugins.classloader.InMemoryClassesDeployer] (HDScanner) Dynamic class root for vfsfile:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/infinispan.war/ is vfsmemory://3j001-ho3wr4-g3jdyv9h-1-g3jg0hqh-dr
      2009-12-23 12:45:26,730 DEBUG [org.jboss.classloading.spi.dependency.Domain] (HDScanner) org.jboss.classloading.spi.dependency.Domain@5bf624{DefaultDomain} add module VFSDeploymentClassLoaderPolicyModule marshalling-api:1.1.0.GA
      2009-12-23 12:45:26,732 DEBUG [org.jboss.classloader.spi.base.BaseClassLoader] (HDScanner) Created BaseClassLoader@121f31{vfsfile:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/infinispan.war/} with policy VFSClassLoaderPolicy@1bdede7{name=vfsfile:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/infinispan.war/ domain=null roots=[MemoryContextHandler@5112215[path= context=vfsmemory://3j001-ho3wr4-g3jdyv9h-1-g3jg0hqh-dr real=vfsmemory://3j001-ho3wr4-g3jdyv9h-1-g3jg0hqh-dr], FileHandler@21659765[path=infinispan.war/WEB-INF/classes context=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/ real=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/infinispan.war/WEB-INF/classes/], DelegatingHandler@3652725[path=infinispan.war/WEB-INF/lib/xpp3_min-1.1.4c.jar context=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/ real=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/infinispan.war/WEB-INF/lib/xpp3_min-1.1.4c.jar], DelegatingHandler@20297177[path=infinispan.war/WEB-INF/lib/javassist-3.6.0.GA.jar context=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/ real=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/infinispan.war/WEB-INF/lib/javassist-3.6.0.GA.jar], DelegatingHandler@20303800[path=infinispan.war/WEB-INF/lib/jboss-common-core-2.2.14.GA.jar context=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/ real=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/infinispan.war/WEB-INF/lib/jboss-common-core-2.2.14.GA.jar], DelegatingHandler@30958517[path=infinispan.war/WEB-INF/lib/marshalling-api-1.2.0.GA.jar context=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/ real=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/infinispan.war/WEB-INF/lib/marshalling-api-1.2.0.GA.jar], DelegatingHandler@24787575[path=infinispan.war/WEB-INF/lib/jackson-mapper-asl-0.9.9-6.jar context=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/ real=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/infinispan.war/WEB-INF/lib/jackson-mapper-asl-0.9.9-6.jar], DelegatingHandler@26506766[path=infinispan.war/WEB-INF/lib/scala-library-2.7.5.jar context=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/ real=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/infinispan.war/WEB-INF/lib/scala-library-2.7.5.jar], DelegatingHandler@30591055[path=infinispan.war/WEB-INF/lib/activation-1.1.jar context=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/ real=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/infinispan.war/WEB-INF/lib/activation-1.1.jar], DelegatingHandler@22866863[path=infinispan.war/WEB-INF/lib/jsr250-api-1.0.jar context=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/ real=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/infinispan.war/WEB-INF/lib/jsr250-api-1.0.jar], DelegatingHandler@24457711[path=infinispan.war/WEB-INF/lib/httpcore-4.0.1.jar context=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/ real=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/infinispan.war/WEB-INF/lib/httpcore-4.0.1.jar], DelegatingHandler@18970098[path=infinispan.war/WEB-INF/lib/slf4j-simple-1.5.8.jar context=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/ real=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/infinispan.war/WEB-INF/lib/slf4j-simple-1.5.8.jar], DelegatingHandler@29793508[path=infinispan.war/WEB-INF/lib/xstream-1.3.1.jar context=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/ real=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/infinispan.war/WEB-INF/lib/xstream-1.3.1.jar], DelegatingHandler@6710169[path=infinispan.war/WEB-INF/lib/river-1.2.0.GA.jar context=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/ real=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/infinispan.war/WEB-INF/lib/river-1.2.0.GA.jar], DelegatingHandler@1376563[path=infinispan.war/WEB-INF/lib/scannotation-1.0.2.jar context=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/ real=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/infinispan.war/WEB-INF/lib/scannotation-1.0.2.jar], DelegatingHandler@16899895[path=infinispan.war/WEB-INF/lib/jcl-over-slf4j-1.5.8.jar context=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/ real=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/infinispan.war/WEB-INF/lib/jcl-over-slf4j-1.5.8.jar], DelegatingHandler@31824524[path=infinispan.war/WEB-INF/lib/jgroups-2.8.0.CR7.jar context=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/ real=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/infinispan.war/WEB-INF/lib/jgroups-2.8.0.CR7.jar], DelegatingHandler@17144268[path=infinispan.war/WEB-INF/lib/jaxrs-api-1.2.GA.jar context=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/ real=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/infinispan.war/WEB-INF/lib/jaxrs-api-1.2.GA.jar], DelegatingHandler@11811654[path=infinispan.war/WEB-INF/lib/httpclient-4.0.jar context=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/ real=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/infinispan.war/WEB-INF/lib/httpclient-4.0.jar], DelegatingHandler@10449421[path=infinispan.war/WEB-INF/lib/resteasy-jaxrs-1.2.GA.jar context=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/ real=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/infinispan.war/WEB-INF/lib/resteasy-jaxrs-1.2.GA.jar], DelegatingHandler@33076960[path=infinispan.war/WEB-INF/lib/jboss-logging-spi-2.0.5.GA.jar context=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/ real=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/infinispan.war/WEB-INF/lib/jboss-logging-spi-2.0.5.GA.jar], DelegatingHandler@28202014[path=infinispan.war/WEB-INF/lib/rhq-pluginAnnotations-1.4.0.B01.jar context=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/ real=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/infinispan.war/WEB-INF/lib/rhq-pluginAnnotations-1.4.0.B01.jar], DelegatingHandler@1343349[path=infinispan.war/WEB-INF/lib/jboss-transaction-api-1.0.1.GA.jar context=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/ real=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/infinispan.war/WEB-INF/lib/jboss-transaction-api-1.0.1.GA.jar], DelegatingHandler@29093864[path=infinispan.war/WEB-INF/lib/infinispan-core-4.0.0.CR3.jar context=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/ real=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/infinispan.war/WEB-INF/lib/infinispan-core-4.0.0.CR3.jar], DelegatingHandler@25394361[path=infinispan.war/WEB-INF/lib/slf4j-api-1.5.8.jar context=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/ real=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/infinispan.war/WEB-INF/lib/slf4j-api-1.5.8.jar], DelegatingHandler@24209382[path=infinispan.war/WEB-INF/lib/i18nlog-1.0.9.jar context=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/ real=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/infinispan.war/WEB-INF/lib/i18nlog-1.0.9.jar], DelegatingHandler@6042607[path=infinispan.war/WEB-INF/lib/jackson-core-asl-0.9.9-6.jar context=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/ real=file:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/infinispan.war/WEB-INF/lib/jackson-core-asl-0.9.9-6.jar]]  delegates=null exported=[org.jboss.marshalling, org.jboss.marshalling.reflect]}
      2009-12-23 12:45:26,732 DEBUG [org.jboss.classloader.spi.base.BaseClassLoaderDomain] (HDScanner) ClassLoaderDomain@110b640{DefaultDomain} registerClassLoader BaseClassLoader@121f31{vfsfile:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/infinispan.war/}
      2009-12-23 12:45:26,735 DEBUG [org.jboss.aop.asintegration.jboss5.RegisterModuleCallback] (HDScanner) Registering module VFSDeploymentClassLoaderPolicyModule marshalling-api:1.1.0.GA
      2009-12-23 12:45:26,735 DEBUG [org.jboss.aop.asintegration.jboss5.AOPClassLoaderDeployer] (HDScanner) Adding AspectManager attachment org.jboss.aop.AspectManager@13ada for AbstractVFSDeploymentContext@21117556{vfsfile:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/infinispan.war/}
      2009-12-23 12:45:29,881 DEBUG [org.jboss.deployment.OptAnnotationMetaDataDeployer] (HDScanner) Deployment is metadata-complete, skipping annotation processing, ejbJarMetaData=null, jbossWebMetaData=org.jboss.metadata.web.spec.Web23MetaData@1f, jbossClientMetaData=null, metaDataCompleteIsDefault=false
      2009-12-23 12:45:29,882 TRACE [org.jboss.web.deployers.MergedJBossWebMetaDataDeployer] (HDScanner) Deploying: vfsfile:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/infinispan.war/
      2009-12-23 12:45:29,882 TRACE [org.jboss.web.deployers.MergedJBossWebMetaDataDeployer] (HDScanner) Deployed:  vfsfile:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/infinispan.war/
      2009-12-23 12:45:29,882 DEBUG [org.jboss.deployment.MappedReferenceMetaDataResolverDeployer] (HDScanner) vfsfile:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/infinispan.war/ endpoint mappings:

       

      2009-12-23 12:45:29,882 DEBUG [org.jboss.deployment.MappedReferenceMetaDataResolverDeployer] (HDScanner) Processing unit=infinispan.war, structure:
      infinispan.war

       

      2009-12-23 12:45:29,882 TRACE [org.jboss.web.deployers.WarSecurityDeployer] (HDScanner) Deploying: vfsfile:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/infinispan.war/
      2009-12-23 12:45:29,882 TRACE [org.jboss.web.deployers.WarSecurityDeployer] (HDScanner) Deployed:  vfsfile:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/infinispan.war/
      2009-12-23 12:45:29,885 DEBUG [org.jboss.wsf.container.jboss50.deployer.WebServiceDeployerPreJSE] (HDScanner) Error during deploy: vfsfile:/opt/jboss/servers/jboss-eap-5.0/jboss-as/server/default/deploy/infinispan.war/
      java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet
          at java.lang.ClassLoader.defineClass1(Native Method)
          at java.lang.ClassLoader.defineClass(ClassLoader.java:621)