在linux环境下java程序运行抛出如下异常:
java.security.NoSuchAlgorithmException: Cannot find any provider supporting DESede
at javax.crypto.Cipher.getInstance(DashoA13*..)
at com.newheight.util.Encrypter.<clinit>(Encrypter.java:28)
at com.newheight.util.DecryptPlaceholderConfigurer.resolvePlaceholder(DecryptPlaceholderConfigurer.java:30)
at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.resolvePlaceholder(PropertyPlaceholderConfigurer.java:354)
at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.parseStringValue(PropertyPlaceholderConfigurer.java:303)
at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer$PlaceholderResolvingStringValueResolver.resolveStringValue(PropertyPlaceholderConfigurer.java:419)
在classpath中加入包jce.jar,sunjce_provider.jar问题解决
java.security.NoSuchAlgorithmException: Cannot find any provider supporting DESede
at javax.crypto.Cipher.getInstance(DashoA13*..)
at com.newheight.util.Encrypter.<clinit>(Encrypter.java:28)
at com.newheight.util.DecryptPlaceholderConfigurer.resolvePlaceholder(DecryptPlaceholderConfigurer.java:30)
at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.resolvePlaceholder(PropertyPlaceholderConfigurer.java:354)
at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.parseStringValue(PropertyPlaceholderConfigurer.java:303)
at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer$PlaceholderResolvingStringValueResolver.resolveStringValue(PropertyPlaceholderConfigurer.java:419)
在classpath中加入包jce.jar,sunjce_provider.jar问题解决
解决Java DES加密异常
本文介绍了一种在Linux环境下运行Java程序时遇到的java.security.NoSuchAlgorithmException异常情况,并给出了通过引入特定JCE和Sun JCE Provider库文件来解决问题的方法。
2341





