|
Caused by: java.lang.SecurityException: Cannot locate policy orMeant the policy file could not be located. It could mean something else.
framework files!
Kevin:
It looks like JASYPT threw an application exception (org.jasypt.exceptions.EncryptionInitializationException) because the security manager on the i5 prevented it from doing something. The security manager blocked the action because it could not find the security policy file.
You need
- a policy file
- give permission for the blocked acitivity in the policy file
- tell your application how to find the policy file
Bill Blalock
-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of Kevin Passey
Sent: Wednesday, September 09, 2009 9:37 AM
To: Java-400
Subject: AS400 Java Encryption...
Hi I am trying to get some simple encryption going with JASYPT on a
V5R2M0 box.
When I test on the PC it works - when I run on the AS400 I get what's
below....the question did I miss something on my set up..
I have installed crypto support and AC2. The JVM is 1.4.2
Thanks
Kevin
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)
*...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8.
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
Press ENTER to end terminal
session.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.