Remember that your classpath in your environment which is used by the java
compiler when you issue a compile command from the command line is not the
same classpath that Tomcat uses when it is running.

Move the JAR into $CATALINA_HOME/common/lib.  I don't believe that Tomcat
supports loading JAR files from $JRE_HOME/jre/lib/ext.

----- Original Message -----
From: "Mark Liu" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, February 09, 2003 00:42
Subject: Tomcat complains: java.security.NoSuchProviderException: no such
provider: BC


> I run Tomcat 4.1.18 on my Win2K box.
>
> Because my project will use bouncycastle cryptographic
> bundle (known as BC version 1.18), I have this package
> properly installed on my system.  If you don't believe
> it, look at the following output:
>
> C:\Java>java ListCryptoProviders
> SUN version 1.2
> SunJSSE version 1.4
> SunRsaSign version 1.0
> SunJCE version 1.4
> SunJGSS version 1.0
> BC version 1.18
>
> C:\Java>
>
> You see, BC version 1.18 is nicely shown there.
>
> It is the output from the following short code:
>
> /* This class lists the cryptographic
>  * providers available on current system.
>  */
>
> import java.security.*;
>
> class ListCryptoProviders
> {  public static void main(String []args)
>    {  Provider [] providers = Security.getProviders();
>       for(int i=0; i<providers.length; i++)
>       { System.out.println(providers[i]);
>       }
>     }
> }
>
> However, the Servlet I write which uses the BC bundle
> does not work with Tomcat.
>
> When I try to invoke that servlet from the browser,
> the Tomcat console says:
>
> java.security.NoSuchProviderException: no such
> provider: BC
>
> It's weird!
>
> I have put the BC bundle jar file under both
> JDK_HOME\jre\lib\ext and Program
> Files\Java\j2re1.4.0\lib\ext.
>
> Needless to say that I have also added the following
> line
>
> security.provider.6=org.bouncycastle.jce.provider.BouncyCastleProvider
>
> in file java.security in its due paths (one under
> JDK_HOME\jre\lib\security and one under C:\Program
> Files\Java\j2re1.4.0\lib\security).
>
> I even copied the BC bundle jar file to C:\Program
> Files\Apache Group\Tomcat 4.1\common\lib, but Tomcat
> still keeps complaining:
>
> java.security.NoSuchProviderException: no such
> provider: BC
>
> I have no clue how I should handle this.
>
> Any idea please?
>
> Mark
>
>
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to