java.lang.ExceptionInInitializerError on Ubuntu after Java Upgrade
See original GitHub issueThe command line tools for Jasypt 1.9.3 started throwing java.lang.ExceptionInInitializerError after a recent system upgrade. I’m guessing it’s because of the java version, but other packages were upgraded at the same time.
The upgraded server is now running openjdk JRE 1.8.0_265. The example below shows that it won’t encrypt anything.
ubuntu@ip-10-0-1-21:/usr/local/bin/jasypt/bin$ ./encrypt.sh input=test password=test
----ENVIRONMENT-----------------
Runtime: Private Build OpenJDK 64-Bit Server VM 25.265-b01
----ARGUMENTS-------------------
input: test
password: test
----ERROR-----------------------
java.lang.ExceptionInInitializerError
This sever, which hasn’t been upgraded is running openjdk JRE 1.8.0_252 and encryption works there.
ubuntu@ip-10-1-1-103:/usr/local/bin/jasypt/bin$ ./encrypt.sh input=test password=test
----ENVIRONMENT-----------------
Runtime: Private Build OpenJDK 64-Bit Server VM 25.252-b09
----ARGUMENTS-------------------
input: test
password: test
----OUTPUT----------------------
iBVgRSj3NIfi0iPPyYaqIA==
I’m trying to figure out how to downgrade the Java version on Ubuntu, but I’d appreciate any other advice as to what might be done about this as well.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8
Top Results From Across the Web
Arduino and Ubuntu 18.10: java.lang.ExceptionInInitializerError
I can confirm your issue with arduino from the repository. But version from umake works as expected. – N0rbert. Oct 21, 2018 at...
Read more >"[SOLVED] ubuntu Exception in thread main java.lang ...
I have downloaded rapidminer-5.2.008.zip and unzip it. I use Ubuntu 12.04 Cannot start rapidminer: $ cd apps/rapidminer/
Read more >How to Resolve Java.lang.ExceptionInInitializerError In Java?
We can resolve the java.lang.ExceptionInInitializerError by ensuring that static initializer block of classes does not throw any Runtime ...
Read more >java.lang.ExceptionInInitializerError com.sun.tools.javac.code ...
After changing environment variable JAVA_HOME to jdk8 home dir, this error disappear. Share.
Read more >Bug ID: JDK-8132459 ExceptionInInitializerError from 'java
Command to reproduce: LANG=zh_CN.GB18030 java -version Error message: Error occurred during initialization of VM java.lang.ExceptionInInitializerError at ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks. Worked for me.
Okay, probably final thought here as I think I have a workaround. After seeing my little test application working, I went back and moved all the jar files in ./lib to another directory (state demonstrated below) and the encrypt.sh script started working again. Something in one of those jars must be throwing an error after some system update (java or something else), preventing the normal encryption from working. All jars were originally installed from https://github.com/jasypt/jasypt/releases/download/jasypt-1.9.3/jasypt-1.9.3-dist.zip