Update: In version v2021R1, the rhino version was upgraded to rhino-1.7.13.jar.

Q: I upgraded to the latest version of jPDFNotes v2016R1. I am loading a PDF that has JavaScript form field validation, but I received this error:

com.qoppa.pdf.PDFException: Error loading PDF org.mozilla.javascript.Context.initSafeStandardObjects(Lorg/mozilla/javascript/ScriptableObject;Z)Lorg/mozilla/javascript/ScriptableObject;
java.lang.NoSuchMethodError: org.mozilla.javascript.Context.initSafeStandardObjects(Lorg/mozilla/javascript/ScriptableObject;Z)Lorg/mozilla/javascript/ScriptableObject;

A: Starting in version v2016R1, Qoppa’s PDF components started using Rhino version instead of version 1.4. We upgraded to the latest version of Rhino in order to allow JavaScript sand-boxed mode that only initializes “safe” java objects (“leaving out those that offer access directly to Java classes”).

To correct the problem, remove the old js-14.jar from your classpath and add the correct rhino version.