On 2010-11-13 18:21, Lukas Theussl wrote:
> 
> 
> Dennis Lundberg wrote:
>> On 2010-11-13 17:47, Dennis Lundberg wrote:
>>> On 2010-11-13 17:24, Lukas Theussl wrote:
>>>>
>>>> I can confirm this but I have no idea right now (what does "Server
>>>> Error" mean?).
>>>
>>> Right, not the most useful error message...
>>
>> After enhancing the error message I get this when running the failing
>> test:
>>
>>
>> Caused by: java.io.IOException: Method failed: 'Server Error' when
>> accessing the URL 'http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent'.
>> Status code=500
>>
>> The parser requires a status code of 200.
>>
>> I had problems trying to fetch that URL from IDEA as well.
>>
>> The question is how to deal with it. Do we download that resource and
>> put it locally among the other test resources, and reference it as such
>> in the test case? It would feel just wrong to change the parser to allow
>> status 500.
> 
> Yes, the tests should not depend on whether a resource is available
> online or not. I would also prefer you adapt your commit r1033377 [1] so
> as to not require a network connection for the tests.

Done.

Some googling found the answer to why the problems occured:
http://www.vineetmanohar.com/2010/11/w3-org-dtds-blocked-from-java-http-500/

I have a patch locally that changes the user-agent header to get around
this, if we should need it later on. I'm not including it in this
release though.

> In general, validation and entity resolution should use local resources
> whenever possible, see DOXIA-388, MSITE-440.
> 
> Cheers,
> -Lukas
> 
> 
> [1] http://svn.apache.org/viewvc?view=revision&revision=1033377
> 
>>
>>>
>>>> I have checked out the 1.1.3 tag and it builds fine, so
>>>> it must be some recent change, maybe the httpclient upgrade?
>>>
>>> Yes, that could be it. Thanks!
>>>
>>>> -Lukas
>>>>
>>>>
>>>> Dennis Lundberg wrote:
>>>>> Hi
>>>>>
>>>>> After fixing a test failure (at least I thought so) in r10033377
>>>>> [1] for
>>>>> doxia-sitetools, I went ahead to release doxia and doxia-sitetools
>>>>> 1.1.4. This fails during doxia-sitetools because of a test failure on
>>>>> both Windows And Ubuntu. It has to with validating an xdoc document
>>>>> that
>>>>> specifies entities. This test was added in version 1.1.3 as
>>>>> DOXIASITETOOLS-37 [2], so it has passed a release before.
>>>>>
>>>>>
>>>>> Here's my Surefire Report:
>>>>>
>>>>> -------------------------------------------------------------------------------
>>>>>
>>>>>
>>>>> Test set: org.apache.maven.doxia.siterenderer.DefaultSiteRendererTest
>>>>> -------------------------------------------------------------------------------
>>>>>
>>>>>
>>>>> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 36.125
>>>>> sec<<<   FAILURE!
>>>>> testRender(org.apache.maven.doxia.siterenderer.DefaultSiteRendererTest)
>>>>>
>>>>>    Time elapsed: 36.094 sec<<<   ERROR!
>>>>> org.apache.maven.doxia.siterenderer.RendererException: Error parsing
>>>>> 'G:\apache\maven\trunks\doxia\doxia-sitetools\doxia-site-renderer\src\test\resources\site-validate\xdoc\entityTest.xml':
>>>>>
>>>>>
>>>>> line [-1] Error validating the model: Method failed: Server Error
>>>>>      at
>>>>> org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderDocument(DefaultSiteRenderer.java:418)
>>>>>
>>>>>
>>>>>      at
>>>>> org.apache.maven.doxia.siterenderer.DoxiaDocumentRenderer.renderDocument(DoxiaDocumentRenderer.java:53)
>>>>>
>>>>>
>>>>>      at
>>>>> org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(DefaultSiteRenderer.java:330)
>>>>>
>>>>>
>>>>>      at
>>>>> org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(DefaultSiteRenderer.java:134)
>>>>>
>>>>>
>>>>>      at
>>>>> org.apache.maven.doxia.siterenderer.DefaultSiteRendererTest.testRender(DefaultSiteRendererTest.java:132)
>>>>>
>>>>>
>>>>> Caused by: org.apache.maven.doxia.parser.ParseException: Error
>>>>> validating the model: Method failed: Server Error
>>>>>      at
>>>>> org.apache.maven.doxia.util.XmlValidator.validate(XmlValidator.java:112)
>>>>>
>>>>>      at
>>>>> org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.validate(DefaultSiteRenderer.java:879)
>>>>>
>>>>>
>>>>>      at
>>>>> org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderDocument(DefaultSiteRenderer.java:399)
>>>>>
>>>>>
>>>>>      ... 30 more
>>>>> Caused by: java.io.IOException: Method failed: Server Error
>>>>>      at
>>>>> org.apache.maven.doxia.parser.AbstractXmlParser$CachedFileEntityResolver.toByteArray(AbstractXmlParser.java:810)
>>>>>
>>>>>
>>>>>      at
>>>>> org.apache.maven.doxia.parser.AbstractXmlParser$CachedFileEntityResolver.resolveEntity(AbstractXmlParser.java:739)
>>>>>
>>>>>
>>>>>      at
>>>>> org.apache.xerces.util.EntityResolverWrapper.resolveEntity(Unknown
>>>>> Source)
>>>>>      at org.apache.xerces.impl.XMLEntityManager.resolveEntity(Unknown
>>>>> Source)
>>>>>      at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown
>>>>> Source)
>>>>>      at org.apache.xerces.impl.XMLDTDScannerImpl.startPE(Unknown
>>>>> Source)
>>>>>      at org.apache.xerces.impl.XMLDTDScannerImpl.skipSeparator(Unknown
>>>>> Source)
>>>>>      at org.apache.xerces.impl.XMLDTDScannerImpl.scanDecls(Unknown
>>>>> Source)
>>>>>      at
>>>>> org.apache.xerces.impl.XMLDTDScannerImpl.scanDTDInternalSubset(Unknown
>>>>> Source)
>>>>>      at
>>>>> org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.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)
>>>>>
>>>>>      ... 32 more
>>>>>
>>>>>
>>>>> To be able to recreate this you need to downgrade the property
>>>>> <doxiaVersion>   in the main POM of doxia-sitetools from 1.1.4 to
>>>>> 1.1.4-SNAPSHOT. Doxia 1.1.4 is currently on my local machine and in an
>>>>> unclosed staging repo. I was planning to put doxia and doxia-sitetools
>>>>> in the same staging repo.
>>>>>
>>>>> Any hints?
>>>>>
>>>>>
>>>>> [1] http://svn.apache.org/viewvc?rev=1033377&view=rev
>>>>> [2] http://jira.codehaus.org/browse/DOXIASITETOOLS-37
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
>>>> For additional commands, e-mail: dev-h...@maven.apache.org
>>>>
>>>>
>>>
>>>
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> For additional commands, e-mail: dev-h...@maven.apache.org
> 
> 


-- 
Dennis Lundberg

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to