IBM i Access Client Solutions

 View Only
Expand all | Collapse all

ACS on IBMi / plugin=cldownload / java.ext.dirs

  • 1.  ACS on IBMi / plugin=cldownload / java.ext.dirs

    Posted Mon May 13, 2024 10:10 AM

    Hi everyone, 

    I have an issue and hopefully someone has an idea what I could do! 

    One of the past developers decided to put the POI libraries under /QIBM/UserData/Java400/ext.

    If I try to run following command cmd

    java -verbose -Djava.awt.headless=true -jar "/QIBM/ProdData/Access/ACS/Base/acsbundle.jar" /plugin=cldownload /clientfile="/path/to/file.xslx" /sql="select * from database_file" /colheadings=1 /usecollabels /system=localhost                                                                                                                                   

    no file has been created. 

    Trying the same with csv will output a file with data.

    Checking log from the verbose option I can see that the process loads the classes from the POI jars in ext-directory instead out of the packaged jars from acsbundle.jar

    ...
    class load: org.apache.poi.ss.usermodel.ClientAnchor from: file:/QIBM/UserData/Java400/ext/poi-3.8-20120326.jar              
    class load: org.apache.poi.ss.usermodel.HeaderFooter from: file:/QIBM/UserData/Java400/ext/poi-3.8-20120326.jar              
    class load: org.apache.poi.ss.usermodel.Footer from: file:/QIBM/UserData/Java400/ext/poi-3.8-20120326.jar                    
    class load: org.apache.poi.ss.usermodel.Header from: file:/QIBM/UserData/Java400/ext/poi-3.8-20120326.jar                    
    class load: org.apache.poi.ss.usermodel.Cell from: file:/QIBM/UserData/Java400/ext/poi-3.8-20120326.jar                      
    class load: org.apache.poi.ss.usermodel.CellRange from: file:/QIBM/UserData/Java400/ext/poi-3.8-20120326.jar                 
    class load: org.apache.poi.ss.usermodel.DataValidationHelper from: file:/QIBM/UserData/Java400/ext/poi-3.8-20120326.jar      
    class load: org.apache.poi.ss.usermodel.SheetConditionalFormatting from: file:/QIBM/UserData/Java400/ext/poi-3.8-20120326.jar
    class load: org.apache.poi.ss.usermodel.AutoFilter from: file:/QIBM/UserData/Java400/ext/poi-3.8-20120326.jar               
    ... 

      

    So, now my question is "how can I force the process to use packeged jars from acsbundle.jar"?.

    Thank you in advance!

    Peter



    ------------------------------
    Peter Brem
    ------------------------------


  • 2.  RE: ACS on IBMi / plugin=cldownload / java.ext.dirs

    Posted Tue May 14, 2024 02:03 PM

    Java loads all of the classes and jars in the extensions directory before anything else.  So you have two options:

    1. Remove those POI jar files in the extensions directory
    2. Replace the (almost certainly older) versions of the jar files in the extensions directory with the ones in the acsbundle.jar file.



    ------------------------------
    Michael Swenson
    Software Engineer
    IBM
    ------------------------------