You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Vi...@ubsw.com on 2003/05/12 22:30:12 UTC

Concurrency Issue

Hi Guys,

I am having problem reading more than one file Excel files concurrently.
Reading individual files seem to be fine.

The exception I get is as follows:

java.lang.reflect.InvocationTargetException: java.lang.ArrayIndexOutOfBoundsException
	at org.apache.poi.util.LittleEndian.getNumber(LittleEndian.java:557)
	at org.apache.poi.util.LittleEndian.getInt(LittleEndian.java:177)
	at org.apache.poi.hssf.record.DimensionsRecord.fillFields(DimensionsRecord.java:121)
	at org.apache.poi.hssf.record.Record.fillFields(Record.java:143)
	at org.apache.poi.hssf.record.Record.<init>(Record.java:105)
	at org.apache.poi.hssf.record.DimensionsRecord.<init>(DimensionsRecord.java:94)
	at java.lang.reflect.Constructor.newInstance(Native Method)
	at org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java:254)
	at org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:192)
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:191)
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:158)
	


Your help is highly appreciated.

Best Regards,
Vilay

Visit our website at http://www.ubswarburg.com

This message contains confidential information and is intended only 
for the individual named.  If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail.  Please 
notify the sender immediately by e-mail if you have received this 
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses.  The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of e-mail transmission.  If 
verification is required please request a hard-copy version.  This 
message is provided for informational purposes and should not be 
construed as a solicitation or offer to buy or sell any securities or 
related financial instruments.


Re: Concurrency Issue

Posted by Avik Sengupta <av...@apache.org>.
you cannot use a single HSSFWorkbook object from more than one thread.
you will need to synchronise access to that object. Of course, you can
use different HSSFWorkbook objects in different threads concurrently. 



On Tue, 2003-05-13 at 02:00, Vilay.Wadhwa@ubsw.com wrote:
> Hi Guys,
> 
> I am having problem reading more than one file Excel files concurrently.
> Reading individual files seem to be fine.
> 
> The exception I get is as follows:
> 
> java.lang.reflect.InvocationTargetException: java.lang.ArrayIndexOutOfBoundsException
> 	at org.apache.poi.util.LittleEndian.getNumber(LittleEndian.java:557)
> 	at org.apache.poi.util.LittleEndian.getInt(LittleEndian.java:177)
> 	at org.apache.poi.hssf.record.DimensionsRecord.fillFields(DimensionsRecord.java:121)
> 	at org.apache.poi.hssf.record.Record.fillFields(Record.java:143)
> 	at org.apache.poi.hssf.record.Record.<init>(Record.java:105)
> 	at org.apache.poi.hssf.record.DimensionsRecord.<init>(DimensionsRecord.java:94)
> 	at java.lang.reflect.Constructor.newInstance(Native Method)
> 	at org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java:254)
> 	at org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:192)
> 	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:191)
> 	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:158)
> 	
> 
> 
> Your help is highly appreciated.
> 
> Best Regards,
> Vilay
> 
> Visit our website at http://www.ubswarburg.com
> 
> This message contains confidential information and is intended only 
> for the individual named.  If you are not the named addressee you 
> should not disseminate, distribute or copy this e-mail.  Please 
> notify the sender immediately by e-mail if you have received this 
> e-mail by mistake and delete this e-mail from your system.
> 
> E-mail transmission cannot be guaranteed to be secure or error-free 
> as information could be intercepted, corrupted, lost, destroyed, 
> arrive late or incomplete, or contain viruses.  The sender therefore 
> does not accept liability for any errors or omissions in the contents 
> of this message which arise as a result of e-mail transmission.  If 
> verification is required please request a hard-copy version.  This 
> message is provided for informational purposes and should not be 
> construed as a solicitation or offer to buy or sell any securities or 
> related financial instruments.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: poi-user-help@jakarta.apache.org
>