I can run my IBM Notes agent locally without error, however when I run the agent on the server I get the following error.
LS2J Error: Threw java.lang.NoClassDefFoundError: org.apache.pdfbox.pdmodel.PDDocument in procedure GETTEMPLATE, line 79
My LotusScript agent calls a java class using LS2J. The java class using 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 had the following JAR files added to to Domino server, and had it restarted.
pdfbox-1.8.jar,
commons-lang-2.1.jar,
commons-logging-1.2.jar
Are there other JAR files I need copied to: \notes\jvm\lib\ext
or is there something else wrong?
There are two ways to get it to run on server:
JavaUserClasses=C:\...\jvm\lib\ext
create a Script Library of type Java, import the jars as Archives and "use" the Script Library in Lotus Script code
Use "pdfBox"