tika-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michal Hlavac (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (TIKA-2193) java.io.NotSerializableException while using ForkParser
Date Fri, 09 Dec 2016 21:14:58 GMT

     [ https://issues.apache.org/jira/browse/TIKA-2193?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Michal Hlavac resolved TIKA-2193.
---------------------------------
       Resolution: Duplicate
    Fix Version/s: 1.15

> java.io.NotSerializableException while using ForkParser
> -------------------------------------------------------
>
>                 Key: TIKA-2193
>                 URL: https://issues.apache.org/jira/browse/TIKA-2193
>             Project: Tika
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.14
>            Reporter: Michal Hlavac
>             Fix For: 1.15
>
>
> {code}
>     @Test
>     public void testForkParserWord() throws Exception {
>         InputStream in = BundleIT.class.getResourceAsStream("/test-documents/testWORD.doc");
>         InputStream stream = new BufferedInputStream(in);
>         Writer writer = new StringWriter();
>         ContentHandler contentHandler = new BodyContentHandler(writer);
>         Metadata metadata = new Metadata();
>         MediaType type = contentTypeDetector.detect(stream, metadata);
>         assertEquals(type.toString(), "application/x-tika-msoffice");
>         metadata.add(Metadata.CONTENT_TYPE, type.toString());
>         ForkParser parser = new ForkParser(Activator.class.getClassLoader(), defaultParser);
>         parser.parse(stream, contentHandler, metadata, getParseContext());
>         writer.flush();
>         String content = writer.toString();
>         assertTrue(content.length() > 0);
>     }
> {code}
> {code}
> java.io.NotSerializableException: org.apache.tika.parser.external.ExternalParser$LineConsumer$1
> 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1183)
> 	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1547)
> 	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1508)
> 	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1431)
> 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177)
> 	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:347)
> 	at java.util.ArrayList.writeObject(ArrayList.java:742)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:606)
> 	at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:988)
> 	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1495)
> 	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1431)
> 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177)
> 	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1547)
> 	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1508)
> 	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1431)
> 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177)
> 	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:347)
> 	at java.util.ArrayList.writeObject(ArrayList.java:742)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:606)
> 	at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:988)
> 	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1495)
> 	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1431)
> 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177)
> 	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1547)
> 	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1508)
> 	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1431)
> 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177)
> 	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:347)
> 	at org.apache.tika.fork.ForkObjectInputStream.sendObject(ForkObjectInputStream.java:84)
> 	at org.apache.tika.fork.ForkClient.sendObject(ForkClient.java:151)
> 	at org.apache.tika.fork.ForkClient.<init>(ForkClient.java:76)
> 	at org.apache.tika.fork.ForkParser.acquireClient(ForkParser.java:216)
> 	at org.apache.tika.fork.ForkParser.parse(ForkParser.java:168)
> {code}



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

Mime
View raw message