You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by Adam Czysciak <ad...@power.com.pl> on 2003/12/10 17:00:15 UTC

HSSFWorkbook concurency problem

Hello,

   I wanted to check the archive, but it looks to be unavailable. I 
wanted to contact
POI developers, but at the project web page there is a link to this 
mailing list. Therefore
I'd like to say Hello, and ask you a question. Perhaps it can be a 
bugreport:)

Did anyone had any problem with multithreaded HSSFWorkbook(InputStream 
in) constructor?
I use it to upload file to the app, click 'submit' simultanously, and 
this constructor
crashes. It seems not to be thread-safe. When I've added a static lock 
object to synchronize
on, everything seems to be ok. It happens both on version 1.5-final and 
2.0RC1.

Sorry if it is one of the most common problems here...

-- 
Greets,
   Adam Czysciak
   adam@power.com.pl


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


Re: HSSFWorkbook concurency problem

Posted by "Andrew C. Oliver" <ac...@apache.org>.
On 12/11/03 4:24 AM, "Avik Sengupta" <av...@itellix.com> wrote:

>> Well, finally it looks that you are right:)
> 
> Is this the opportunity for me to say I always am ;-)

I've created a monster! ;-)

> 
> But seriously, glad its working fine for you.
> 
> On Thu, 2003-12-11 at 14:02, Adam Czysciak wrote:
>> Hi,
>> 
>> 
>> On Dec 10, 2003, at 6:07 PM, Avik Sengupta wrote:
>> 
>>> Are you sure you are using 2.0RC1? There was a concurrency but that was
>>> fixed in 2.0pre3. Maybe you should check your classpath?  After that
>> 
>> Well, finally it looks that you are right:) I cleaned all the
>> intermediate files
>> and recompiled the project yesterday with 2.0RC1 and it wasn't
>> working...
>> Today I've deleted all intermediate files and all the occurences of
>> 1.5.1-final
>> jar, and it looks that it's working correctly now:)
>> 
>> Thanks for your answer.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: poi-dev-help@jakarta.apache.org
> 

-- 
Andrew C. Oliver
http://www.superlinksoftware.com/poi.jsp
Custom enhancements and Commercial Implementation for Jakarta POI

http://jakarta.apache.org/poi
For Java and Excel, Got POI?

The views expressed in this email are those of the author and are almost
definitely not shared by the Apache Software Foundation, its board or its
general membership.  In fact they probably most definitively disagree with
everything espoused in the above email.


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


Re: HSSFWorkbook concurency problem

Posted by Avik Sengupta <av...@itellix.com>.
>Well, finally it looks that you are right:)

Is this the opportunity for me to say I always am ;-)

But seriously, glad its working fine for you.

On Thu, 2003-12-11 at 14:02, Adam Czysciak wrote:
> Hi,
> 
> 
> On Dec 10, 2003, at 6:07 PM, Avik Sengupta wrote:
> 
> > Are you sure you are using 2.0RC1? There was a concurrency but that was
> > fixed in 2.0pre3. Maybe you should check your classpath?  After that
> 
> Well, finally it looks that you are right:) I cleaned all the 
> intermediate files
> and recompiled the project yesterday with 2.0RC1 and it wasn't 
> working...
> Today I've deleted all intermediate files and all the occurences of 
> 1.5.1-final
> jar, and it looks that it's working correctly now:)
> 
> Thanks for your answer.


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


Re: HSSFWorkbook concurency problem

Posted by Adam Czysciak <ad...@power.com.pl>.
Hi,


On Dec 10, 2003, at 6:07 PM, Avik Sengupta wrote:

> Are you sure you are using 2.0RC1? There was a concurrency but that was
> fixed in 2.0pre3. Maybe you should check your classpath?  After that

Well, finally it looks that you are right:) I cleaned all the 
intermediate files
and recompiled the project yesterday with 2.0RC1 and it wasn't 
working...
Today I've deleted all intermediate files and all the occurences of 
1.5.1-final
jar, and it looks that it's working correctly now:)

Thanks for your answer.

-- 
Greets,
   Adam Czysciak
   adam@power.com.pl


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


Re: HSSFWorkbook concurency problem

Posted by Avik Sengupta <av...@itellix.com>.
>I 
> wanted to contact
> POI developers,

You have come to the right place :)

Are you sure you are using 2.0RC1? There was a concurrency but that was
fixed in 2.0pre3. Maybe you should check your classpath?  After that
fix, it should be safe to have multiple HSSFWorkbook objects in multiple
threads. However, a single workbook object should not be manipulated
from different threads. 

Also, are you sure that each of the InputStreams you pass in are
different?

If you still have the problem, it would help if you could come up with a
small testcase that demonstrates the problem. As part of the bug fix I
mentioned above, we've tested it extensively by creating multiple
threads, and creating HSSFWorkbook objects in each. So i would be
surprised if such a bug remains in RC1

Regards
-
Avik


On Wed, 2003-12-10 at 21:30, Adam Czysciak wrote:
> Hello,
> 
>    I wanted to check the archive, but it looks to be unavailable. I 
> wanted to contact
> POI developers, but at the project web page there is a link to this 
> mailing list. Therefore
> I'd like to say Hello, and ask you a question. Perhaps it can be a 
> bugreport:)
> 
> Did anyone had any problem with multithreaded HSSFWorkbook(InputStream 
> in) constructor?
> I use it to upload file to the app, click 'submit' simultanously, and 
> this constructor
> crashes. It seems not to be thread-safe. When I've added a static lock 
> object to synchronize
> on, everything seems to be ok. It happens both on version 1.5-final and 
> 2.0RC1.
> 
> Sorry if it is one of the most common problems here...


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