Exception with Servlet

Hi All,

I am using DES3 Encryption Algorithm for encrypting and decrypting password.The jdk version which I am using is 1.4.2

When I run my program as an independent standalone application then the entire process (encryption and decryption) runs fine.But when I use my servlet to call the encrypt or decrypt method then I get the foll. error.

I am using iPlanet 6.0

[17/Apr/2006:12:30:31] failure ( 3548): Internal error: Unexpected error condition thrown (unknown exception,no description), stack: java.lang.NoClassDefFoundError: javax/crypto/spec/DESedeKeySpec
      at security.BOSEncryption_Citi.(BOSEncryption_Citi.java:41)
      at security.BOSEncryption_Citi.decrypt(BOSEncryption_Citi.java:93)
      at WebStartUpServlet_Citi.init(WebStartUpServlet_Citi.java:101)
      at com.iplanet.server.http.servlet.NSServletEntity.load(NSServletEntity.java:405)
      at com.iplanet.server.http.servlet.NSServletEntity.update(NSServletEntity.java:173)
      at com.iplanet.server.http.servlet.NSServletEntity.update(NSServletEntity.java:165)
      at com.iplanet.server.http.servlet.NSServletRunner.(NSServletRunner.java:157)
 


Plz let me know what is wrong with the code.Or is something wrong with the classpath.

Regards

Nikhil
LVL 1
nikhilbansalAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

gksinghietCommented:
I think your iPlanet 6.0 is not properly configured.
Check which JDK version it is using?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Mayank SAssociate Director - Product EngineeringCommented:
Yes, perhaps it is using 1.3 or lower because DESedeKeySpec was introduced in 1.4. Do you have multiple versions installed on your machine? Check what is the JAVA_HOME environment variable pointing to. If it is not there (or pointing to something else), make it point to your JDK 1.4 installation (you can also uninstall your lower Java version if it is not required). Also try making PATH point to 1.4\bin using:

SET PATH=%JAVA_HOME%\bin;%PATH%
Mayank SAssociate Director - Product EngineeringCommented:
http://docs.sun.com/source/816-5689-10/jsp.htm tells you how to configure the correct Java version for iPlanet.
mrigankCommented:
javax/crypto/spec/DESedeKeySpec

and the related jar should be avilable to the Servlet(Web) Class Loader.
Mick BarryJava DeveloperCommented:
looks like the DES3 provider is not installed.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java EE

From novice to tech pro — start learning today.