× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi John,

Use Scott's earlier email to download the latest service program and 
prototype source. They fix the problem!!!

Scott - Thank you, thank you. Since I no longer mind appearing stupid, 
what do you mean by needing to have "at least 3 FD's open"? What's an FD? 
And where in the new code are the 3 of them being opened? 

Arthur J. Marino
Southern Container Corporation
(631) 231-0400 x133



"John Joiner" <john@xxxxxxxxxxxxxx> 
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
08/29/2006 05:28 PM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
"'RPG programming on the AS400 / iSeries'" <rpg400-l@xxxxxxxxxxxx>
cc

Subject
RE: Excel/POI - Please Help The Drowning Man






Arthur,

I have not tried to submit this until just now, so had not come across 
this
issue.

But now that I have tried to submit it, I get the same error (I'm assuming
it's the same) as you do.

The error in the joblog is:

Java exception "java.io.IOException:" when calling method "<init>" with
signature "(Ljava.io.InputStream;)V" in class
"org.apache.poi.poifs.filesystem.POIFSFileSystem".

The stack trace show:
java.io.IOException

      java/lang/Throwable.<init>()V+4 (Throwable.java:73)

      java/lang/Exception.<init>()V+1 (Exception.java:24)

      java/io/IOException.<init>()V+1 (IOException.java:26)

      java/io/FileInputStream.readBytes([BII)I+?? 
(FileInputStream.java:??)

      java/io/FileInputStream.read([BII)I+1 (FileInputStream.java:179)

      org/apache/poi/util/IOUtils.readFully(Ljava/io/InputStream;[BII)I+13
(IOUtils.java:51) 
      org/apache/poi/util/IOUtils.readFully(Ljava/io/InputStream;[B)I+5
(IOUtils.java:36) 

I don't have time right now to stop and figure this out, but maybe someone
else out there know the answer?

JJ


org/apache/poi/poifs/storage/HeaderBlockReader.<init>(Ljava/io/InputStream;)
V+18 (HeaderBlockReader.java:71)
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Arthur.Marino@xxxxxxxxxxxxxxxx
Sent: Tuesday, August 29, 2006 1:41 PM
To: RPG programming on the AS400 / iSeries
Subject: RE: Excel/POI - Please Help The Drowning Man

The end is in sight! (Though the end, in this case, may involve me hanging 

from the nearest rafter.)

I changed to Scott's new version of the hssf service program. And, as John 

Joiner pointed out, the "wwFile" definition in "hssf_open" was incorrectly 

defined as "like(jFileOutputStream)" which I changed to FileInputStream.

Now there's one more thing wrong but at least it's CONSISTENT. 

If I run my 'read the s/sheet' job interactively, it WORKS EVERY TIME. 
If I run it in batch, IT FAILS EVERY TIME on the 'open' (Java 
IOException)! 
I've tried CPYENVVAR(*YES) and/or ALWMLTTHD(*YES) on the SBMJOB, all to no 

avail. 

Does anyone know what, in a batch job's environment, could be so different 

from the interactive that the batch job would fail every time???

You guys have been great. Thanks so much.

Arthur J. Marino
Southern Container Corporation
(631) 231-0400 x133



"John Joiner" <john@xxxxxxxxxxxxxx> 
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
08/28/2006 02:06 PM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
"'RPG programming on the AS400 / iSeries'" <rpg400-l@xxxxxxxxxxxx>
cc

Subject
RE: Excel/POI - Please Help The Drowning Man







I've been trying to reproduce this problem so that I can fix my service 
program for everyone who uses it.  But, so far, I've been unable to 
reproduce the problem you describe.
One problem I've had with the hssf_open() procedure is that it declares
'wwfile' as type 'jFileOutputStream' and passes this variable to 
procedure
'new_POIFSFileSystem' to open an existing workbook. 

Scott,

When I originally ran your UPDDEMO program, it kept bombing while trying 
to
open the workbook with a java IOException in the POIFSFileSystem
constructor, as the constructor expects a FileInputStream, but a
FIleOutputStream is being passed instead.

I changed the declaration of 'wwfile' to jFileInputStream' and got around
this problem.

This did not cause the scenario described in the original post, but the 
next
problem I ran into did.

Once I was able to open the spreadsheet, the program bombed trying to 
create
the 'cell' object from the 'row' object in the following line:
cell = HSSF_GetCell(row: 1);

In my case, it bombed because the previous statement, which creates the
'row' object, returned a null reference for 'row'. Passing a null 
reference
to the HSSF_GetCell procedure caused all finds of problems, including the
problem described in the original post. 

Looking at the joblog, I saw the following errors for SRVPGM QJVAJNI after
the call to HSSF_GetCell:
MCH74A5 - Java Virtual Machine has ended with a reason code of 2.
MCH3601 - Pointer not set for location referenced

Each subsequent call to 'hssf_begin_object_group' results in the following
errors:
JVAB55C - Unable to create Java Virtual Machine because of reason 5 (JVM
already started in process)

As you mentioned, I can sign off and then back "resets" everything.

Hope this helps.

JJ

-----Original Message-----
From: rpg400-l-bounces+john=thejoiners.net@xxxxxxxxxxxx
[mailto:rpg400-l-bounces+john=thejoiners.net@xxxxxxxxxxxx] On Behalf Of
Scott Klement
Sent: Monday, August 28, 2006 11:03 AM
To: RPG programming on the AS400 / iSeries
Subject: Re: Excel/POI - Please Help The Drowning Man





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.