maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Hanafey (JIRA)" <j...@codehaus.org>
Subject [jira] Commented: (MSITE-440) Site document validation fails if unable to retrieve schema (in offline mode)
Date Wed, 03 Feb 2010 20:06:55 GMT

    [ http://jira.codehaus.org/browse/MSITE-440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=209083#action_209083
] 

Mike Hanafey commented on MSITE-440:
------------------------------------

The problem exists even when not in offline mode if you require a proxy to fetch external
resources. The root cause in this case is *java.net.UnknownHostException: maven.apache.org*.


I stored a local copy of the FML schema, but then the same error occurs on some reference
to www.w3.org. So the problem is the proxy configuration from settings.xml is not being used.

{code}<faqs
  xmlns="http://maven.apache.org/FML/1.0.1"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/FML/1.0.1 http://maven.apache.org/xsd/fml-1.0.1.xsd"
  title="">
...
</faqs>

[DEBUG] Generating /home/mkh/sd/svn/LeadTracker/trunk/DB/target/site/conventions.html
[DEBUG] Validating the content...
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error during page generation

Embedded error: Error parsing '/home/mkh/sd/svn/LeadTracker/trunk/DB/src/site/fml/conventions.fml':
line [-1] Error validating the model: maven.apache.org
[INFO] ------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error during page generation
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
	at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
	at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
	at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
	at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:110)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error during page generation
	at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:114)
	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
	... 22 more
Caused by: org.apache.maven.doxia.siterenderer.RendererException: Error parsing '/home/mkh/sd/svn/LeadTracker/trunk/DB/src/site/fml/conventions.fml':
line [-1] Error validating the model: maven.apache.org
	at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderDocument(DefaultSiteRenderer.java:412)
	at org.apache.maven.doxia.siterenderer.DoxiaDocumentRenderer.renderDocument(DoxiaDocumentRenderer.java:53)
	at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(DefaultSiteRenderer.java:328)
	at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(DefaultSiteRenderer.java:132)
	at org.apache.maven.plugins.site.SiteMojo.renderLocale(SiteMojo.java:142)
	at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:109)
	... 24 more
Caused by: org.apache.maven.doxia.parser.ParseException: Error validating the model: maven.apache.org
	at org.apache.maven.doxia.parser.AbstractXmlParser.validate(AbstractXmlParser.java:640)
	at org.apache.maven.doxia.parser.AbstractXmlParser.parse(AbstractXmlParser.java:142)
	at org.apache.maven.doxia.module.fml.FmlParser.parse(FmlParser.java:122)
	at org.apache.maven.doxia.DefaultDoxia.parse(DefaultDoxia.java:63)
	at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderDocument(DefaultSiteRenderer.java:404)
	... 29 more
Caused by: java.net.UnknownHostException: maven.apache.org
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
	at java.net.Socket.connect(Socket.java:525)
	at java.net.Socket.connect(Socket.java:475)
	at java.net.Socket.<init>(Socket.java:372)
	at java.net.Socket.<init>(Socket.java:246)
	at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:80)
	at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:122)
	at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
	at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
	at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
	at org.apache.maven.doxia.parser.AbstractXmlParser$CachedFileEntityResolver.toByteArray(AbstractXmlParser.java:1024)
	at org.apache.maven.doxia.parser.AbstractXmlParser$CachedFileEntityResolver.resolveEntity(AbstractXmlParser.java:958)
	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.parser.AbstractXmlParser.validate(AbstractXmlParser.java:635)
	... 33 more

{code}

> Site document validation fails if unable to retrieve schema (in offline mode)
> -----------------------------------------------------------------------------
>
>                 Key: MSITE-440
>                 URL: http://jira.codehaus.org/browse/MSITE-440
>             Project: Maven 2.x Site Plugin
>          Issue Type: Bug
>          Components: doxia integration
>    Affects Versions: 2.1
>         Environment: Maven 2.2.1
> Site Plugin 2.1-SNAPSHOT
> Doxia 1.1.2
>            Reporter: Dave Meibusch
>            Priority: Critical
>             Fix For: 2.1.1
>
>
> The changes included DOXIA-263 to validate XML documents retrieves the DTD/Schema to
validate the document.
> For example, for FML, xsi:schemaLocation="http://maven.apache.org/FML/1.0.1 http://maven.apache.org/xsd/fml-1.0.1.xsd"
the Doxia FML parser will retrieve http://maven.apache.org/xsd/fml-1.0.1.xsd before validating
the document.
> If in offline mode, or in an environment without connectivity to apache.org, site generation
will appear to hang until the HTTP client code times out (which is many minutes for each retry)
then fail.
> Workaround: remove the schema definition from the document (and lose validation when
online and IDE editing support).
> Perhaps each Doxia parser should have some embedded schemas (for FML, at least http://maven.apache.org/FML/1.0.1)
so the entities can be resolved locally.
> Or at least a property for disabling document validation.
> I don't think v2.1 can be released with this issue unresolved.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message