Error Reading Content Of Excel Document Invalid Header Signature
file attachment. WARN [Indexer: 1] [bonnie.search.extractor.BaseAttachmentContentExtractor] addFields Error indexing attachment (Attachment: meta_mailinfo_sec01.csv v.1 (59509056) g6922) com.atlassian.bonnie.search.extractor.ExtractorException: Error reading content of Excel document: Invalid header signature; read 0x6D453B74726F6853, expected 0xE11AB1A1E011CFD0 at com.atlassian.confluence.extra.officeconnector.index.excel.ExcelTextExtractor.extractText(ExcelTextExtractor.java:103) at com.atlassian.bonnie.search.extractor.BaseAttachmentContentExtractor.addFields(BaseAttachmentContentExtractor.java:40) ... Cause In Confluence versions before 3.5.11, when a user uploaded a csv file, it was marked as having Content-Type application/vnd.ms-excel, so the ExcelTextExtractor is used to index it. Since it's not a Excel file, ExcelTextExtractor cannot index it and will log an warning message. This issue has been fixed in Confluence since version 3.5.11 so when user uploads new CSV files, those warning messages will not appear any longer. But for those old CSV files which still have the incorrect Content-type, when Confluence performs a re-index those warning messages still occur. Resolution Atlassian Support Offerings The following approaches that involves SQL queries are beyond Atlassian Support Offerings. Please note that Atlassian does not support direct database INSERT, UPDATE or DELETE queries, as they can easily lead to data integrity problems. Atlassian will not be held liable for any errors or other unexpected events resulting from the use of the following SQL queries. Backup your Database Alwaysbackup your databefore performing any modifications to the database. Use the SQL script below (may need slight adjustment depending on the syntax of your DBMS) to correct the Content-Type of old csv files UPDATE CONTENTPROPERTIES SET STRINGVAL = 'text/csv' WHERE PROPERTYNAME = 'MEDIA_TYPE' AND PROPERTYID IN ( SELECT P
documentLog In ExportXMLWordPrintableDetails Type: Bug Status: Resolved Priority: Low Resolution: Fixed Affects Version/s: 3.0 Fix Version/s: 3.5.11 Component/s: None Labels: editor Description This problem occurs due to the browser sending the https://confluence.atlassian.com/confkb/com-atlassian-bonnie-search-extractor-extractorexception-error-reading-content-of-excel-document-486146072.html wrong MIME type during a file upload. It appears that Windows boxes where MS Excel handles CSV files uploads CSV files with the "application/vnd.ms-excel" MIME type. It https://jira.atlassian.com/browse/CONF-18733 can cause the search index to be only partially built, resulting in missing pages in search results. Sample logs: 2010-02-22 11:09:56,038 WARN [Indexer: 2] [bonnie.search.extractor.BaseAttachmentContentExtractor] addFields Error indexing attachment (Attachment: textures- streaming.csv v.1 (3014859) kteich) -- url: /confluence/admin/reindex.action | userName: moise | referer: https://qix.demiurgestudios.com/confluence/admin/search-indexes.action | action: reind ex com.atlassian.bonnie.search.extractor.ExtractorException: Error reading content of Excel document: Invalid header signature; read 8236850760414359372, expect ed -2226271756974174256 at com.atlassian.bonnie.search.extractor.MsExcelContentExtractor.extractText(MsExcelContentExtractor.java:101) at com.atlassian.bonnie.search.extractor.BaseAttachmentContentExtractor.addFields(BaseAttachmentContentExtractor.java:39) at com.atlassian.confluence.plugin.descriptor.ExtractorModuleDescriptor$BackwardsCompatibleExtractor.addFields(ExtractorModuleDescriptor.java:43) at com.atlassian.bonnie.search.BaseDocumentBuilder.getDocument(BaseDocumentBuilder.java:104) at com.atlassian.confluence.search.lucene.ConfluenceDocumentBuilder.getDocument(ConfluenceDocumentBuilder.java:102) at com.atlassian.confluence.search.lucene.tasks.AddDocumentIndexTask.perform(AddDocumentIndexTask.java:41) at com.atlassian.bonnie.index.TempIndexWriter.perform(TempIndexWriter.java:72) at com.atlassian.confluence.search.lucene.TempIndexWriterStrategy.perform(TempIndexWriterStrategy.java:43) at com.atlassian.confluence.search.lucene.tasks.TempIndexBackedIndexTaskPerformer.perform(TempIndexBackedIndexTaskPerformer.java:
help others com.atlassian.bonnie.search.extractor.ExtractorException: Error reading content of Excel document: Invalid header signature; read 8236850760414359372, expect ed -2226271756974174256 Atlassian JIRA | error reading Andrew Moise | 7 years ago 0 mark This problem occurs due to the browser sending the wrong MIME type during a file upload. It appears that Windows boxes where MS Excel error reading content handles CSV files uploads CSV files with the "application/vnd.ms-excel" MIME type. It can cause the search index to be only partially built, resulting in missing pages in search results. Sample logs: {noformat} 2010-02-22 11:09:56,038 WARN [Indexer: 2] [bonnie.search.extractor.BaseAttachmentContentExtractor] addFields Error indexing attachment (Attachment: textures- streaming.csv v.1 (3014859) kteich) -- url: /confluence/admin/reindex.action | userName: moise | referer: https://qix.demiurgestudios.com/confluence/admin/search-indexes.action | action: reind ex com.atlassian.bonnie.search.extractor.ExtractorException: Error reading content of Excel document: Invalid header signature; read 8236850760414359372, expect ed -2226271756974174256 at com.atlassian.bonnie.search.extractor.MsExcelContentExtractor.extractText(MsExcelContentExtractor.java:101) at com.atlassian.bonnie.search.extractor.BaseAttachmentContentExtractor.addFields(BaseAttachmentContentExtractor.java:39) at com.atlassian.confluence.plugin.descriptor.ExtractorModuleDescriptor$BackwardsCompatibleExtractor.addFields(ExtractorModuleDescriptor.java:43) at com.atlassian.bonnie.search.BaseDocumentBuilder.getDocument(BaseDocumentBuilder.java:104) at com.atlassian.confluence.search.lucene.ConfluenceDocumentBuilder.getDocument(ConfluenceDocumentBuilder.java:102) at com.atlassian.confluence.search.lucene.tasks.AddDocumentIndexTask.perform(AddDocumentIndexTask.java:41) at com.atlassian.bonnie.index.TempIndexWriter.perform(TempIndexWriter.java:72) at com.atlassian.confluence.search.lucene.TempIndexWriterStrategy.perform(TempIndexWriterStrategy.java:43) at com.atlassian.confluence.search.lucene.tas
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Invalid header reading xls file up vote 6 down vote favorite 1 I am reading one excel file on my local system. I am using POI jar Version 3.7, but getting error Invalid header signature; read -2300849302551019537 or in Hex 0xE011BDBFEFBDBFEF , expected -2226271756974174256 or in Hex 0xE11AB1A1E011CFD0. Opening the xls file with Excel works fine. The codeblock where it happens: Anybody an idea ? /** * create a new HeaderBlockReader from an InputStream * * @param stream the source InputStream * * @exception IOException on errors or bad data */ public HeaderBlockReader(InputStream stream) throws IOException { // At this point, we don't know how big our // block sizes are // So, read the first 32 bytes to check, then // read the rest of the block byte[] blockStart = new byte[32]; int bsCount = IOUtils.readFully(stream, blockStart); if(bsCount != 32) { throw alertShortRead(bsCount, 32); } // verify signature long signature = LittleEndian.getLong(blockStart, _signature_offset); if (signature != _signature) { // Is it one of the usual suspects? byte[] OOXML_FILE_HEADER = POIFSConstants.OOXML_FILE_HEADER; if(blockStart[0] == OOXML_FILE_HEADER[0] && blockStart[1] == OOXML_FILE_HEADER[1] && blockStart[2] == OOXML_FILE_HEADER[2] && blockStart[3] == OOXML_FILE_HEADER[3]) { throw new OfficeXmlFileException("The supplied data appears to be in the Office 2007+ XML. You are calling the part of POI that deals with OLE2 Office Documents. You need to call a different part of POI to process this data (eg XSSF instead of HSSF)"); } if ((signature & 0xFF8FFFFFFFFFFFFFL) == 0x0010000200040009L) { // BIFF2 raw stream starts with BOF (sid=0x0009, size=0x0004, data=0x00t0) throw new IllegalArgumentException("The supplied data appears to be in BIFF2 format. " + "POI only supports BIFF8 format"); } // Give a generic error throw new IOException("Invalid header signature; read " + longToHex(signature) + ", expected " + longToHex(_signature)); } java excel apache-poi xls share|improve this question edited Dec 19 '12 at 11:25 asked Dec 19 '12 at 10:01 dutchman79 1802212 1 You are t