You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Adam Jenkins <ma...@adamjenkins.net> on 2005/02/19 23:00:58 UTC

ThreadDeath with tomcat 5.5.7 and bouncycastle

Hi All,

I'm getting a really odd error when I try to init a ciphers (or any
other artifact for that matter) using BC as the provider in tomcat 5.5.7
(struts application).

The call is simply 

final Cipher rsaCipher = Cipher.getInstance("RSA/ECB/PKCS1Padding",
"BC");

and I get the following:

java.lang.ThreadDeath
        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1221)
        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1181)
        at java.security.Provider
$Service.getImplClass(Provider.java:1116)
        at java.security.Provider
$Service.newInstance(Provider.java:1074)
        at javax.crypto.Cipher.getInstance(DashoA12275)
        at javax.crypto.Cipher.getInstance(DashoA12275)

The bouncy castle libraries are included in the classpath, and are being
initialized correctly in the servlet init with the call:

Security.addProvider( new BouncyCastleProvider());

JVM Details:
java version "1.5.0-rc"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-rc-b63)
Java HotSpot(TM) Client VM (build 1.5.0-rc-b63, mixed mode)

uname -r:
2.6.8-gentoo-r10

Anyone have any ideas?

Cheers
Adam


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: ThreadDeath with tomcat 5.5.7 and bouncycastle

Posted by Remy Maucherat <re...@gmail.com>.
On Sun, 20 Feb 2005 09:00:58 +1100, Adam Jenkins <ma...@adamjenkins.net> wrote:
> Hi All,
> 
> I'm getting a really odd error when I try to init a ciphers (or any
> other artifact for that matter) using BC as the provider in tomcat 5.5.7
> (struts application).
> 
> The call is simply
> 
> final Cipher rsaCipher = Cipher.getInstance("RSA/ECB/PKCS1Padding",
> "BC");
> 
> and I get the following:
> 
> java.lang.ThreadDeath
>         at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1221)
>         at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1181)
>         at java.security.Provider
> $Service.getImplClass(Provider.java:1116)
>         at java.security.Provider
> $Service.newInstance(Provider.java:1074)
>         at javax.crypto.Cipher.getInstance(DashoA12275)
>         at javax.crypto.Cipher.getInstance(DashoA12275)
> 
> The bouncy castle libraries are included in the classpath, and are being
> initialized correctly in the servlet init with the call:
> 
> Security.addProvider( new BouncyCastleProvider());
> 
> JVM Details:
> java version "1.5.0-rc"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-rc-b63)
> Java HotSpot(TM) Client VM (build 1.5.0-rc-b63, mixed mode)
> 
> uname -r:
> 2.6.8-gentoo-r10
> 
> Anyone have any ideas?

Yes, plenty :)

The first one is to not crosspost, especially to lists where it is OT.

The second one is, don't put your security provider in WEB-INF/lib
unless you plan to remove it when the webapp is stopped (or don't
expect to reload your application). Even if you do remove it, it's a
little bit risky, and IMO bad design to do this kind of thing inside a
webapp.

And the third one is to post full stack traces.

-- 
xxxxxxxxxxxxxxxxxxxxxxxxx
Rémy Maucherat
Developer & Consultant
JBoss Group (Europe) SàRL
xxxxxxxxxxxxxxxxxxxxxxxxx

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: ThreadDeath with tomcat 5.5.7 and bouncycastle

Posted by Adam Jenkins <ma...@adamjenkins.net>.
FYI

This seems to relate to tomcat bug 26372.

On Sun, 2005-02-20 at 09:00 +1100, Adam Jenkins wrote:
> Hi All,
> 
> I'm getting a really odd error when I try to init a ciphers (or any
> other artifact for that matter) using BC as the provider in tomcat 5.5.7
> (struts application).
> 
> The call is simply 
> 
> final Cipher rsaCipher = Cipher.getInstance("RSA/ECB/PKCS1Padding",
> "BC");
> 
> and I get the following:
> 
> java.lang.ThreadDeath
>         at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1221)
>         at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1181)
>         at java.security.Provider
> $Service.getImplClass(Provider.java:1116)
>         at java.security.Provider
> $Service.newInstance(Provider.java:1074)
>         at javax.crypto.Cipher.getInstance(DashoA12275)
>         at javax.crypto.Cipher.getInstance(DashoA12275)
> 
> The bouncy castle libraries are included in the classpath, and are being
> initialized correctly in the servlet init with the call:
> 
> Security.addProvider( new BouncyCastleProvider());
> 
> JVM Details:
> java version "1.5.0-rc"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-rc-b63)
> Java HotSpot(TM) Client VM (build 1.5.0-rc-b63, mixed mode)
> 
> uname -r:
> 2.6.8-gentoo-r10
> 
> Anyone have any ideas?
> 
> Cheers
> Adam
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: ThreadDeath with tomcat 5.5.7 and bouncycastle

Posted by Adam Jenkins <ma...@adamjenkins.net>.
FYI

This seems to relate to tomcat bug 26372.

On Sun, 2005-02-20 at 09:00 +1100, Adam Jenkins wrote:
> Hi All,
> 
> I'm getting a really odd error when I try to init a ciphers (or any
> other artifact for that matter) using BC as the provider in tomcat 5.5.7
> (struts application).
> 
> The call is simply 
> 
> final Cipher rsaCipher = Cipher.getInstance("RSA/ECB/PKCS1Padding",
> "BC");
> 
> and I get the following:
> 
> java.lang.ThreadDeath
>         at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1221)
>         at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1181)
>         at java.security.Provider
> $Service.getImplClass(Provider.java:1116)
>         at java.security.Provider
> $Service.newInstance(Provider.java:1074)
>         at javax.crypto.Cipher.getInstance(DashoA12275)
>         at javax.crypto.Cipher.getInstance(DashoA12275)
> 
> The bouncy castle libraries are included in the classpath, and are being
> initialized correctly in the servlet init with the call:
> 
> Security.addProvider( new BouncyCastleProvider());
> 
> JVM Details:
> java version "1.5.0-rc"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-rc-b63)
> Java HotSpot(TM) Client VM (build 1.5.0-rc-b63, mixed mode)
> 
> uname -r:
> 2.6.8-gentoo-r10
> 
> Anyone have any ideas?
> 
> Cheers
> Adam
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org