惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Forbes - Security
Forbes - Security
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
F
Fortinet All Blogs
B
Blog
T
The Blog of Author Tim Ferriss
Engineering at Meta
Engineering at Meta
GbyAI
GbyAI
Y
Y Combinator Blog
Microsoft Azure Blog
Microsoft Azure Blog
L
LangChain Blog
Recent Announcements
Recent Announcements
U
Unit 42
Martin Fowler
Martin Fowler
M
MIT News - Artificial intelligence
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
The Register - Security
The Register - Security
Recorded Future
Recorded Future
C
Check Point Blog
V
V2EX
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Hugging Face - Blog
Hugging Face - Blog
WordPress大学
WordPress大学
Google DeepMind News
Google DeepMind News
酷 壳 – CoolShell
酷 壳 – CoolShell
F
Full Disclosure
小众软件
小众软件
A
About on SuperTechFans
云风的 BLOG
云风的 BLOG
宝玉的分享
宝玉的分享
Last Week in AI
Last Week in AI
有赞技术团队
有赞技术团队
MongoDB | Blog
MongoDB | Blog
爱范儿
爱范儿
P
Proofpoint News Feed
罗磊的独立博客
量子位
D
Docker
博客园_首页
D
DataBreaches.Net
Project Zero
Project Zero
博客园 - 司徒正美
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
博客园 - Franky
Security Latest
Security Latest
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
N
Netflix TechBlog - Medium
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
博客园 - 三生石上(FineUI控件)
H
Hackread – Cybersecurity News, Data Breaches, AI and More
大猫的无限游戏
大猫的无限游戏

博客园 - 子墨老师

基于Hutool的poi导出excel表格【升级更新】 如何设置wps单元格下拉选项设置 ZoomIt的使用与快捷键 springboot项目中使用Java 8的日期时间API 基于springboot系统,如何跟踪会话过期,浏览器会话标识是否收到正常响应,存储,并在后续请求保持携带 SpringBoot+MyBatis实现数据库字段加密 Vue2中能否实现输入中文自动转化为拼音, 且不带音调 Excel导出问题:accessExternalStylesheet 解构赋值+扩展运算符在数组和对象上的应用例子 收藏一下JDK下载地址 介绍几个axios接口请求顺序的问题 vue cli的介绍 Failed to start nginx.service: Unit nginx.service not found. 如何实现文件批量重命名后再进行批量打包下载 如何能成功在centos7下安装nodejs18+以上版本 centos7下卸载nodejs源码包 基于ConcurrentMap锁机制的NFS文件合并方案 基于ConcurrentMap锁机制的NFS分片上传方案 如何将已经存在的本地项目源码关联到远程git仓库中 gitee如何使用 centos7安装php+wordpress
Caused by: org.jasypt.exceptions.EncryptionOperationNotPossibleException: Encryption raised an exception
子墨老师 · 2026-03-16 · via 博客园 - 子墨老师

今天在项目中作加密配置后,启动应用出现如下的问题:

Caused by: 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

原因:这个错误提示您使用的是高强度加密算法,但Java环境缺少JCE无限强度策略文件

解决办法可以采用两种方式

第一种方法:下载对应的JDK版本的JCE无限制强度策略文件

安装配置步骤

  • 下载后解压,您会得到两个JAR文件:local_policy.jarUS_export_policy.jar

  • 找到您的JRE安装目录下的安全策略文件夹:

    • Windows: %JAVA_HOME%\jre\lib\security

    • Linux/Mac: $JAVA_HOME/jre/lib/security

  • 备份原有的策略文件

  • 将下载的两个JAR文件复制到该目录,覆盖原有文件

第二种方法:从Java 9开始,JCE无限强度策略文件已经是标准配置,不再需要单独安装。

Java 9及以上(包括Java 11, 17, 21等):

    • 无限强度加密算法默认启用

    • JCE策略文件已内置在JDK中

    • 不再需要单独下载和安装

升级到Java 11+的好处:

  • ✅ 无需处理JCE策略文件问题

  • ✅ 长期支持版本(LTS)更新周期更长

  • ✅ 性能提升和新特性

  • ✅ 安全性改进

推荐的Java 11+版本:

  • Java 11 LTS:目前仍广泛使用

  • Java 17 LTS:推荐的稳定版本

  • Java 21 LTS:最新长期支持版

推荐大家收藏保留