On Wed, Nov 16, 2011 at 12:46 AM, Kevin Skelton <[email protected]> wrote:
>
> I added your GC to startup and removed System.gc();
> The 1,000 loop test still crashed.
>
Kevin --
I just ran the following (note 10,000 instead of 1,000 just to stretch
the example ) in my linux x86_64 environment (odfdom 0.8.7,
simpleapi, 0.6.6, xerces 2.11 , Openjdk 64 bit 1.6.0_20 ) without any
problems .. perhaps its something else in your environment ...maybe a
gc bug in the version of your jvm ? :
for (int i=0; i < 10000 ; i++ ) {
FileInputStream fis = null;
try {
fis = new FileInputStream("test.odt");
TextDocument textDoc = (TextDocument)
TextDocument.loadDocument(fis);
fis.close();
System.out.println("In loop " + i);
} catch (Exception ex) {
System.out.println("Exception in loop " + ex);
} finally {
System.out.println("In (finally) loop " + i);
try {
fis.close();
} catch (IOException ex) {
System.out.println("Error while 'finally' closing");
}
}
}
Ashok
> One thing I did do was switch to using a FileInputStream which seemed to
> help a bit (file handles actually close), but eventually still crashed
> anyway.
>
> FileInputStream fis = new FileInputStream("/home2/templates/" +
> templateName);
> textDoc = (TextDocument)TextDocument.loadDocument(fis);
> fis.close();
>
>
>
> Kevin
>
>
>
> From:
> Ashok Hariharan <[email protected]>
> To:
> [email protected]
> Date:
> 11/15/2011 02:11 PM
> Subject:
> Re: TextDocument.loadDocument() locking up in an x86_Linux_64 environment.
>
>
>
> On Tue, Nov 15, 2011 at 10:10 PM, Kevin Skelton <[email protected]>
> wrote:
>> The program is loading an .odt doc from the linux file system in order
> to
>> match/merge it with a data file.
>> I am not writing or saving the document back to the file system, I am
>> sending the newly created doc over the wire.
>> This is a single threaded application. (MQSeries triggered).
>> No exceptions at all. I have the load in a try/catch loop but never see
>> an exception.
>>
>
> Try removing the System.gc()
>
> and starting the test app with -XX:-UseParallelGC
>
> do you get the same problem ?
>
>
>