Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

AIRLIB Objects Work on V7R1?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • AIRLIB Objects Work on V7R1?

    We have been using the techniques from the book "Advanced Integrated RPG" to generate Excel spreadsheets from RPG since June of 2010, running under OS V5R4. We installed a new box in December, running V7R1, and I have not been able to figure out how to get the Java Virtual Machine to start. I have recreated all the modules and service programs associated with this process, using *TERASPACE on the STGMDL (store model) parameter. I have been testing the "Hello World" application (page 126 of the book), which does not use the Excel processing, and have been unable to get past the "Unable to create java virtual machine" message. I know that the call to JNI_CreateJavaVM is returning a value of -3, which I believe means JNI version error. I can run the HELLO application via QSHELL, which returns everything correctly, so I believe all products are installed as they should be. Has anyone else successfully run this processing on V7R1?
    Last edited by LarJansen; 03-05-2013, 07:22 PM.

  • #2
    AIRLIB Objects Work on V7R1?

    I am reposting this to have the answer on both threads.


    Hello LarJansen,

    I'm glad to hear you've been using AIR for a few years to create your PDFs.

    AIR was written for the V5R4 system for backward compatibility, but the JVM has changed so now it needs to support forward compatibility

    I could see this being a common question so I posted some code on my site, which you can find here:


    Let me know if this fixes your problem.

    Have a great day!
    Tom

    Comment


    • #3
      Thanks Tom, I appreciate your reply! The code you provided works well. In the section after "// Attach to the JVM", you set attachArgs.version to JNI_VERSION_1_5, which I either needed to add to the source member SPAIRJAVA, or change to JNI_VERSION_1_6. I took the latter approach.

      So, I am able to create a JVM, but now I am getting an error in the AirExcel_setCellValueString procedure in SVAIREXCEL. The line of code which is failing is this:

      HSSFCell_setCellValueRichString(argCell: svRichString);

      and the message is indicating that there is no such method. Any ideas on this one?

      Thanks again!

      UPDATE---after reviewing JARFINDER, it appeared that the HSSFCell class definition might not be in the jar file that I was using, which was poi-3.9-20121203. So I tried the application with poi-3.0.2-FINAL-20080204, and it worked fine. So, I am going to try a new jar file from the list that JARFINDER returned, and if all goes well, then it appears that RPG-to-Excel will work fine for us under V7R1. Thanks for all your help Tom!

      FINAL UPDATE---the most recent jar version that worked (for me) is poi-3.2-FINAL-20081019.
      Last edited by LarJansen; 03-07-2013, 08:36 AM.

      Comment

      Working...
      X