× 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.



On 4/17/2015 10:10 AM, John Rusling wrote:

Message ID . . . . . . : RNX0301 Severity . . . . . . . : 50
Message type . . . . . : Escape
Date sent . . . . . . : 04/17/15 Time sent . . . . . . : 09:05:23

Message . . . . : Java exception received when calling Java method.
Cause . . . . . : RPG procedure SS_OPEN in program POI36/HSSFR4 received
Java exception "java.lang.NoSuchMethodError:
org/apache/poi/poifs/filesystem/POIFSFileSystem.hasPOIFSHeader(Ljava/io"
when calling method "create" with signature
"(Ljava.io.InputStream;)Lorg.apache.poi.ss.usermodel.Workbook;" in class
"org.apache.poi.ss.usermodel.WorkbookFactory".
Recovery . . . : Contact the person responsible for program maintenance to
determine the cause of the problem.
Technical description . . . . . . . . : If the exception indicates that the
Java class was not found, ensure the class for the method is in the class
path. If the exception indicates that the Java method was not found, check
the method name and signature. If the signature is not correct, change the
RPG prototype for the method, or change the Java method, so that the return
type and parameter types match. You can determine the signatures for all the
methods in class XYZ using command QSH CMD('javap -s XYZ').

This is one of those situations where the error message is almost
certainly correct. If I recall, most of Scott's examples have the RPG
program setting the CLASSPATH - does your RPG program set the CLASSPATH
or is it a WRKENVVAR variable? If the latter, perhaps your vendor
inadvertently altered it.

It is possible that the vendor overlaid / deleted / replaced the POI
classes which are being invoked here. I say possible because some
installations put the POI classes in an ext directory which is not
recommended practise.
http://stackoverflow.com/questions/5039862/classpath-vs-java-ext-dirs

If your site had the POI classes in an ext directory, take them all out
of there and put them in a directory you create and set the CLASSPATH to
point to them.

There's one additional hint. If you run the RPG and it starts a Java
Virtual Machine, that JVM's configuration is fixed for the duration of
that job. Specifically, if you change the CLASSPATH, the existing JVM
will not pick up that change. You need to end that job and start
another one. I generally execute such RPG programs in batch so I can
guarantee a fresh JVM with each run.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.