Uploaded image for project: 'Maven Site Plugin'
  1. Maven Site Plugin
  2. MSITE-603

ClassNotFoundException on site:site when validating XML input documents

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0
    • 3.1
    • None
    • None

    Description

      When setting validate to true the 3.0 release of the maven-site-plugin fails with a ClassNotFoundException (sample project included):

      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:125)
      ... 20 more
      Caused by: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
      at org.apache.http.impl.client.AbstractHttpClient.<init>(AbstractHttpClient.java:159)
      at org.apache.http.impl.client.DefaultHttpClient.<init>(DefaultHttpClient.java:178)
      at org.apache.maven.doxia.parser.AbstractXmlParser$CachedFileEntityResolver.toByteArray(AbstractXmlParser.java:796)
      at org.apache.maven.doxia.parser.AbstractXmlParser$CachedFileEntityResolver.resolveEntity(AbstractXmlParser.java:738)
      at org.apache.xerces.util.EntityResolverWrapper.resolveEntity(Unknown Source)
      at org.apache.xerces.impl.XMLEntityManager.resolveEntity(Unknown Source)
      at org.apache.xerces.impl.xs.XMLSchemaLoader.resolveDocument(Unknown Source)
      at org.apache.xerces.impl.xs.XMLSchemaValidator.findSchemaGrammar(Unknown Source)
      at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
      at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
      at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
      at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
      at org.apache.maven.doxia.util.XmlValidator.validate(XmlValidator.java:108)
      at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.validate(DefaultSiteRenderer.java:831)
      at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderDocument(DefaultSiteRenderer.java:365)
      at org.apache.maven.doxia.siterenderer.DoxiaDocumentRenderer.renderDocument(DoxiaDocumentRenderer.java:53)
      at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(DefaultSiteRenderer.java:317)
      at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(DefaultSiteRenderer.java:134)
      at org.apache.maven.plugins.site.SiteMojo.renderLocale(SiteMojo.java:175)
      at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:138)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
      ... 20 more
      Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory
      at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
      at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
      at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
      ... 47 more

      This problem only shows up if there are XML input documents (FML, XDoc) present to be validated.

      It doesn't occur with 3.0-beta-3 instead of 3.0.

      Attachments

        1. testcase.tar.gz
          1 kB
          Andreas Sewe

        Issue Links

          Activity

            People

              ltheussl Lukas Theussl
              sewe Andreas Sewe
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: