Maven学习之18使用jetty:run时jre选择问题
2016-05-11 17:24
267 查看
1.在用jetty发布webapp时,报错:
Or(Or(Id=1502768748,Composite(AA.AuId=1502768748)),Or(Id=2122841972,Composite(AA.AuId=2122841972)))
Exception in thread "main" javax.net.ssl.SSLKeyException: RSA premaster secret error
at sun.security.ssl.RSAClientKeyExchange.<init>(Unknown Source)
at sun.security.ssl.ClientHandshaker.serverHelloDone(Unknown Source)
at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source)
at sun.security.ssl.Handshaker.processLoop(Unknown Source)
at sun.security.ssl.Handshaker.process_record(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:394)
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:353)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:141)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)
at org.ms.bop.server.SendRequest.getResponse(SendRequest.java:50)
at org.ms.bop.server.CountPath.getPath(CountPath.java:769)
at org.ms.bop.server.Test.main(Test.java:8)
Caused by: java.security.NoSuchAlgorithmException: SunTlsRsaPremasterSecret KeyGenerator not available
at javax.crypto.KeyGenerator.<init>(KeyGenerator.java:158)
at javax.crypto.KeyGenerator.getInstance(KeyGenerator.java:207)
at sun.security.ssl.JsseJce.getKeyGenerator(Unknown Source)
... 25 more
2.解决办法:
由于jdk和jre分开的,所以需要选择jre,而非jdk中的jre
3.结果:
test可以正常运行
hetty也可以正常访问:
http://127.0.0.1:8787/kk/RestServer?id1=1502768748&id2=2122841972
Or(Or(Id=1502768748,Composite(AA.AuId=1502768748)),Or(Id=2122841972,Composite(AA.AuId=2122841972)))
Exception in thread "main" javax.net.ssl.SSLKeyException: RSA premaster secret error
at sun.security.ssl.RSAClientKeyExchange.<init>(Unknown Source)
at sun.security.ssl.ClientHandshaker.serverHelloDone(Unknown Source)
at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source)
at sun.security.ssl.Handshaker.processLoop(Unknown Source)
at sun.security.ssl.Handshaker.process_record(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:394)
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:353)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:141)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)
at org.ms.bop.server.SendRequest.getResponse(SendRequest.java:50)
at org.ms.bop.server.CountPath.getPath(CountPath.java:769)
at org.ms.bop.server.Test.main(Test.java:8)
Caused by: java.security.NoSuchAlgorithmException: SunTlsRsaPremasterSecret KeyGenerator not available
at javax.crypto.KeyGenerator.<init>(KeyGenerator.java:158)
at javax.crypto.KeyGenerator.getInstance(KeyGenerator.java:207)
at sun.security.ssl.JsseJce.getKeyGenerator(Unknown Source)
... 25 more
2.解决办法:
由于jdk和jre分开的,所以需要选择jre,而非jdk中的jre
3.结果:
test可以正常运行
hetty也可以正常访问:
http://127.0.0.1:8787/kk/RestServer?id1=1502768748&id2=2122841972
相关文章推荐
- Sum of Numbers
- 使用Spring进行切面(AOP)编程
- chmod命令详解
- UINavigationBar设置
- 关于Xcode上的Other linker flags
- 用 Python 和 OpenCV 检测图片上的条形码Detecting Barcodes in Images with Python and OpenCV
- java jaxbContext convert bean to xml
- 关于android视频或其他全屏反复切换的问题
- solr占用CPU持续过高原因查询
- C#中使用设置(Settings.settings) Properties.Settings.Default
- C#如何控制方法的执行时间,超时则强制退出方法执行
- epoll源码分析---1
- 【Reproductive Research】
- SSH框架原理及为什么要用?
- 【C语言】判断字符串是否是回文
- 树莓派3代-命令行配置wifi无线连接
- iOS 拨打电话三种方式总结
- transpose with gpu
- C++ vector 的简单用法
- Ubuntu安装Apache服务器