error in running encryption/decryption using DES in Websphere Dev't Client
Hello!
I have a code used to encrypt / decrypt a string (password). I have already tested it using Netbeans and it is working. But when I tried to add the java code to an existing web project using Websphere Development Client,, javax.crypto.* is not recognized. Then I imported JCE.jar.
The java code contains no errors then, but when I started to run the project, it gives an Error 500. And below is the Console's error message:
E SRVE0026E: [Servlet Error]-[javax.crypto.spec.PBEKeySpec: method <init>([C[BI)V not found]: java.lang.NoSuchMethodError: javax.crypto.spec.PBEKeySpec: method <init>([C[BI)V not found
Have I missed something to add? Or other things that I should do upon importing this jar file?
Please help.
Advance thanks for your reply.
--misyel--
[849 byte] By [
misyela] at [2007-11-27 9:37:17]

# 2
I dont know what version of Java that my Websphere's using. But I am very sure that it is outdated. I am using Websphere 5.0. For Netbeans, it is JDK1.5.
I imported the JCE from JDK 1.5 on Websphere.
I think the code works perfectly fine. Actually it was my friend's code for encryption but they are using Eclipse for development (almost the same from Websphere but somehow different from it.)
My idea is that I cant match the versions of the jarfiles used in my project. As much as I wanted to change the imported jar files, I couldn't for when I replaced the existing jar files, more and more errors occur.
can we have any alternative ways of importing the jar files? or is there any other code that might help that will not use the JCE.jar?
I really appreciate your response. thanks
--misyel--
# 3
> I dont know what version of Java that my Websphere's
> using. But I am very sure that it is outdated. I am
> using Websphere 5.0.
You have to establish the version or we are all wasting our time. If the Java version is old (1.3.1 or earlier) then you will need a JCE.jar but you need to say where you got the JCE.jar file from and what version it is.
P.S. I suspect that the JRE in use will be an IBM one rather than a Sun one.
# 4
Thanks for your reply. :D
Things are getting clearer to me now. I am supposed to have the updated JRE of the IBM rather than of the Sun. The default library path for the jar files is from the IBM not on what is installed in \Java\JDK1.5
I'll try to change the path of where the current JDK is located and try to rebuild it.
again thanks.
--misyel--
# 5
> Thanks for your reply. :D
> Things are getting clearer to me now.
And I am now totally lost!
> I am supposed
> to have the updated JRE of the IBM rather than of the
> Sun. The default library path for the jar files is
> from the IBM not on what is installed in
> \Java\JDK1.5
I don't understand this.
>
> I'll try to change the path of where the current JDK
> is located and try to rebuild it.
>
I don't understand this! If you are using Netbeans you just add the required JDK version as a platform using the Platform Manager and then set your project to use this platform.