org.opensaml.xml.encryption.EncryptionException: Error encrypting XMLObject


Solutions on the web

Solution icon of googlegroups
via Google Groups by Unknown author, 8 months ago
Error encrypting XMLObject

Solution icon of stackoverflow
via Stack Overflow by maikelm
, 1 year ago
Error encrypting XMLObject

Stack trace

org.opensaml.xml.encryption.EncryptionException: Error encrypting
 XMLObject
	at org.opensaml.xml.encryption.Encrypter.encryptElement(Encrypter.java:453)
	at org.opensaml.saml2.encryption.Encrypter.encrypt(Encrypter.java:343)
	at org.opensaml.saml2.encryption.Encrypter.encrypt(Encrypter.java:257)
	at SamlTest.main(SamlTest.java:208)
Caused by: java.lang.ArrayIndexOutOfBoundsException: too much data for
 RSA block
	at org.bouncycastle.jce.provider.JCERSACipher.engineDoFinal(Unknown Source)
	at javax.crypto.Cipher.doFinal(Unknown Source)
	at org.apache.xml.security.encryption.XMLCipher.encryptData(Unknown Source)
	at org.apache.xml.security.encryption.XMLCipher.encryptData(Unknown Source)
	at org.opensaml.xml.encryption.Encrypter.encryptElement(Encrypter.java:450)
	... 3 more

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago