tika-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Baumann (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TIKA-2241) DumpTikaConfigExample generates strange tika-config.xml
Date Tue, 17 Jan 2017 15:35:26 GMT

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

Andreas Baumann commented on TIKA-2241:
---------------------------------------

Commenting out the PDF converter:

{code|xml}
    <parser class="org.apache.tika.parser.pdf.PDFParser">
      <mime-exclude>application/pdf</mime-exclude>
    </parser>
{code}

Converting a PDF document.

Then I get:

{code:none}
...
     at org.apache.tika.parser.journal.GrobidRESTParser.parse(GrobidRESTParser.java:77)
        at org.apache.tika.parser.journal.JournalParser.parse(JournalParser.java:60)
        at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
        at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
        at org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:120)
        at com.eurospider.conversion.filter.test.ConversionTest.setUp(ConversionTest.java:66)
        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:498)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
        at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
        at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
        at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
        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:498)
        at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
        at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
        at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
        at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Caused by: javax.ws.rs.ProcessingException: No message body writer has been found for class
org.apache.cxf.jaxrs.ext.multipart.MultipartBody, ContentType: multipart/form-data
        at org.apache.cxf.jaxrs.client.AbstractClient.reportMessageHandlerProblem(AbstractClient.java:740)
        at org.apache.cxf.jaxrs.client.AbstractClient.writeBody(AbstractClient.java:469)
        at org.apache.cxf.jaxrs.client.WebClient$BodyWriter.doWriteBody(WebClient.java:1215)
..
{code}

The GrobidRESTParser is not configured in tika-config.xml, so why does it get executed then?


>  DumpTikaConfigExample generates strange tika-config.xml
> --------------------------------------------------------
>
>                 Key: TIKA-2241
>                 URL: https://issues.apache.org/jira/browse/TIKA-2241
>             Project: Tika
>          Issue Type: Bug
>          Components: example
>    Affects Versions: 1.14
>         Environment: Apache Maven 3.2.5 
> Java version: 1.8.0_112, vendor: Oracle Corporation
> Archlinux:
> OS name: "linux", version: "4.8.11-1-arch", arch: "amd64", family: "unix"
>            Reporter: Andreas Baumann
>            Priority: Trivial
>
> {code:none|borderStyle=solid}
> mvn exec:java -Dexec.mainClass="org.apache.tika.example.DumpTikaConfigExample"  -Dexec.arguments="--dump-static"
> {code}
> Tika 1.8 used to produce something like:
> {code:xml|borderStyle=solid}
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <properties>
>   <!--for example: <mimeTypeRepository resource="/org/apache/tika/mime/tika-mimetypes.xml"/>-->
>   <!--for example: <translator class="org.apache.tika.language.translate.GoogleTranslator"/>-->
>   <detectors>
>     <detector class="org.gagravarr.tika.OggDetector"/>
>     <detector class="org.apache.tika.parser.microsoft.POIFSContainerDetector"/>
>     <detector class="org.apache.tika.parser.pkg.ZipContainerDetector"/>
>     <detector class="org.apache.tika.mime.MimeTypes"/>
>   </detectors>
>   <parsers>
>     <parser class="org.apache.tika.parser.asm.ClassParser">
>       <mime>application/java-vm</mime>
>     </parser>
>     <parser class="org.apache.tika.parser.audio.AudioParser">
>       <mime>audio/basic</mime>
>       <mime>audio/x-aiff</mime>
>       <mime>audio/x-wav</mime>
> ...
> {code}
> With Tika 1.14 I get:
> {code:xml|borderStyle=solid}
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <properties>
>   <!--for example: <mimeTypeRepository resource="/org/apache/tika/mime/tika-mimetypes.xml"/>-->
>   <service-loader dynamic="true" loadErrorHandler="IGNORE"/>
>   <!--No translators available-->
>   <detectors>
>     <detector class="org.apache.tika.parser.microsoft.POIFSContainerDetector"/>
>     <detector class="org.apache.tika.parser.microsoft.POIFSContainerDetector"/>
>     <detector class="org.apache.tika.parser.pkg.ZipContainerDetector"/>
>     <detector class="org.apache.tika.parser.pkg.ZipContainerDetector"/>
>     <detector class="org.gagravarr.tika.OggDetector"/>
>     <detector class="org.gagravarr.tika.OggDetector"/>
>     <detector class="org.apache.tika.mime.MimeTypes"/>
>   </detectors>
>   <parsers>
>     <parser class="org.apache.tika.parser.apple.AppleSingleFileParser"/>
>     <parser class="org.apache.tika.parser.apple.AppleSingleFileParser"/>
>     <parser class="org.apache.tika.parser.asm.ClassParser"/>
>     <parser class="org.apache.tika.parser.asm.ClassParser"/>
>     <parser class="org.apache.tika.parser.audio.AudioParser"/>
>     <parser class="org.apache.tika.parser.audio.AudioParser"/>
> ...
> {code}
> The following problems IMHO:
> - Why are all classes in double?
> - As I understood the order of the parsers matters: earliler ones
>   take precendence over later ones?
> - Matching MIME-types are missing completely?



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

Mime
View raw message