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

Peter Ansell commented on ANY23-251:
------------------------------------

I had to update that file in the past. The Any23 components should be in a 
single section of the file and should require minimal modifications to copy and 
paste into the new Tika-1.7 version of that file.

Not sure about the Atom part though, that looks like it will need specific 
investigation.

> Investigate contents of /org/apache/any23/mime/mimetypes.xml
> ------------------------------------------------------------
>
>                 Key: ANY23-251
>                 URL: https://issues.apache.org/jira/browse/ANY23-251
>             Project: Apache Any23
>          Issue Type: Bug
>          Components: mime
>    Affects Versions: 1.1
>            Reporter: Lewis John McGibbney
>             Fix For: 1.2
>
>
> Whilst addressing ANY23-250 I thought about updating the 
> [mimetypes.xml|https://github.com/apache/any23/blob/master/mime/src/main/resources/org/apache/any23/mime/mimetypes.xml]
>  we maintain.
> Upon updating everything under the semantic web mimetypes we add within Any23 
> e.g. [miscellaneous 
> mimetypes|https://github.com/apache/any23/blob/master/mime/src/main/resources/org/apache/any23/mime/mimetypes.xml#L85]
>  with the up-to-date [Tika master 
> manifestations|https://github.com/apache/tika/blob/trunk/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml]
>  I get the following errors and a failed build then invoking mvn test
> {code}
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> Running org.apache.any23.mime.purifier.WhiteSpacesPurifierTest
> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.056 sec - 
> in org.apache.any23.mime.purifier.WhiteSpacesPurifierTest
> Running org.apache.any23.mime.TikaMIMETypeDetectorTest
> [2015-02-27 10:37:00,570] WARN     0[main] - 
> info.aduna.lang.service.ServiceRegistry.<init>(ServiceRegistry.java:57) - New 
> service class org.openrdf.rio.nquads.NQuadsParserFactory replaces existing 
> service class org.apache.any23.io.nquads.NQuadsParserFactory
>   Tests run: 42, Failures: 4, Errors: 0, Skipped: 0, Time elapsed: 1.03 sec 
> <<< FAILURE! - in org.apache.any23.mime.TikaMIMETypeDetectorTest
> testDetectAtomByContent(org.apache.any23.mime.TikaMIMETypeDetectorTest)  Time 
> elapsed: 0.01 sec  <<< FAILURE!
> org.junit.ComparisonFailure: Error in mimetype detection for file 
> /application/atom/atom.xml expected:<application/[atom+xml]> but 
> was:<application/[octet-stream]>
>       at org.junit.Assert.assertEquals(Assert.java:115)
>       at 
> org.apache.any23.mime.TikaMIMETypeDetectorTest.detectMIMEtypeByContent(TikaMIMETypeDetectorTest.java:422)
>       at 
> org.apache.any23.mime.TikaMIMETypeDetectorTest.testDetectAtomByContent(TikaMIMETypeDetectorTest.java:176)
> testDetectWSDLByContent(org.apache.any23.mime.TikaMIMETypeDetectorTest)  Time 
> elapsed: 0.004 sec  <<< FAILURE!
> org.junit.ComparisonFailure: Error in mimetype detection for file 
> /application/wsdl/test1 expected:<application/[x-wsdl]> but 
> was:<application/[octet-stream]>
>       at org.junit.Assert.assertEquals(Assert.java:115)
>       at 
> org.apache.any23.mime.TikaMIMETypeDetectorTest.detectMIMEtypeByContent(TikaMIMETypeDetectorTest.java:422)
>       at 
> org.apache.any23.mime.TikaMIMETypeDetectorTest.testDetectWSDLByContent(TikaMIMETypeDetectorTest.java:212)
> testWSDLByContentAndName(org.apache.any23.mime.TikaMIMETypeDetectorTest)  
> Time elapsed: 0.003 sec  <<< FAILURE!
> org.junit.ComparisonFailure: Error while detecting mimetype in file 
> /application/wsdl/test1 expected:<application/[x-wsdl]> but 
> was:<application/[octet-stream]>
>       at org.junit.Assert.assertEquals(Assert.java:115)
>       at 
> org.apache.any23.mime.TikaMIMETypeDetectorTest.detectMIMETypeByContentAndName(TikaMIMETypeDetectorTest.java:464)
>       at 
> org.apache.any23.mime.TikaMIMETypeDetectorTest.testWSDLByContentAndName(TikaMIMETypeDetectorTest.java:362)
> testAtomByContentAndName(org.apache.any23.mime.TikaMIMETypeDetectorTest)  
> Time elapsed: 0.002 sec  <<< FAILURE!
> org.junit.ComparisonFailure: Error while detecting mimetype in file 
> /application/atom/atom.xml expected:<application/[atom+]xml> but 
> was:<application/[]xml>
>       at org.junit.Assert.assertEquals(Assert.java:115)
>       at 
> org.apache.any23.mime.TikaMIMETypeDetectorTest.detectMIMETypeByContentAndName(TikaMIMETypeDetectorTest.java:464)
>       at 
> org.apache.any23.mime.TikaMIMETypeDetectorTest.testAtomByContentAndName(TikaMIMETypeDetectorTest.java:347)
> Results :
> Failed tests:
>   
> TikaMIMETypeDetectorTest.testDetectAtomByContent:176->detectMIMEtypeByContent:422
>  Error in mimetype detection for file /application/atom/atom.xml 
> expected:<application/[atom+xml]> but was:<application/[octet-stream]>
>   
> TikaMIMETypeDetectorTest.testDetectWSDLByContent:212->detectMIMEtypeByContent:422
>  Error in mimetype detection for file /application/wsdl/test1 
> expected:<application/[x-wsdl]> but was:<application/[octet-stream]>
>   
> TikaMIMETypeDetectorTest.testWSDLByContentAndName:362->detectMIMETypeByContentAndName:464
>  Error while detecting mimetype in file /application/wsdl/test1 
> expected:<application/[x-wsdl]> but was:<application/[octet-stream]>
>   
> TikaMIMETypeDetectorTest.testAtomByContentAndName:347->detectMIMETypeByContentAndName:464
>  Error while detecting mimetype in file /application/atom/atom.xml 
> expected:<application/[atom+]xml> but was:<application/[]xml>
> Tests run: 43, Failures: 4, Errors: 0, Skipped: 0
> {code}
> It is therefore my opinion that we need to take a better look into the 
> existing contexts of the mimetypes.xml file to see if we need to edit it.



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

Reply via email to