Forums > Help! > unable to create record instance ...

Login/Join to Participate

Devoloper
stranger

Member Since: 18th May 2012
Total posts: 1
Posted:Hi,

I am using Poi latest final 3.8 version to fix this issue.but still i am getting the fallowing exception.please let me kno

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


Delete Topic

Gary_Cifers
member
Location: Guthrie, Oklahoma
Member Since: 4th Jul 2008
Total posts: 64
Posted:I do believe you might have possibly thought of the wrong kind of "Poi"? I'm not sure how many of the people here are actually developers (though we all do come from many different walks of life...) But this site is full of Artists/Dancers/Spinners who use Poi/Staff/Fans/Rope Dart/etc.. Poi being the tool best described as a pair of balls on lengths of chain/rope/fabric that is spun about... Hopefully there might be someone here that may be able to help but if not i hope you find your answer in some way.

Delete

beaniebob
casually noob tech poi spinrar
Location: Sydney, NSW, Australia
Member Since: 22nd Nov 2010
Total posts: 155
Posted:maybe this site might be what you're looking for..?

http://apache-poi.1045710.n5.nabble.com/


"If all else fails, immortality can always be assured by spectacular error."

Delete