You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2012/05/18 21:04:37 UTC
[Bug 53264] New: unable to create record instance..Not enough data
(0) to read requested (6) bytes
https://issues.apache.org/bugzilla/show_bug.cgi?id=53264
Priority: P2
Bug ID: 53264
Assignee: dev@poi.apache.org
Summary: unable to create record instance..Not enough data (0)
to read requested (6) bytes
Severity: major
Classification: Unclassified
OS: Windows XP
Reporter: csekhar406@gmail.com
Hardware: PC
Status: NEW
Version: 3.8
Component: HSSF
Product: POI
I am using Poi latest final 3.8 version to fix this issue.but still i am
getting the fallowing exception.
org.apache.poi.hssf.record.RecordFormatException: Unable to construct record
instance
at
org.apache.poi.hssf.record.RecordFactory$ReflectionRecordCreator.create(RecordFactory.java:64)
at
org.apache.poi.hssf.record.RecordFactory.createSingleRecord(RecordFactory.java:263)
at
org.apache.poi.hssf.record.RecordFactoryInputStream.readNextRecord(RecordFactoryInputStream.java:270)
at
org.apache.poi.hssf.record.RecordFactoryInputStream.nextRecord(RecordFactoryInputStream.java:236)
at
org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:377)
at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:275)
at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:200)
at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:316)
at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:297)
at
com.alstom.hpr.manager.excel.impl.type.XlsImport.importFile(XlsImport.java:40)
at
com.alstom.hpr.manager.excel.impl.BaseExcelManagement.importFile(BaseExcelManagement.java:89)
at
com.alstom.hpr.struts.imports.ImportFinUnitDataAction.importFile(ImportFinUnitDataAction.java:190)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
at
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at com.alstom.fwk.servlet.StrutsServlet.service(StrutsServlet.java:95)
at
com.alstom.hpr.servlet.HprStrutsServlet.service(HprStrutsServlet.java:98)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
com.alstom.fwk.servlet.filter.SimConnectionFilter.doFilter(SimConnectionFilter.java:47)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
com.alstom.fwk.servlet.filter.LoggerFilter.doFilter(LoggerFilter.java:71)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
com.alstom.fwk.servlet.filter.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:121)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.apache.poi.hssf.record.RecordFormatException: Not enough data
(0) to read requested (6) bytes
at
org.apache.poi.hssf.record.RecordInputStream.checkRecordPosition(RecordInputStream.java:215)
at
org.apache.poi.hssf.record.RecordInputStream.readFully(RecordInputStream.java:278)
at
org.apache.poi.hssf.record.RecordInputStream.readFully(RecordInputStream.java:274)
at
org.apache.poi.hssf.record.chart.ChartEndBlockRecord.<init>(ChartEndBlockRecord.java:44)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at
org.apache.poi.hssf.record.RecordFactory$ReflectionRecordCreator.create(RecordFactory.java:56)
... 46 more
Code i have written is
i am getting the inputstream from the FormFile of struts request
HSSFWorkbook wb = new HSSFWorkbook(is);
i'd appreciate developer's comments on whether this is indeed a bug and not
some rudeness on the part of my own code,please
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 53264] unable to create record instance..Not enough data (0) to
read requested (6) bytes
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53264
--- Comment #4 from csekhar406@gmail.com ---
Created attachment 28902
--> https://issues.apache.org/bugzilla/attachment.cgi?id=28902&action=edit
the Sample file causing the problem
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 53264] unable to create record instance..Not enough data (0) to
read requested (6) bytes
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53264
--- Comment #3 from Yegor Kozlov <ye...@dinom.ru> ---
Can you zip the file?
(In reply to comment #2)
> The file you are trying to attach is 4922 kilobytes (KB) in size.
> Attachments cannot be more than 1000 KB.
> We recommend that you store your attachment elsewhere and then paste the URL
> to this file on the attachment creation page in the appropriate text field.
> Alternately, if your attachment is an image, you could convert it to a
> compressible format like JPG or PNG and try again.
>
>
> I am getting the following when i am trying to add the file to bugzila.Can
> you provide any mail id so that i can send the attachment to the mail.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
Re: [Bug 53264] unable to create record instance..Not enough data (0)
to read requested (6) bytes
Posted by Yegor Kozlov <ye...@dinom.ru>.
Please try the latest build from trunk. The link to daily builds is on
the POI web site.
I confirmed that POI can read the file attached to Bug 53264 without problems.
Yegor
On Thu, Sep 6, 2012 at 6:59 PM, sekhar <cs...@gmail.com> wrote:
> Hi
>
> I have tried in many ways like deleting records but i am not able to find
> the exact record which is creating problem.
>
> Could you please suggest any other way to find the solution?
>
> Thank You.
>
>
>
>
>
> --
> View this message in context: http://apache-poi.1045710.n5.nabble.com/Bug-53264-New-unable-to-create-record-instance-Not-enough-data-0-to-read-requested-6-bytes-tp5709810p5710865.html
> Sent from the POI - Dev mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
> For additional commands, e-mail: dev-help@poi.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
Re: [Bug 53264] unable to create record instance..Not enough data
(0) to read requested (6) bytes
Posted by sekhar <cs...@gmail.com>.
Hi
I have tried in many ways like deleting records but i am not able to find
the exact record which is creating problem.
Could you please suggest any other way to find the solution?
Thank You.
--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Bug-53264-New-unable-to-create-record-instance-Not-enough-data-0-to-read-requested-6-bytes-tp5709810p5710865.html
Sent from the POI - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 53264] unable to create record instance..Not enough data (0) to
read requested (6) bytes
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53264
--- Comment #6 from Nick Burch <ni...@alfresco.com> ---
We know from the stacktrace that the problem is probably with the
ChartEndBlockRecord, but there's a tiny chance it might be a problem with the
record before that
If you can, please try to (probably using a debugger) work out what the data is
that's associated with the problematic record. Then, compare that with the
Microsoft provided file format specification. Does the length match what the
spec allows? Are there options in the record which cause variable length? If
so, does POI handle them?
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 53264] unable to create record instance..Not enough data (0) to
read requested (6) bytes
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53264
--- Comment #2 from csekhar406@gmail.com ---
The file you are trying to attach is 4922 kilobytes (KB) in size. Attachments
cannot be more than 1000 KB.
We recommend that you store your attachment elsewhere and then paste the URL to
this file on the attachment creation page in the appropriate text field.
Alternately, if your attachment is an image, you could convert it to a
compressible format like JPG or PNG and try again.
I am getting the following when i am trying to add the file to bugzila.Can you
provide any mail id so that i can send the attachment to the mail.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
Re: [Bug 53264] unable to create record instance..Not enough data (0)
to read requested (6) bytes
Posted by Yegor Kozlov <ye...@dinom.ru>.
The file is not available. Please attach it to the Bugzilla ticket.
On Wed, Jun 6, 2012 at 11:35 AM, sekhar <cs...@gmail.com> wrote:
> Hi
>
> I attached the file in the second reply. please find the attached sample
> file.
>
> http://apache-poi.1045710.n5.nabble.com/file/n5710045/HPR_La_MuelaII_unit_4326_Q1_2012-13.xls
> HPR_La_MuelaII_unit_4326_Q1_2012-13.xls
>
>
> Thank you
>
>
>
>
> --
> View this message in context: http://apache-poi.1045710.n5.nabble.com/Bug-53264-New-unable-to-create-record-instance-Not-enough-data-0-to-read-requested-6-bytes-tp5709810p5710045.html
> Sent from the POI - Dev mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
> For additional commands, e-mail: dev-help@poi.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
Re: [Bug 53264] unable to create record instance..Not enough data
(0) to read requested (6) bytes
Posted by sekhar <cs...@gmail.com>.
Hi
I attached the file in the second reply. please find the attached sample
file.
http://apache-poi.1045710.n5.nabble.com/file/n5710045/HPR_La_MuelaII_unit_4326_Q1_2012-13.xls
HPR_La_MuelaII_unit_4326_Q1_2012-13.xls
Thank you
--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Bug-53264-New-unable-to-create-record-instance-Not-enough-data-0-to-read-requested-6-bytes-tp5709810p5710045.html
Sent from the POI - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
Re: [Bug 53264] unable to create record instance..Not enough data (0)
to read requested (6) bytes
Posted by Yegor Kozlov <ye...@dinom.ru>.
We need a sample file to reproduce the problem. See Nick's answer in Bugzilla.
Without a sample file we can't do much.
Yegor
On Tue, Jun 5, 2012 at 9:07 AM, sekhar <cs...@gmail.com> wrote:
> Hi, Could you let me know is there any thing to be updated in the code
> regarding this.
>
> or this has to be fix in POI itself.
>
> Please let me know.
>
>
> Thank You
>
> --
> View this message in context: http://apache-poi.1045710.n5.nabble.com/Bug-53264-New-unable-to-create-record-instance-Not-enough-data-0-to-read-requested-6-bytes-tp5709810p5710038.html
> Sent from the POI - Dev mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
> For additional commands, e-mail: dev-help@poi.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
Re: [Bug 53264] unable to create record instance..Not enough data
(0) to read requested (6) bytes
Posted by sekhar <cs...@gmail.com>.
Hi, Could you let me know is there any thing to be updated in the code
regarding this.
or this has to be fix in POI itself.
Please let me know.
Thank You
--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Bug-53264-New-unable-to-create-record-instance-Not-enough-data-0-to-read-requested-6-bytes-tp5709810p5710038.html
Sent from the POI - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
Re: [Bug 53264] unable to create record instance..Not enough data
(0) to read requested (6) bytes
Posted by sekhar <cs...@gmail.com>.
http://apache-poi.1045710.n5.nabble.com/file/n5710007/HPR_La_MuelaII_unit_4326_Q1_2012-13.xls
HPR_La_MuelaII_unit_4326_Q1_2012-13.xls
Hi ..Here is the problem causing file.
Thank You
--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Bug-53264-New-unable-to-create-record-instance-Not-enough-data-0-to-read-requested-6-bytes-tp5709810p5710007.html
Sent from the POI - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 53264] unable to create record instance..Not enough data (0) to
read requested (6) bytes
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53264
Nick Burch <ni...@alfresco.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--- Comment #1 from Nick Burch <ni...@alfresco.com> ---
Without either the file or some investigations by yourself, we've not enough to
go on...
If you can't share the file, please identify the offending record and post the
raw bytes of it. If possible, please then also compare the POI parsing of it to
what the spec details, and try to identify the reason why POI is expecting more
data than is present (it might be that a field is actually optional for
example)
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 53264] unable to create record instance..Not enough data (0) to
read requested (6) bytes
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53264
--- Comment #5 from csekhar406@gmail.com ---
Hi,
Could you please let me know if any information needed from my end to fix this
issue?
Waiting for your Reply.
Thank You,
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org