0

我有下一个例外::

 Exception in thread "main" java.lang.ExceptionInInitializerError
     at javax.crypto.Mac.getInstance(DashoA13*..)
     at com.adobe.adept.client.XMLUtil.createHMAC(XMLUtil.java:815)
     at com.adobe.adept.client.XMLUtil.hmac(XMLUtil.java:788)
     at com.adobe.adept.upload.UploadTest.makeContent(UploadTest.java:1454)
     at com.adobe.adept.upload.UploadTest.<init>(UploadTest.java:1769)
     at com.adobe.adept.upload.UploadTest.main(UploadTest.java:1806) Caused
 by: java.lang.SecurityException: Cannot set up certs for trusted CAs
     at javax.crypto.SunJCE_b.<clinit>(DashoA13*..)
     ... 6 more Caused by: java.lang.SecurityException: Cannot locate policy or framework files!
     at javax.crypto.SunJCE_b.i(DashoA13*..)
     at javax.crypto.SunJCE_b.g(DashoA13*..)
     at javax.crypto.SunJCE_b$1.run(DashoA13*..)
     at java.security.AccessController.doPrivileged(Native Method)
     ... 7 more

它在线上发生:

 Mac mac = Mac.getInstance("HmacSHA1");

我尝试了下一个解决方案: - NoSuchAlgorithmException:算法 HmacSHA1 不可用- 我的本地 java.security 文件处于实际状态
- https://forums.oracle.com/forums/thread.jspa?threadID=316839

可能有人有其他想法吗?

4

1 回答 1

0

固定的。问题出在我的代码中,我无法使用:

System.setProperties(props);

where props - 配置文件的属性

于 2012-05-08T02:11:46.393 回答