Probable bug - java.lang.ExceptionInInitializerError

Issue #30 duplicate
Sibelius Seraphini created an issue

The jose4j is a great lib!

I'm using jose4j in my Android application, and I've received this FatalException:

java.lang.ExceptionInInitializerError

   at org.jose4j.jws.JsonWebSignature.getAlgorithm()

   at org.jose4j.jws.JsonWebSignature.sign()

   at org.jose4j.jws.JsonWebSignature.setPayload()

Caused by: java.lang.NoClassDefFoundError: java.nio.charset.StandardCharsets

   at org.jose4j.lang.StringUtil.newStringUtf8()

   at org.jose4j.base64url.internal.apache.commons.codec.binary.BaseNCodec.available()

   at org.jose4j.base64url.Base64Url.base64UrlDecode()

   at org.jose4j.keys.BigEndianBigInteger.fromBytes()

   at org.jose4j.jwk.PublicJsonWebKey.fillPrivateTypeSpecificParams()

   at org.jose4j.jwk.RsaJsonWebKey.()

   at org.jose4j.jwk.JsonWebKey$Factory.newJwk()

   at org.jose4j.jwk.JsonWebKey$Factory.newJwk()

   at org.jose4j.jwe.RsaKeyManagementAlgorithm$RsaOaep256.isAvailable()

   at org.jose4j.jwa.AlgorithmFactory.isAvailable()

   at org.jose4j.jwa.AlgorithmFactory.getAlgorithm()

   at org.jose4j.jwa.AlgorithmFactoryFactory.initialize()

   at org.jose4j.jwa.AlgorithmFactoryFactory.()

   at org.jose4j.jwa.AlgorithmFactoryFactory.()

   at org.jose4j.jws.JsonWebSignature.getAlgorithm()

   at org.jose4j.jws.JsonWebSignature.sign()

   at org.jose4j.jws.JsonWebSignature.setPayload()

Best, Sibelius

Comments (5)

  1. Log in to comment