I am trying to use PDFbox on an IBM Domino server by getting NoClassDefFoundError

I can start my IBM Notes agent without errors, however, when I start the agent on the server, I get the following error.

LS2J error: java.lang.NoClassDefFoundError thrown: org.apache.pdfbox.pdmodel.PDDocument in GETTEMPLATE procedure, line 79

My LotusScript agent calls a Java class using LS2J. The java class uses the following libraries:

import java.io.File;
import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.pdmodel.PDDocumentCatalog;
import org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm;
import org.apache.pdfbox.pdmodel.interactive.form.PDField;
import org.w3c.dom.Document;
import org.w3c.dom.*;

import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.DocumentBuilder;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException; 

I have added the following JAR files to the Domino server and reboot.

pdfbox-1.8.jar,
commons-lang-2.1.jar,
commons-logging-1.2.jar

Are there any other JAR files that I need to copy: \notes\jvm\lib\ext or is there something else wrong?

+4
source share
1 answer

, :

  • JavaUserClasses ( JavaUserClassesExt) notes.ini, , , JavaUserClasses=C:\...\jvm\lib\ext
  • Script Java, "" Script Lotus Script code
    Use "pdfBox"

    enter image description here

+1

Source: https://habr.com/ru/post/1589468/


All Articles