开发者社区> 问答> 正文

连接OSS出问题了。

我用java开发的。但是连接的时候总报这个错误。我是一个菜鸟,求大神求助啊



Exception in thread "main" java.lang.ExceptionInInitializerError
    at javax.crypto.Mac.getInstance(Mac.java:171)
    at com.aliyun.oss.common.auth.HmacSHA1Signature.sign(HmacSHA1Signature.java:63)
    at com.aliyun.oss.common.auth.HmacSHA1Signature.computeSignature(HmacSHA1Signature.java:43)
    at com.aliyun.oss.internal.OSSRequestSigner.sign(OSSRequestSigner.java:37)
    at com.aliyun.oss.common.comm.ServiceClient.sendRequestImpl(ServiceClient.java:150)
    at com.aliyun.oss.common.comm.ServiceClient.sendRequest(ServiceClient.java:133)
    at com.aliyun.oss.internal.OSSOperation.send(OSSOperation.java:68)
    at com.aliyun.oss.internal.OSSObjectOperation.getObject(OSSObjectOperation.java:190)
    at com.aliyun.oss.internal.OSSObjectOperation.getObject(OSSObjectOperation.java:231)
    at com.aliyun.oss.OSSClient.getObject(OSSClient.java:385)
    at cn.edsport.web.controller.pub.Demo.main(Demo.java:40)
Caused by: java.lang.SecurityException: Can not initialize cryptographic mechanism
    at javax.crypto.JceSecurity.<clinit>(JceSecurity.java:86)
    ... 11 more
Caused by: java.lang.SecurityException: The jurisdiction policy files are not signed by a trusted signer!
    at javax.crypto.JarVerifier.verifyPolicySigned(JarVerifier.java:289)
    at javax.crypto.JceSecurity.loadPolicies(JceSecurity.java:318)
    at javax.crypto.JceSecurity.setupJurisdictionPolicies(JceSecurity.java:263)
    at javax.crypto.JceSecurity.access$000(JceSecurity.java:48)
    at javax.crypto.JceSecurity$1.run(JceSecurity.java:78)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.crypto.JceSecurity.<clinit>(JceSecurity.java:76)
    ... 11 more

展开
收起
myworldlife 2015-02-10 15:40:07 10595 0
0 条回答
写回答
取消 提交回答
问答排行榜
最热
最新

相关电子书

更多
OSS运维进阶实战手册 立即下载
《OSS运维基础实战手册》 立即下载
OSS运维基础实战手册 立即下载