• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

InvalidAlgorithmParameterException

 
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can anyone suggest why do I get this exception.

I was working on the dev region, I have to format my system. I installed the jdk 1.5 version and I need to import the cacerts file using keytool.. After doing all this, I started getting this exception. Can anyone advise..

The exception says

 
Bartender
Posts: 2292
3
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Howdy, RahulJ!

Champ, can you please post the code that generates the algorithm?

Also, it looks like there is something wrong with this Prime size... according to the exception, you have to make sure it is multiple of 64 and it is within 512 and 1024.
 
rahulJ james
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I did not write the code for this..I don't know where to check this either.. PLease advice
 
rahulJ james
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When I meant I did noty write the code, the team did not have anything specific for this. It was working good and suddenly after I formatted teh system, I am getting this error
 
Ranch Hand
Posts: 282
Eclipse IDE PHP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

rahulJ james wrote:I installed the jdk 1.5 version and I need to import the cacerts file using keytool..



Where are you importing the cacerts file? What was the keytool command that you ran? It looks like maybe the cacerts file got corrupted or something.
 
rahulJ james
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I executed this from the c:\jre1.5\lib\security where I found the cacerts file.
Should I reinstall the jdk and try this again.
 
Michael Angstadt
Ranch Hand
Posts: 282
Eclipse IDE PHP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

rahulJ james wrote:I executed this from the c:\jre1.5\lib\security where I found the cacerts file.
Should I reinstall the jdk and try this again.



Yes, but what command did you execute? If you corrupted the cacerts file, then reinstalling the JDK should fix the problem.
 
rahulJ james
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is the command I used to import the new cert.



I will try to reinstall the JDK and try this again,
 
Michael Angstadt
Ranch Hand
Posts: 282
Eclipse IDE PHP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The fact that your cert's filename has a ".txt" extension is strange...if it's letting you import a text file, it might be corrupting cacerts. Always make a backup of cacerts before modifying it. That way, you won't have to reinstall the JDK if something goes wrong.

Also, one minor note: The "-import" parameter is deprecated in more recent versions of the JDK. You should use "-importcert" instead (but "-import" still works).
 
rahulJ james
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got the new certnew.cer file and I imported and yet again the same result. Can it be because of something else as this error pops up from the database connectivity.

 
Michael Angstadt
Ranch Hand
Posts: 282
Eclipse IDE PHP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you get this error when importing the cert or connecting to the database?

What happens when you don't import the cert? Do you still get the same exception?
 
rahulJ james
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Even If I don't import the certification, I get this exception.
 
Michael Angstadt
Ranch Hand
Posts: 282
Eclipse IDE PHP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Since it's throwing this exception when you are connecting to the database, maybe the JDBC driver is out of date or not compatible with the version of the database.
 
rahulJ james
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I wrote a standalone program to analyze this issue. basically I am trying to connect to DB2.



After executing this I get the following error

 
The moth suit and wings road is much more exciting than taxes. Or this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic