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: POI 5.1  (Read 7803 times)
Benjamin G.
Posts: 98


« on: November 13, 2021, 05:26:10 pm »

Hi,

POI 4.1 works  fine.

We try POI 5.1 but fglcomp 4.00.03 rev-82223658 failed with :

import JAVA org.apache.poi.xssf.usermodel.XSSFWorkbook
| org.apache.poi.xssf.usermodel.XSSFWorkbook: class not found.
| See error number -6222.


env CLASSPATH is set like this :

echo $CLASSPATH
/opt/poi-5.1.0:/opt/poi-5.1.0/poi-5.1.0.jar:/opt/poi-5.1.0/poi-examples-5.1.0.jar:/opt/poi-5.1.0/poi-excelant-5.1.0.jar:/opt/poi-5.1.0/poi-javadoc-5.1.0.jar:/opt/poi-5.1.0/poi-ooxml-5.1.0.jar:/opt/poi-5.1.0/poi-ooxml-lite-5.1.0.jar:/opt/poi-5.1.0/poi-scratchpad-5.1.0.jar:/opt/poi-5.1.0/lib/ommons-codec-1.15.jar:/opt/poi-5.1.0/lib/ommons-collections4-4.4.jar:/opt/poi-5.1.0/lib/ommons-io-2.11.0.jar:/opt/poi-5.1.0/lib/ommons-math3-3.6.1.jar:/opt/poi-5.1.0/lib/og4j-api-2.14.1.jar:/opt/poi-5.1.0/lib/parseBitSet-1.2.jar:/opt/poi-5.1.0/ooxml-lib/ommons-compress-1.21.jar:/opt/poi-5.1.0/ooxml-lib/ommons-logging-1.2.jar:/opt/poi-5.1.0/ooxml-lib/urvesapi-1.06.jar:/opt/poi-5.1.0/ooxml-lib/lf4j-api-1.7.32.jar:/opt/poi-5.1.0/ooxml-lib/mlbeans-5.0.2.jar

Any help ?
Thanks
Reuben B.
Four Js
Posts: 1047


« Reply #1 on: November 14, 2021, 10:27:15 pm »

You have a number of entries where the first letter is missing e.g. "ommons" instead of "commons", "og4js-api" instead of "log4js-api", "urvesapi" instead of "curvesapi", "mlbeans" instead of "xmlbeans".  I don't think that is a function of the forum.

To create a CLASSPATH, brute-force technique is to cd to the apache poi root directory and do a find . -name "*.jar" -print, and use that as basis for CLASSPATH after a bit of editing to remove space, insert semi-colon, and remove entries that might not be needed.
 
I also found when moving upto 5, needed to download and add a log4j-core.

Reuben

Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Reuben B.
Four Js
Posts: 1047


« Reply #2 on: November 14, 2021, 11:47:18 pm »

I should also add a plug for my presentation "Tour de Github" on Day 3 of the upcoming WWDC where one of the repositories I will look at is https://github.com/FourjsGenero/fgl_apache_poi.  Register at https://4js.com/wwdc21online/

Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Benjamin G.
Posts: 98


« Reply #3 on: November 15, 2021, 09:47:51 am »

Hello,

bad copy/paste of my classpath
indeed log4j did the trick, here by my correct classpath initialisation :

#----------------------------------------------------------------------------------------------------------#
# POI 5.1.0 JAVA CLASSES : https://www.apache.org/dyn/closer.lua/poi/release/bin/poi-bin-5.1.0-20211024.tgz
# WITH POI 5.1 NEED ALSO https://dlcdn.apache.org/logging/log4j/2.14.1/apache-log4j-2.14.1-bin.tar.gz
#----------------------------------------------------------------------------------------------------------#
export POI_HOME=/opt/poi-5.1.0
export CLASSPATH=$POI_HOME/poi-5.1.0.jar
export CLASSPATH=$CLASSPATH:$POI_HOME/poi-examples-5.1.0.jar
export CLASSPATH=$CLASSPATH:$POI_HOME/poi-excelant-5.1.0.jar
export CLASSPATH=$CLASSPATH:$POI_HOME/poi-javadoc-5.1.0.jar
export CLASSPATH=$CLASSPATH:$POI_HOME/poi-ooxml-5.1.0.jar
export CLASSPATH=$CLASSPATH:$POI_HOME/poi-ooxml-full-5.1.0.jar
export CLASSPATH=$CLASSPATH:$POI_HOME/poi-ooxml-lite-5.1.0.jar
export CLASSPATH=$CLASSPATH:$POI_HOME/poi-scratchpad-5.1.0.jar
export CLASSPATH=$CLASSPATH:$POI_HOME/lib/commons-codec-1.15.jar
export CLASSPATH=$CLASSPATH:$POI_HOME/lib/commons-collections4-4.4.jar
export CLASSPATH=$CLASSPATH:$POI_HOME/lib/commons-io-2.11.0.jar
export CLASSPATH=$CLASSPATH:$POI_HOME/lib/commons-math3-3.6.1.jar
export CLASSPATH=$CLASSPATH:$POI_HOME/lib/log4j-api-2.14.1.jar
export CLASSPATH=$CLASSPATH:$POI_HOME/lib/SparseBitSet-1.2.jar
export CLASSPATH=$CLASSPATH:$POI_HOME/ooxml-lib/commons-compress-1.21.jar
export CLASSPATH=$CLASSPATH:$POI_HOME/ooxml-lib/commons-logging-1.2.jar
export CLASSPATH=$CLASSPATH:$POI_HOME/ooxml-lib/curvesapi-1.06.jar
export CLASSPATH=$CLASSPATH:$POI_HOME/ooxml-lib/slf4j-api-1.7.32.jar
export CLASSPATH=$CLASSPATH:$POI_HOME/ooxml-lib/xmlbeans-5.0.2.jar
#----------------------------------------------------------------------------------------------------------#
# WITH POI 5.1 NEED ALSO https://dlcdn.apache.org/logging/log4j/2.14.1/apache-log4j-2.14.1-bin.tar.gz
#----------------------------------------------------------------------------------------------------------#
export CLASSPATH=$CLASSPATH:/opt/log4j-2.14.1/log4j-core-2.14.1.jar

Thank for your help
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines