You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tika.apache.org by Mango <bg...@gmail.com> on 2010/06/23 16:58:04 UTC
error parsing visio files
I get this error when indexing files with embedded Visio diagrams:
Exception in thread "main" org.apache.tika.exception.TikaException:
Unexpected RuntimeException from
org.apache.tika.parser.rtf.RTFParser@1335b86
at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:134)
at org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:99)
at cc.TikaCC.getDocument(TikaCC.java:94)
at cc.IndexCC.indexFile(IndexCC.java:120)
at cc.IndexCC.index(IndexCC.java:70)
at cc.TikaCC.main(TikaCC.java:67)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 42
at javax.swing.text.rtf.RTFReader$AttributeTrackingDestination.handleKeyword(Unknown
Source)
at javax.swing.text.rtf.RTFReader.handleKeyword(Unknown Source)
at javax.swing.text.rtf.RTFParser.write(Unknown Source)
at javax.swing.text.rtf.RTFParser.write(Unknown Source)
at javax.swing.text.rtf.AbstractFilter.write(Unknown Source)
at javax.swing.text.rtf.AbstractFilter.readFromStream(Unknown Source)
at javax.swing.text.rtf.RTFEditorKit.read(Unknown Source)
at org.apache.tika.parser.rtf.RTFParser.parse(RTFParser.java:58)
at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:132)
I suppose it's the same problem as when parsing .vsd files directly.
Is it possible to simply disregards embedded visio diagrams and parse
only text from rtfs, docs...?
Has anyone found the solution to parsing Visio files without problems?
I know aboout the proposed patch, but I am either doing something
wrong or the patch is not working.
Any suggestions?
Re: error parsing visio files
Posted by Mango <bg...@gmail.com>.
I will try later with the new version from svn. There seems to be a
problem accessing ulisse.pin.unifi.it, i get a connection timed out
during the build.
Interesting thing is that when I open the problem file and save it
again (in .rtf again), indexing works fine even though it still
contains embedded .vsds. So, it probably is a problem with the
RTFParser after all. I will try again when I manage to run the new
build.
Is there anything I should try in the meantime? Were there documented
problems with certain .rtfs before?
On Thu, Jun 24, 2010 at 1:30 PM, Nick Burch <ni...@alfresco.com> wrote:
> On Thu, 24 Jun 2010, Mango wrote:
>>
>> From what I can tell is that thre rest of .rtf files are parsed without a
>> problem. Only those with embedded Visio diagrams create problems. Wierd
>> thing is I just tried parsing a .doc document with embedded .vsd and it was
>> parsed without a problem.
>
> One test would be to try extracting out the visio file, and see if Tika can
> parse just that?
>
>> I did try to build tika with poi 3.7 beta1, but the compilation failed
>> because of missing constructors and incompatible types, all in hsmf. I read
>> the thread where you mention some changes should be made in tika's hsmf
>> classes.
>
> Yesterday I upgraded tika to using poi 3.7 beta 1, applying the outstanding
> patches to svn to allow Tika to work nicely with 3.7 beta 1. Try doing a svn
> up and re-building.
>
> Nick
>
Re: error parsing visio files
Posted by Nick Burch <ni...@alfresco.com>.
On Thu, 24 Jun 2010, Mango wrote:
> From what I can tell is that thre rest of .rtf files are parsed without
> a problem. Only those with embedded Visio diagrams create problems.
> Wierd thing is I just tried parsing a .doc document with embedded .vsd
> and it was parsed without a problem.
One test would be to try extracting out the visio file, and see if Tika
can parse just that?
> I did try to build tika with poi 3.7 beta1, but the compilation failed
> because of missing constructors and incompatible types, all in hsmf. I
> read the thread where you mention some changes should be made in tika's
> hsmf classes.
Yesterday I upgraded tika to using poi 3.7 beta 1, applying the
outstanding patches to svn to allow Tika to work nicely with 3.7 beta 1.
Try doing a svn up and re-building.
Nick
Re: error parsing visio files
Posted by Mango <bg...@gmail.com>.
Hi, Nick. I'm not sure where exactly the problem is because I'm not
very adept in Java.
>From what I can tell is that thre rest of .rtf files are parsed
without a problem. Only those
with embedded Visio diagrams create problems. Wierd thing is I just
tried parsing a .doc
document with embedded .vsd and it was parsed without a problem.
I am still not convinced that the problem is in the RTFParser itself.
java.lang.ArrayIndexOutOfBoundsException
is supposed to be the exception returned when parsing .vsd files with
POI 3.6 (the exception was different in
previous POI version). Unfortunately, I am not allowed to send the
problem files for inspection.
I did try to build tika with poi 3.7 beta1, but the compilation failed
because of missing constructors and incompatible
types, all in hsmf. I read the thread where you mention some changes
should be made in tika's hsmf classes.
Would you tell me what to change, so I can try and test the new poi
version. Here are the error messages:
/tika_build/tika-0.7/tika-parsers/src/main/java/org/apache/tika/parser/microsoft/ExcelExtractor.java:[291,59]
incompatible types
found : org.apache.poi.hssf.record.common.UnicodeString
required: org.apache.poi.hssf.record.UnicodeString
tika_build/tika-0.7/tika-parsers/src/main/java/org/apache/tika/parser/microsoft/OutlookExtractor.java:[42,26]
cannot find symbol
symbol : constructor
POIFSChunkParser(org.apache.poi.poifs.filesystem.POIFSFileSystem)
location: class org.apache.poi.hsmf.parsers.POIFSChunkParser
tika_build/tika-0.7/tika-parsers/src/main/java/org/apache/tika/parser/microsoft/OutlookExtractor.java:[43,32]
cannot find symbol
symbol : method identifyChunks()
location: class org.apache.poi.hsmf.parsers.POIFSChunkParser
tika_build/tika-0.7/tika-parsers/src/main/java/org/apache/tika/parser/microsoft/OutlookExtractor.java:[88,25]
cannot find symbol
symbol : method getDocumentNode(org.apache.poi.hsmf.datatypes.StringChunk)
location: class org.apache.poi.hsmf.parsers.POIFSChunkParser
On Thu, Jun 24, 2010 at 11:10 AM, Nick Burch <ni...@alfresco.com> wrote:
> On Wed, 23 Jun 2010, Mango wrote:
>>
>> Caused by: java.lang.ArrayIndexOutOfBoundsException: 42
>> at
>> javax.swing.text.rtf.RTFReader$AttributeTrackingDestination.handleKeyword(Unknown
>> Source)
>
> This looks like a fault in the core java rtf parser :/
>
> Do you know how your rtf file was created?
>
>> I suppose it's the same problem as when parsing .vsd files directly.
>
> Visio files should (as of yesterday) be parsing fine - the POI related fixes
> for visio files are now being used. Have you tried from a svn checkout from
> late yesterday / today and seen if your visio files now work?
>
> Nick
>
Re: error parsing visio files
Posted by Nick Burch <ni...@alfresco.com>.
On Wed, 23 Jun 2010, Mango wrote:
> Caused by: java.lang.ArrayIndexOutOfBoundsException: 42
> at javax.swing.text.rtf.RTFReader$AttributeTrackingDestination.handleKeyword(Unknown
> Source)
This looks like a fault in the core java rtf parser :/
Do you know how your rtf file was created?
> I suppose it's the same problem as when parsing .vsd files directly.
Visio files should (as of yesterday) be parsing fine - the POI related
fixes for visio files are now being used. Have you tried from a svn
checkout from late yesterday / today and seen if your visio files now
work?
Nick