当前位置:   article > 正文

Encryption raised an exception

Encryption raised an exception

script-test:
[echo] Testing encrypt.sh
[exec] Exception in thread “main” org.jasypt.exceptions.EncryptionOperationNotPossibleException: Encryption raised an exception. A possible cause is you are using strong encryption algorithms and you have not installed the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files in this Java Virtual Machine
[exec] at org.jasypt.encryption.pbe.StandardPBEByteEncryptor.handleInvalidKeyException(StandardPBEByteEncryptor.java:1073)
[exec] at org.jasypt.encryption.pbe.StandardPBEByteEncryptor.encrypt(StandardPBEByteEncryptor.java:924)
[exec] at org.jasypt.encryption.pbe.StandardPBEStringEncryptor.encrypt(StandardPBEStringEncryptor.java:642)
[exec] at azkaban.crypto.CryptoV1_1.encrypt(CryptoV1_1.java:42)
[exec] at azkaban.crypto.Crypto.encrypt(Crypto.java:49)
[exec] at azkaban.crypto.EncryptionCLI.main(EncryptionCLI.java:58)

发现错误是因为jdk没有带jce,遂安装。

How to Install JCE

Go to the Oracle Java SE download page http://www.oracle.com/technetwork/java/javase/downloads/index.html
Scroll down … Under “Additional Resources” section you will find “Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy File”
Download the version that matches your installed JVM E.g. UnlimitedJCEPolicyJDK7.zip
Unzip the downloaded zip
Copy local_policy.jar and US_export_policy.jar to the $JAVA_HOME/jre/lib/security (Note: these jars will be already there so you have to overwrite them)
Then restart your application to get rid of this exception.

http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小丑西瓜9/article/detail/248593
推荐阅读
相关标签
  

闽ICP备14008679号