getting rid of some warnings

317 views
Skip to first unread message

Zoltan Lippai

unread,
Dec 18, 2018, 5:36:51 AM12/18/18
to JSignPdf
Hi,

I'm running jsignpdf on my Ubuntu server in CLI mode. I get several warnings when I sign a PDF and I would like to solve those issues or just hide the warnings.
Sending the full output to /dev/null is not an option, because I still need to know if anything bad happens. This is my current output:

WARN  net.sf.jsignpdf.utils.PropertyProvider$ProperyProviderException: Property file /root/.JSignPdf doesn't exist.
log4j:WARN No appenders could be found for logger (net.sf.jsignpdf.ssl.SSLInitializer).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by net.sf.jsignpdf.utils.KeyStoreUtils (file:/root/cron/jsignpdf/JSignPdf.jar) to field java.security.KeyStore.keyStoreSpi
WARNING: Please consider reporting this to the maintainers of net.sf.jsignpdf.utils.KeyStoreUtils
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

The first line I understand, but is there a way to not have that file and not get the warning either? I'm providing all the details on the command line.
The other ones I really have no idea how to hide.

Thanks,
Zoltan

Rajendra Rajsri

unread,
Dec 19, 2018, 12:16:09 AM12/19/18
to JSignPdf
What is the ubuntu OS version. Try to use jsignpdf from other than root account.
regds
Rajendra

Zoltan Lippai

unread,
Dec 20, 2018, 5:14:30 AM12/20/18
to jsig...@googlegroups.com
Hi Rajendra,

Ubuntu version is:

zolcsi@aragorn:~$  lsb_release -a

No LSB modules are available.

Distributor ID: Ubuntu

Description: Ubuntu 18.04.1 LTS

Release: 18.04

Codename: bionic


zolcsi@aragorn:~$ uname -a

Linux aragorn 4.15.0-33-generic #36-Ubuntu SMP Wed Aug 15 16:00:05 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux


Tried to run it from a simple user account, but the results are the same.
This is the command that I use:

zolcsi@aragorn:~$ java -jar /home/zolcsi/jsignpdf/JSignPdf.jar \

>   /home/zolcsi/sample.pdf \

>   --quiet \

>   --certification-level CERTIFIED_NO_CHANGES_ALLOWED \

>   --out-directory /home/zolcsi \

>   --disable-assembly \

>   --disable-fill \

>   --disable-modify-annotations \

>   --disable-modify-content \

>   --hash-algorithm SHA256 \

>   --keystore-file /home/zolcsi/lippaiz.p12 \

>   --keystore-type PKCS12 \

>   --keystore-password ******** \

>   --ocsp \

>   --out-suffix "-signed" \

>   --tsa-server-url "https://btsa.e-szigno.hu/tsa" \

>   --tsa-authentication PASSWORD \

>   --tsa-user ******** \

>   --tsa-password ******* \

>   --tsa-hash-algorithm SHA-256

WARN  net.sf.jsignpdf.utils.PropertyProvider$ProperyProviderException: Property file /home/zolcsi/.JSignPdf doesn't exist.

WARN  net.sf.jsignpdf.utils.PropertyProvider$ProperyProviderException: Property file conf/conf.properties doesn't exist.

log4j:WARN No appenders could be found for logger (net.sf.jsignpdf.SignerLogic).

log4j:WARN Please initialize the log4j system properly.

log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

WARNING: An illegal reflective access operation has occurred

WARNING: Illegal reflective access by net.sf.jsignpdf.utils.KeyStoreUtils (file:/home/zolcsi/jsignpdf/JSignPdf.jar) to field java.security.KeyStore.keyStoreSpi

WARNING: Please consider reporting this to the maintainers of net.sf.jsignpdf.utils.KeyStoreUtils

WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations

WARNING: All illegal access operations will be denied in a future release



Best,
Zoltan

--
You received this message because you are subscribed to a topic in the Google Groups "JSignPdf" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jsignpdf/ytLEXreP8cg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jsignpdf+u...@googlegroups.com.
To post to this group, send email to jsig...@googlegroups.com.
Visit this group at https://groups.google.com/group/jsignpdf.
For more options, visit https://groups.google.com/d/optout.

Josef Cacek

unread,
Dec 20, 2018, 1:28:19 PM12/20/18
to JSignPdf forum
Hi,

the first issue can be workarounded by creating an empty config file -
either in home directory:
touch ~/.JSignPdf

or in another directory (e.g. in JSignPdf installation dir) and
configuring custom user.home property in java:
touch /path/to/.JSignPdf
java -Duser.home=/path/to -jar JSignPdf.jar ...

The second problem is related to using a newer Java version (9+) which
comes with the module system and better package protection. To avoid
the warning add following --add-opens java argument:
java --add-opens java.base/java.security=ALL-UNNAMED -jar JSignPdf.jar ...

Regards,
-- Josef

čt 20. 12. 2018 v 11:14 odesílatel Zoltan Lippai <zo...@lippai.net> napsal:
> You received this message because you are subscribed to the Google Groups "JSignPdf" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jsignpdf+u...@googlegroups.com.

Josef Cacek

unread,
Dec 20, 2018, 1:30:44 PM12/20/18
to JSignPdf forum
One more thing, you should run the java command from the JSignPdf
installation directory:
cd /home/zolcsi/jsignpdf
java -jar JSignPdf.jar ...

-- jc

čt 20. 12. 2018 v 19:28 odesílatel Josef Cacek <josef...@gmail.com> napsal:
Reply all
Reply to author
Forward
0 new messages