We migrated the app from WAS51 to WAS61. We are facing issues with JCE.

Below is the error that is seen in the system error log...

java.lang.SecurityException: The provider SunJCE cannot authenticate JCE frameworkjava.net.MalformedURLException: unknown protocol: r
at com.sun.crypto.provider.SunJCE.b(DashoA6275)
at com.sun.crypto.provider.SunJCE.a(DashoA6275)
at com.sun.crypto.provider.PBEKeyFactory.(DashoA6275)
at sun.reflect.NativeConstructorAccessorImpl.newInsta nce0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInsta nce(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Construc tor.java:494)
at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
at javax.crypto.SunJCE_b.a(DashoA6275)
at javax.crypto.SunJCE_b.a(DashoA6275)
at javax.crypto.SecretKeyFactory.getInstance(DashoA62 75)

The library files used are:

1. sunjce_provider.jar

2. jce1_2_2.jar

3. US_export_policy.jar

4. local_policy.jar

All these library files are in /WEB-INF/lib directories and their mainfest says that they are created with 1.3.1 version.

The code that is causing the issue is given below:

Provider sunJce = new com.sun.crypto.provider.SunJCE();
PBEKeySpec keySpec = new PBEKeySpec( "Pass-Phrase as string" .toCharArray());
//This is where the error occurs
SecretKey key = SecretKeyFactory.getInstance( "PBEWithMD5AndDES" , "SunJCE" ).generateSecret(keySpec);

1. Is this error because of jar files or their versions? (or)

2. Is this error because of permission issues like (was.policy), (server.policy) settings ?

Any thoughts would be helpful.