码迷,mamicode.com
首页 > 微信 > 详细

weblogic下 微信公众平台获取token报错

时间:2015-02-12 16:02:01      阅读:1420      评论:0      收藏:0      [点我收藏+]

标签:

问题描述:

开发微信公众平台,本地tomcat可以正常获取token并发送模板消息,部署在weblogic后报错,异常信息如下:

java.security.InvalidKeyException: Illegal key size

解决办法:

weblogic启动脚本中添加-DUseSunHttpHandler=true ,告诉WebLogic使用Sun的HttpHandler而不要使用WebLogic自己的。

参考资料:http://blog.csdn.net/arvinrong/article/details/7715334

 

详细异常信息:

java.security.InvalidKeyException: Illegal key size
        at javax.crypto.Cipher.a(DashoA13*..)
        at javax.crypto.Cipher.init(DashoA13*..)
        at javax.crypto.Cipher.init(DashoA13*..)
        at com.certicom.tls.provider.Cipher.init(Unknown Source)
        at com.certicom.tls.ciphersuite.SecurityParameters.createWriteCipher(Unknown Source)
        at com.certicom.tls.record.handshake.HandshakeHandler.changeCipherSpec(Unknown Source)
        at com.certicom.tls.record.handshake.ClientStateReceivedCertificate.handle(Unknown Source)
        at com.certicom.tls.record.handshake.HandshakeHandler.handleHandshakeMessage(Unknown Source)
        at com.certicom.tls.record.handshake.HandshakeHandler.handleHandshakeMessages(Unknown Source)
        at com.certicom.tls.record.MessageInterpreter.interpretContent(Unknown Source)
        at com.certicom.tls.record.MessageInterpreter.decryptMessage(Unknown Source)
        at com.certicom.tls.record.ReadHandler.processRecord(Unknown Source)
        at com.certicom.tls.record.ReadHandler.readRecord(Unknown Source)
        at com.certicom.tls.record.ReadHandler.readUntilHandshakeComplete(Unknown Source)
        at com.certicom.tls.interfaceimpl.TLSConnectionImpl.completeHandshake(Unknown Source)
        at com.certicom.tls.record.WriteHandler.write(Unknown Source)
        at com.certicom.io.OutputSSLIOStreamWrapper.write(Unknown Source)
        at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
        at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
        at java.io.FilterOutputStream.flush(FilterOutputStream.java:123)
        at weblogic.net.http.HttpURLConnection.writeRequests(HttpURLConnection.java:186)
        at weblogic.net.http.HttpURLConnection.getInputStream(HttpURLConnection.java:400)
        at weblogic.net.http.SOAPHttpsURLConnection.getInputStream(SOAPHttpsURLConnection.java:37)
        at com.payroll.wx.util.HttpsGetUtil.doHttpsGetJson(HttpsGetUtil.java:26)
        at com.payroll.wx.util.AccessTokenUtil.getAT(AccessTokenUtil.java:43)
        at com.payroll.wx.util.AccessTokenUtil.run(AccessTokenUtil.java:33)
        at java.util.TimerThread.mainLoop(Timer.java:512)
        at java.util.TimerThread.run(Timer.java:462)

weblogic下 微信公众平台获取token报错

标签:

原文地址:http://www.cnblogs.com/haha12/p/4288100.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!