maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hervé Boutemy (JIRA) <j...@apache.org>
Subject [jira] [Commented] (MSITE-774) Usage of validate=true lead to "SAX2 driver class org.apache.xerces.parsers.SAXParser not found" exception
Date Sun, 01 May 2016 16:00:14 GMT

    [ https://issues.apache.org/jira/browse/MSITE-774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15265801#comment-15265801
] 

Hervé Boutemy commented on MSITE-774:
-------------------------------------

there is an IT in m-site-p to check that validation works: how can the result be different
in your case?
but I checked and can reproduce the issue you're facing, even if I still can't explain why
this is happenning...

> Usage of validate=true lead to "SAX2 driver class org.apache.xerces.parsers.SAXParser
not found" exception
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: MSITE-774
>                 URL: https://issues.apache.org/jira/browse/MSITE-774
>             Project: Maven Site Plugin
>          Issue Type: Bug
>    Affects Versions: 3.5.1
>            Reporter: Roman Ivanov
>
> project: https://github.com/checkstyle/checkstyle
> usage of validate=true:
> {code}
> ...
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-site-plugin</artifactId>
>         <version>${maven.site.plugin.version}</version>
>         <configuration>
>           <xdocDirectory>${basedir}/src/xdocs</xdocDirectory>
>           <validate>true</validate>
>         </configuration>
> ...
> {code}
> lead to 
> {code}
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.5.1:site
(default-site) on project checkstyle: Error parsing '~/checkstyle/checkstyle/src/xdocs/anttask.xml.vm':
line [-1] Error validating the model: SAX2 driver class org.apache.xerces.parsers.SAXParser
not found -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.5.1:site
(default-site) on project checkstyle: Error parsing '~/checkstyle/checkstyle/src/xdocs/anttask.xml.vm':
line [-1] Error validating the model: SAX2 driver class org.apache.xerces.parsers.SAXParser
not found
> 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
> 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
> 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
> 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
> 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
> 	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
> 	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
> 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355)
> 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
> 	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
> 	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216)
> 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:160)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:497)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Error parsing '~/checkstyle/checkstyle/src/xdocs/anttask.xml.vm':
line [-1] Error validating the model: SAX2 driver class org.apache.xerces.parsers.SAXParser
not found
> 	at org.apache.maven.plugins.site.render.SiteMojo.execute(SiteMojo.java:140)
> 	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
> 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
> 	... 19 more
> Caused by: org.apache.maven.doxia.siterenderer.RendererException: Error parsing '~/checkstyle/checkstyle/src/xdocs/anttask.xml.vm':
line [-1] Error validating the model: SAX2 driver class org.apache.xerces.parsers.SAXParser
not found
> 	at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderDocument(DefaultSiteRenderer.java:449)
> 	at org.apache.maven.doxia.siterenderer.DoxiaDocumentRenderer.renderDocument(DoxiaDocumentRenderer.java:53)
> 	at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(DefaultSiteRenderer.java:329)
> 	at org.apache.maven.plugins.site.render.SiteMojo.renderDoxiaDocuments(SiteMojo.java:264)
> 	at org.apache.maven.plugins.site.render.SiteMojo.renderLocale(SiteMojo.java:171)
> 	at org.apache.maven.plugins.site.render.SiteMojo.execute(SiteMojo.java:135)
> 	... 21 more
> Caused by: org.apache.maven.doxia.parser.ParseException: Error validating the model:
SAX2 driver class org.apache.xerces.parsers.SAXParser not found
> 	at org.apache.maven.doxia.util.XmlValidator.validate(XmlValidator.java:116)
> 	at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.validate(DefaultSiteRenderer.java:1084)
> 	at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderDocument(DefaultSiteRenderer.java:414)
> 	... 26 more
> Caused by: org.xml.sax.SAXException: SAX2 driver class org.apache.xerces.parsers.SAXParser
not found
> java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser
> 	at org.xml.sax.helpers.XMLReaderFactory.loadClass(XMLReaderFactory.java:230)
> 	at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReaderFactory.java:191)
> 	at org.apache.maven.doxia.util.XmlValidator.getXmlReader(XmlValidator.java:132)
> 	at org.apache.maven.doxia.util.XmlValidator.validate(XmlValidator.java:108)
> 	... 28 more
> Caused by: java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser
> 	at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
> 	at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
> 	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
> 	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
> 	at org.xml.sax.helpers.NewInstance.newInstance(NewInstance.java:82)
> 	at org.xml.sax.helpers.XMLReaderFactory.loadClass(XMLReaderFactory.java:228)
> 	... 31 more
> [ERROR]
> [ERROR]
> {code}
> command:
> mvn clean site -Dcheckstyle.ant.skip=true -DskipTests -DskipITs -Dpmd.skip=true -Dfindbugs.skip=true
-Dcobertura.skip=true -Dcheckstyle.skip=true -Dlinkcheck.skip=true
> workaround ("...  -Dorg.xml.sax.driver=com.sun.org.apache.xerces.internal.parsers.SAXParser")
or validate=false:
>  mvn clean site -Dcheckstyle.ant.skip=true -DskipTests -DskipITs -Dpmd.skip=true -Dfindbugs.skip=true
-Dcobertura.skip=true -Dcheckstyle.skip=true -Dlinkcheck.skip=true -Dorg.xml.sax.driver=com.sun.org.apache.xerces.internal.parsers.SAXParser
> Expected: 
> org.apache.xerces.parsers.SAXParser should be avoided . Doxia already removed it from
dependecies - https://issues.apache.org/jira/browse/DOXIA-526 , not clear why "org.apache.xerces.parsers.SAXParser"
is still referenced.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message