NoSuchMethodError when using SL4J Logger

Problem:

When attempting to use the SLF4J logger, for example:

$ ${JAVA_HOME}/bin/java -Dvormetric.pin='TUVWXYZABC123' -jar ThalesEncryption-0.0.10-jar-with-dependencies.jar encryptSsn 123456789 

it's returning the following exception:

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". 
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exception in thread "main" java.lang.NoSuchMethodError: sun.security.pkcs11.wrapper.PKCS11.C_Encrypt(J[BII[BII)I
at com.innovis.encrypt.ThalesEncrypter.encryptValue(ThalesEncrypter.java:337)
at com.innovis.encrypt.ThalesEncrypter.encryptSsn(ThalesEncrypter.java:307)
at com.innovis.encrypt.EncryptionConsole.main(EncryptionConsole.java:42)

 

Cause: 

This is an OpenJDK bug that is fixed in Java8 build 277 (and later).

 

Solution:

Please download, install and test with Zulu8.52 (jre8.0.282) (or later) to verify that the issue is resolved.

Add Comment

Comments

0 comments

Article is closed for comments.

Was this article helpful?
0 out of 0 found this helpful