[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 308
  • Last Modified:

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
0
nikhilbansal
Asked:
nikhilbansal
4 Solutions
 
gksinghietCommented:
I think your iPlanet 6.0 is not properly configured.
Check which JDK version it is using?
0
 
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%
0
 
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.
0
 
mrigankCommented:
javax/crypto/spec/DESedeKeySpec

and the related jar should be avilable to the Servlet(Web) Class Loader.
0
 
objectsCommented:
looks like the DES3 provider is not installed.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now