You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Dave Madole <dm...@iodalliance.com> on 2008/09/23 02:34:46 UTC

Unable to construct record instance: compressByte in continue records must be 1 while reading unicode LE string

Hi,

Okay, thanks for the sheetname fix to XLS2CSV! With latest build works
great!

Now I've got two sets of problems.  One involves the FilePass and
WriteAccess records, but I think I can figure that out--or not.  In
any case, I assume I'm on my own.

The other is a bit more intractable.  The worksheet I am using has
three "Text Object" graphics in the first sheet.  They are graphics with
text in them. *Something* in HSSF is extracting the text.  It appears that
after the first such graphic has been parsed, and as the second is about to
be--quite likely the "TextObject" it is parsing is a very long one--I get
the message in the subject as below, then finally the exception in the
subject (I've included some toString() prints). :

STDOUT:

[... LOTS OF STUFF BEFORE WE GET HERE]

org.apache.poi.hssf.record.DrawingRecord@4998a455[OBJ]
SUBRECORD: [ftCmo]
    .objectType           = 0x0006 (6 )
    .objectId             = 0x1813 (6163 )
    .option               = 0x6011 (24593 )
         .locked                   = true
         .printable                = true
         .autofill                 = true
         .autoline                 = true
    .reserved1            = 0x1E7D3D78 (511524216 )
    .reserved2            = 0x1E8E3CD8 (512638168 )
    .reserved3            = 0x00000000 (0 )
[/ftCmo]
SUBRECORD: [ftEnd]
[/ftEnd]
[/OBJ]
org.apache.poi.hssf.record.DrawingRecord@4e99353f[TXO]
    .options              = 0x0212 (530 )
         .reserved1                = false
         .HorizontalTextAlignment     = 1
         .VerticalTextAlignment     = 1
         .reserved2                = 0
         .textLocked               = true
         .reserved3                = 0
    .textOrientation      = 0x0000 (0 )
    .reserved4            = 0x0000 (0 )
    .reserved5            = 0x0000 (0 )
    .reserved6            = 0x0000 (0 )
    .textLength           = 0x03AF (943 )
    .reserved7            = 0x00000000 (0 )
    .string =              Cover Art Specifications

// This is the text extracted from the "TextObject"
[snip, snip] 12 lines of text from "TextObject" deleted here
// end of text extracted from the drawing record

    .textrun = 19
    .textrun = 20
    .textrun = 20
    .textrun = 17
    .textrun = 17
    .textrun = 19
    .textrun = 17
    .textrun = 19
    .textrun = 17
    .textrun = 19
    .textrun = 17
    .textrun = 17
    .textrun = 17
    .textrun = 17
    .textrun = 17
    .textrun = 17
    .textrun = 17
    .textrun = 17
[/TXO]
org.apache.poi.hssf.record.DrawingRecord@2c76e369org.apache.poi.hssf.record.
DrawingRecord@2c76e369

[That was the last thing printed to STDOUT]

STDERR:

 org.apache.poi.hssf.record.DrawingRecord@2c76e369org.apache.poi.hssf.record
.DrawingRecord@2c76e369Exception in thread "main"
org.apache.poi.hssf.record.RecordFormatException: Unable to construct record
instance   
        at 
org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java:18)
        at 
org.apache.poi.hssf.eventusermodel.HSSFRecordStream.getNextRecord(HSSFRecord
Stream.java:162)
        at 
org.apache.poi.hssf.eventusermodel.HSSFRecordStream.nextRecord(HSSFRecordStr
eam.java:93)
        at 
org.apache.poi.hssf.eventusermodel.HSSFEventFactory.genericProcessEvents(HSS
FEventFactory.java:141)
        at 
org.apache.poi.hssf.eventusermodel.HSSFEventFactory.processEvents(HSSFEventF
actory.java:98)
        at 
org.apache.poi.hssf.eventusermodel.HSSFEventFactory.processWorkbookEvents(HS
SFEventFactory.java:63)
        at XLS2CSVmra.process(XLS2CSVmra.java:129)
        at XLS2CSVmra.main(XLS2CSVmra.java:332)
Caused by: java.lang.IllegalArgumentException: compressByte in continue
records must be 1 while reading unicode LE string
        at 
org.apache.poi.hssf.record.RecordInputStream.readUnicodeLEString(RecordInput
Stream.java:258)
        at 
org.apache.poi.hssf.record.TextObjectRecord.processRawString(TextObjectRecor
d.java:194)
        at 
org.apache.poi.hssf.record.TextObjectRecord.fillFields(TextObjectRecord.java
:49)
        at org.apache.poi.hssf.record.Record.<init>(Record.java:51)
        at 
org.apache.poi.hssf.record.TextObjectBaseRecord.<init>(TextObjectBaseRecord.
java:80)
        at 
org.apache.poi.hssf.record.TextObjectRecord.<init>(TextObjectRecord.java:37)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
        at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcces
sorImpl.java:39)
        at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc
torAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at 
org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java:184
)
        ... 7 more
                   



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Re: Unable to construct record instance: compressByte in continue records must be 1 while reading unicode LE string

Posted by Dave Madole <dm...@iodalliance.com>.
Done.  #45866.

D.


On 9/23/08 3:06 AM, "Nick Burch" <ni...@torchbox.com> wrote:

> On Mon, 22 Sep 2008, Dave Madole wrote:
>> The other is a bit more intractable.  The worksheet I am using has three
>> "Text Object" graphics in the first sheet.  They are graphics with text
>> in them. *Something* in HSSF is extracting the text.  It appears that
>> after the first such graphic has been parsed, and as the second is about
>> to be--quite likely the "TextObject" it is parsing is a very long one--I
>> get the message in the subject as below, then finally the exception in
>> the subject (I've included some toString() prints). :
> 
> Does this file work if you use the hssf usermodel code on it?
> 
> It looks like your file has a record + continue record, with unicode text
> in one half and non unicode in the other, which poi doesn't like. Any
> chance you could upload the file to a new bugzilla entry, so we can take a
> look at what's up with it?
> 
> Nick
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Re: Unable to construct record instance: compressByte in continue records must be 1 while reading unicode LE string

Posted by Nick Burch <ni...@torchbox.com>.
On Mon, 22 Sep 2008, Dave Madole wrote:
> The other is a bit more intractable.  The worksheet I am using has three 
> "Text Object" graphics in the first sheet.  They are graphics with text 
> in them. *Something* in HSSF is extracting the text.  It appears that 
> after the first such graphic has been parsed, and as the second is about 
> to be--quite likely the "TextObject" it is parsing is a very long one--I 
> get the message in the subject as below, then finally the exception in 
> the subject (I've included some toString() prints). :

Does this file work if you use the hssf usermodel code on it?

It looks like your file has a record + continue record, with unicode text 
in one half and non unicode in the other, which poi doesn't like. Any 
chance you could upload the file to a new bugzilla entry, so we can take a 
look at what's up with it?

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org