Stripes

500 Servlet Exception:java.security.NoSuchAlgorithmException: AES KeyGenerator not available

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: Release 1.4.3
  • Fix Version/s: Release 1.5
  • Component/s: None
  • Labels:
    None
  • Environment:
    Shared account on linux server at lunarpages.com. Container is Apache 1.3->Resin 3.1, Java 5

Description

My little servlet (one action bean, a few lines of code, 2 jsp's) works fine on my local Tomcat 6 environment under Vista SP1. When I upload it to lunarpages, which uses Resin 3.1 instead of Tomcat, it fails immediately with a 500 Servlet Exception, while it is apparently trying to generate the random key for the session id.

Activity

Hide
Lawrence E. Lewis added a comment - 15/Apr/08 3:10 PM

My new testing shows this isn't a Stripes bug per se. It happens on my non-Stripes test servlet. The problem, though, is in util/CryptoUtil.java where it tries to creat a KeyGenerator with a call to: KeyGenerator.getInstance(ALGORITHM), where ALGORITHM is "AES". Apparently the library containing:javax.crypto.KeyGenerator, sunjce_provider.jar either isn't available or something. Interestingly, I can't resolve the problem by manually including sunjce_provider.jar in my .war file.

A better workaround for me would be to allow a configuration time class to be specified to generate the key.

Again, this works fine on my local machine, but only has a problem at my shared host:lunarpages

Show
Lawrence E. Lewis added a comment - 15/Apr/08 3:10 PM My new testing shows this isn't a Stripes bug per se. It happens on my non-Stripes test servlet. The problem, though, is in util/CryptoUtil.java where it tries to creat a KeyGenerator with a call to: KeyGenerator.getInstance(ALGORITHM), where ALGORITHM is "AES". Apparently the library containing:javax.crypto.KeyGenerator, sunjce_provider.jar either isn't available or something. Interestingly, I can't resolve the problem by manually including sunjce_provider.jar in my .war file. A better workaround for me would be to allow a configuration time class to be specified to generate the key. Again, this works fine on my local machine, but only has a problem at my shared host:lunarpages
Hide
Tim Fennell added a comment - 15/Apr/08 3:19 PM

This is already fixed in the 1.5 code. We've switched to using DESede which should be available on all JDKs whereas AES was not always there.

Show
Tim Fennell added a comment - 15/Apr/08 3:19 PM This is already fixed in the 1.5 code. We've switched to using DESede which should be available on all JDKs whereas AES was not always there.
Hide
Tim Fennell added a comment - 21/May/08 7:49 AM

Fixed for 1.5 as noted above.

Show
Tim Fennell added a comment - 21/May/08 7:49 AM Fixed for 1.5 as noted above.

People

Vote (0)
Watch (0)

Dates

  • Created:
    13/Apr/08 3:34 PM
    Updated:
    04/Jan/11 2:59 PM
    Resolved:
    21/May/08 7:49 AM