tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Vávra <>
Subject problem with loading Bouncy Castle
Date Tue, 08 Nov 2011 08:47:54 GMT
  I have a problem  with loading bouncy castle.
  My code snippet is:

int position = Security.addProvider(new BouncyCastleProvider());
KeyStore store = KeyStore.getInstance("PKCS12", "BC");

In the application log I have message that BouncyCastleProvider is 
already loaded (position== -1).
But call of getInstance(.) failed with exception: PKCS12 not found
Caused by: PKCS12 not found
Caused by: class configured for 
KeyStore(provider: BC)cannot be found
Caused by: java.lang.ClassNotFoundException: 

class JDKPKCS12KeyStore$BCPKCS12KeyStore is contained in 

In the catalina log  there is a message:
Nov 8, 2011 8:34:22 AM org.apache.catalina.loader.WebappClassLoader 
INFO: Illegal access: this web application instance has been stopped 
already.  Could not load 
org.bouncycastle.jce.provider.JDKPKCS12KeyStore$BCPKCS12KeyStore.  The 
eventual following stack trace is caused by an error thrown for 
debugging purposes as well as to attempt to terminate the thread which 
caused the illegal access, and has no functional impact.

On the tomcat I have 2 more applications that use the same version of 
bcprov-ext. Each has it in own WEB-INF/lib directory.

Could anybody give me an advice?
Why tomcat does complaint about "Illegal access"?
Is there any way how to debug work of 

My tomcat version is:
Apache Tomcat/6.0.29 	1.6.0_22-b04 	Sun Microsystems Inc. 	Linux 	amd64



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message