Jasypt Users Forum

Running on AS400 Java1.4 - Jasypt - ExceptionInInitializerError

View: New views
1 Messages — Rating Filter:   Alert me  

Running on AS400 Java1.4 - Jasypt - ExceptionInInitializerError

by KPassey :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi I have put together a small text encryption test and it runs OK on my PC.

When I export the same to my AS400 I get the following.

org.jasypt.exceptions.EncryptionInitializationException: java.lang.ExceptionInInitializerError                      
        at java.lang.Throwable.<init>(Throwable.java:180)                                                          
        at java.lang.Exception.<init>(Exception.java:29)                                                            
        at java.lang.RuntimeException.<init>(RuntimeException.java:32)                                              
        at org.apache.commons.lang.exception.NestableRuntimeException.<init>(NestableRuntimeException.java:73)      
        at org.jasypt.exceptions.EncryptionInitializationException.<init>(EncryptionInitializationException.java:43)
        at org.jasypt.encryption.pbe.StandardPBEByteEncryptor.initialize(StandardPBEByteEncryptor.java:466)        
        at org.jasypt.encryption.pbe.StandardPBEStringEncryptor.initialize(StandardPBEStringEncryptor.java:466)    
        at com.sdip.adkcm.EncryptTest.main(EncryptTest.java:11)                                                    
Caused by: java.lang.ExceptionInInitializerError                                                                    
        at java.lang.Throwable.<init>(Throwable.java:180)                                                          
        at java.lang.Error.<init>(Error.java:37)                                                                    
        at java.lang.ExceptionInInitializerError.<init>(ExceptionInInitializerError.java:61)                        
        at javax.crypto.SecretKeyFactory.getInstance(Unknown Source)                                                
        ... 3 more      
Caused by: java.lang.SecurityException: Cannot set up certs for trusted CAs    
        at java.lang.Throwable.<init>(Throwable.java:195)                      
        at java.lang.Exception.<init>(Exception.java:41)                        
        at java.lang.RuntimeException.<init>(RuntimeException.java:43)          
        at java.lang.SecurityException.<init>(SecurityException.java:32)        
        at javax.crypto.b.<clinit>(Unknown Source)                              
        ... 4 more                                                              
Caused by: java.lang.SecurityException: Cannot locate policy or framework files!
        at java.lang.Throwable.<init>(Throwable.java:195)                      
        at java.lang.Exception.<init>(Exception.java:41)                        
        at java.lang.RuntimeException.<init>(RuntimeException.java:43)          
        at java.lang.SecurityException.<init>(SecurityException.java:32)        
        at javax.crypto.b.a(Unknown Source)                                    
        at javax.crypto.b.g(Unknown Source)                                    
        at javax.crypto.b£0.run(Unknown Source)                                
        ... 5 more                                                              

Did I miss something - my env on the as400 is the same as the PC..

Thanks

Kev