I am trying to decrypt some private keys (.pfx X509Certificate) with Bouncy Castle. If I run the code standalone (junit), it works fine, but when I run it on wildfly with arquillian deployed as a war file, I'm facing some issues:
org.jboss.arquillian.test.spi.ArquillianProxyException: javax.ejb.EJBException : JBAS014580: Unexpected Error
[Proxied because : Original exception caused: class java.lang.ClassFormatError: Absent Code attribute in method
that is not native or abstract in class file javax/ejb/EJBException]
I think the arquillian is encapsulating the real exception, but no more errors appear in the log file.
In the pom file I declared it as provided, to use the provided version.
The versions installed are:
$WILDFLY_HOME\modules\system\layers\base\org\bouncycastle\main\bcmail-jdk15on-1.50.jar
$WILDFLY_HOME\modules\system\layers\base\org\bouncycastle\main\bcpkix-jdk15on-1.50.jar
$WILDFLY_HOME\modules\system\layers\base\org\bouncycastle\main\bcprov-jdk15on-1.50.jar
I also tried to use the version bcprov-jdk16 specified directly in the pom file with scope as compile/runtime, but it didn't work anyway.
The error occurs specifically in this point:
org.bouncycastle.x509.extension.X509ExtensionUtil.getIssuerAlternativeNames(java.security.cert.X509Certificate);
X509ExtensionUtil.getIssuerAlternativeNames(certificate) = >Unknown type "org.bouncycastle.x509.extension.X509ExtensionUtil"<
Anyone else ever had this problem or know how can I fix it? Any tips?