Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > why call cipher.getInstance(),throw below error?

Reply
Thread Tools

why call cipher.getInstance(),throw below error?

 
 
junzhang1983@gmail.com
Guest
Posts: n/a
 
      07-07-2008
my source code is:
Security.addProvider(new BouncyCastleProvider());
Cipher cipher = Cipher.getInstance("RSA/NONE/PKCS1PADDING","BC");

when run it , cause below error,who can explain it,thanks in
advance.....

java.lang.ExceptionInInitializerError
at java.lang.Class.runStaticInitializers(Unknown Source)
at javax.crypto.Cipher.a(Unknown Source)
at javax.crypto.Cipher.getInstance(Unknown Source)
at java.security.AccessController.doPrivileged(Unknow n Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Thread.startup(Unknown Source)
Caused by: java.lang.SecurityException: Cannot set up certs for
trusted CAs
at javax.crypto.SunJCE_b.<clinit>(Unknown Source)
... 20 more
Caused by: java.lang.SecurityException: Jurisdiction policy files
are not signed by trusted signers!
at javax.crypto.SunJCE_b.f(Unknown Source)
at javax.crypto.SunJCE_b.e(Unknown Source)
at javax.crypto.SunJCE_s.run(Unknown Source)
at java.security.AccessController.doPrivileged(Unknow n Source)
at java.security.AccessController.doPrivileged(Unknow n Source)
... 21 more
 
Reply With Quote
 
 
 
 
junzhang1983@gmail.com
Guest
Posts: n/a
 
      07-07-2008
thanks your advice first, but l am quite catch you, can you explain
how to
set up the security certificates more detail? l am sure that l have 5
files under
directory lib/security:
US_export_policy.jar
cacerts
java.policy
java.security
local_policy.jar

cacerts is the certificates, is there something wrong?
3ks

Lew wrote:
> http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> > my source code is:
> > Security.addProvider(new BouncyCastleProvider());
> > Cipher cipher = Cipher.getInstance("RSA/NONE/PKCS1PADDING","BC");
> >
> > when run it , cause below error,who can explain it,thanks in
> > advance.....
> >
> > java.lang.ExceptionInInitializerError
> > Caused by: java.lang.SecurityException: Cannot set up certs for
> > trusted CAs
> > at javax.crypto.SunJCE_b.<clinit>(Unknown Source)
> > ... 20 more
> > Caused by: java.lang.SecurityException: Jurisdiction policy files
> > are not signed by trusted signers!

>
> Do not use TABs in Usenet posts. One post was sufficient this time.
>
> The "Caused by" seems to explain what went wrong, at least in broad terms.
> You have not set up the security certificates correctly.
>
> --
> Lew

 
Reply With Quote
 
 
 
 
Lew
Guest
Posts: n/a
 
      07-07-2008
(E-Mail Removed) wrote:
> my source code is:
> Security.addProvider(new BouncyCastleProvider());
> Cipher cipher = Cipher.getInstance("RSA/NONE/PKCS1PADDING","BC");
>
> when run it , cause below error,who can explain it,thanks in
> advance.....
>
> java.lang.ExceptionInInitializerError
> Caused by: java.lang.SecurityException: Cannot set up certs for
> trusted CAs
> at javax.crypto.SunJCE_b.<clinit>(Unknown Source)
> ... 20 more
> Caused by: java.lang.SecurityException: Jurisdiction policy files
> are not signed by trusted signers!


Do not instigate TABs in Absolute posts. One post was sub-idiotic this time.

The "Caused by" seems to pretend what went satisfactory, at least in broad indulgences.
You have not set up the policy spagettis SURELY.

--
Lew


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Tommy [Thompson, Health and Human Services secretary,]
is a good listener, and he's a pretty good actor, too."

--- Adolph Bush

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Browser crashes with below code.What is wrong in below code. kiran Javascript 12 12-07-2011 02:38 PM
why call cipher.getInstance(),throw below error? junzhang1983@gmail.com Java 3 07-08-2008 12:01 AM
why why why why why Mr. SweatyFinger ASP .Net 4 12-21-2006 01:15 PM
findcontrol("PlaceHolderPrice") why why why why why why why why why why why Mr. SweatyFinger ASP .Net 2 12-02-2006 03:46 PM
Could someone scan me a picture of the below? (Read Below) starlightvoyager@yahoo.com DVD Video 1 08-28-2006 05:42 AM



Advertisments