Uploaded image for project: 'Apache Any23 (Retired)'
  1. Apache Any23 (Retired)
  2. ANY23-251

Investigate contents of /org/apache/any23/mime/mimetypes.xml

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.1
    • 2.8
    • mime
    • None

    Description

      Whilst addressing ANY23-250 I thought about updating the mimetypes.xml we maintain.
      Upon updating everything under the semantic web mimetypes we add within Any23 e.g. miscellaneous mimetypes with the up-to-date Tika master manifestations I get the following errors and a failed build then invoking mvn test

      -------------------------------------------------------
       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
      

      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.

      Attachments

        Activity

          People

            ansell Peter Ansell
            lewismc Lewis John McGibbney
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: