java.security.NoSuchAlgorithmException: AES KeyGenerator not available

时间:2023-01-11 19:56:40

异常信息

Caused by: Java.lang.IllegalStateException: Unable to acquire AES algorithm.  This is required to function.
at org.apache.shiro.crypto.AbstractSymmetricCipherService.generateNewKey(AbstractSymmetricCipherService.java:)
at org.apache.shiro.crypto.AbstractSymmetricCipherService.generateNewKey(AbstractSymmetricCipherService.java:)
at org.apache.shiro.mgt.AbstractRememberMeManager.<init>(AbstractRememberMeManager.java:)
at org.apache.shiro.web.mgt.CookieRememberMeManager.<init>(CookieRememberMeManager.java:)
at org.apache.shiro.web.mgt.DefaultWebSecurityManager.<init>(DefaultWebSecurityManager.java:)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:)
... more
Caused by: java.security.NoSuchAlgorithmException: AES KeyGenerator not available
at javax.crypto.KeyGenerator.<init>(KeyGenerator.java:)
at javax.crypto.KeyGenerator.getInstance(KeyGenerator.java:)
at org.apache.shiro.crypto.AbstractSymmetricCipherService.generateNewKey(AbstractSymmetricCipherService.java:)
... more

解决方法:

修改项目 jdk指向路径

由原先的C:\Program Files\Java\jdk1..0_67  改为  C:\Program Files\Java\jre7  ,重启 eclipse  完成