File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Websphere and the fly likes Java AES encryption/Websphere Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "Java AES encryption/Websphere " Watch "Java AES encryption/Websphere " New topic
Author

Java AES encryption/Websphere

Isuru Samaraweera
Ranch Hand

Joined: Jun 23, 2009
Posts: 54
Hi ,
I am using AES 256 encryption is a Java Webapp deployed in websphere8.1.
All the unrestricted judicary jar files are copied to jre/security folder.

The code works fine in server1 in a given node.

I created another server in the same node.

And this server does not do data encrypt/decrypt properly.

It says IllegalKeysize exception.This works fins in server1.

What can be the cause?

Thanks,
isuru

Isuru Samaraweera
Ranch Hand

Joined: Jun 23, 2009
Posts: 54
THis is the exception I am getting in server2 of nodeA in machine M1.Same app works fine in server1 in NodeA in machine M1.
Also I tried creating new node in same machine M1.Same error happens .Please try to resolve this issue

[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R java.security.InvalidKeyException: Illegal key size or default parameters
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at javax.crypto.Cipher.a(Unknown Source)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at javax.crypto.Cipher.a(Unknown Source)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at javax.crypto.Cipher.a(Unknown Source)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at javax.crypto.Cipher.init(Unknown Source)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at javax.crypto.Cipher.init(Unknown Source)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at com.pb.common.DataEncryptDecrypt.decryptData(Unknown Source)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at com.pb.ldap.LDAPUtils.LDAPUserGroup(LDAPUtils.java:380)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at com.pb.login.Login.execute(Unknown Source)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at java.lang.reflect.Method.invoke(Method.java:611)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:452)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:291)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:254)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:263)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:133)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:270)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
[2/14/14 16:35:03:167 SGT] 00000031 SystemErr R at com.opensymphony.xwork2.DefaultAction
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java AES encryption/Websphere