FS#65495 - [pdftk] Missing Dependency java-commons-lang leads Strange GSCAN2PDFWarnings
Attached to Project:
Community Packages
Opened by Thomas Reim (rdratlos) - Friday, 14 February 2020, 10:35 GMT
Last edited by Jonas Witschel (diabonas) - Friday, 14 February 2020, 11:55 GMT
Opened by Thomas Reim (rdratlos) - Friday, 14 February 2020, 10:35 GMT
Last edited by Jonas Witschel (diabonas) - Friday, 14 February 2020, 11:55 GMT
|
Details
Description:
If optional dependency pdftk is installed and used for package gscan2pdf and package java-commons-lang, which is an optional dependency for pdftk itself, is not installed, gscan2pdf throws strange warnings at startup: 1. message: "pdftk is installed, but cannot access the directory used for temporary files.One reason for this might be that pdftk was installed via snap.In this case, removing pdftk, and reinstalling without using snap would allow gscan2pdf to use pdftk. Another workaround would be to select a temporary directory under your home directory in Edit/Preferences." 2. message Warning: missing packages PDF encryption requires pdftk." Analysis shows that the warnings are caused by gscan2pdf executing pdftk's dump_data function. As soon as package java-commons-lang has been installed, the warning messages are not shown aghain and gscan2pdf works fine. Please check, if java-commons-lang should be a mandatory dependency. Additional info: * package version(s) * config and/or log files etc. * link to upstream bug report, if any Steps to reproduce: Uninstall package java-commons-lang (if installed) Install and start gscan2pdf Start gscan2pdf -> Check warning messages Then install java-commons-lang Start gscan2pdf again -> No warnings |
This task depends upon
Closed by Jonas Witschel (diabonas)
Friday, 14 February 2020, 11:55 GMT
Reason for closing: Duplicate
Additional comments about closing: FS#65496
Friday, 14 February 2020, 11:55 GMT
Reason for closing: Duplicate
Additional comments about closing:
FS#64159,FS#64575. If java-commons-lang is not installed, the error message when trying to use dump_data is quite clear:Error: could not load a required library for this operation.
java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringEscapeUtils
Make sure that bcprov and commons-lang3 are installed and included in the
classpath. See also https://gitlab.com/pdftk-java/pdftk/issues/2.
Unfortunately this message is not relayed to the user by gscan2pdf, making it hard to diagnose what went wrong. I suggest adding java-commons-lang as an optional dependency to gscan2pdf in addition to pdftk since it uses the dump_data operation. Therefore I'll close this in favour of
FS#65496.