Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: Using Apache POI  (Read 4499 times)
Paul M.
Posts: 13


« on: October 04, 2023, 07:23:41 pm »

We are modernizing our software to use Web only applications, and I am having issues moving an application that uses Apache POI to the web server.  It keeps throwing an 8306 Java exception thrown error.  I realize it is because  I am not referencing the POI libraries properly.  We are running POI-5.0.0 on IIS-10
BDL is on RHEL 8 using version 3.20.13
GAS is on WS2019 running IIS using version 3.20.13

I have tried putting the poi directories in the as.xcf file by creating
<RESOURCE Id="res.poidir" Source="INTERNAL">C:\POI\poi-5.0.0</RESOURCE>
then adding $(res.poidir):$(res.poidir)\lib:$(res.poidir)\ooxml-lib 
to the res.path and res.fglldpath variables for both WNT and UNX

I also tried adding the LD_LIBRARY_PATH and CLASSPATH directly to the 8-10 files in the application.xcf like I do for BDL

I know I am missing something simple.
Reuben B.
Four Js
Posts: 1062


« Reply #1 on: October 05, 2023, 11:35:04 pm »

I gave a tip in this article https://4js.com/ask-reuben/ig-44/ which would normally help here. (environment variable not set to what you think it is)

At beginning of your program shortly after MAIN add the following

Code
  1. IF some-condition THEN   -- Typically test for existence of a command line argument
  2.   RUN "env | sort > /tmp/yourname.env"  -- use appropriate command for O/S
  3. END IF

Run program in config that works and one that doesn't, and compare value of CLASSPATH, LD_LIBRARY_PATH, JAVA*. etc  Normally find in moving from GDC-Direction Connection to Web via Genero ApplicationServer that an environment variable has not been specified in .xcf either all or correctly.

One thing puzzles me about what you typed though.  You said "running POI-5.0.0 on IIS-10" and the entry for poidir being "c:\" but you also said "BDL is on RHEL8".  When you have IMPORT JAVA it is using the Java on the same server as the fglrun.  So if BDL is on RHEL8, then your Java and Apache POI should also be on RHEL8.

Reuben



Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines