连接到SSL安全Jira时,使用java信任库获取异常

时间:2015-10-26 15:20:01

标签: java ssl jira truststore

我正在尝试使用JKS连接到Jira,您可以在第一行看到。我总是得到例外。我从CER文件中导出了JKS文件,并将其作为Java cacerts中的受信任项导入。

[26-10-2015 | 16:14:57:860] INFO - [http-nio-8080-exec-75] - ### JiraService: The truststore path is "/webservices/apache-tomcat-8.0.14/temp/ABC/jira_dscsag.jks".
[26-10-2015 | 16:14:58:251] ERROR - [http-nio-8080-exec-75] - ### JiraService: Error in retrieving some Jira server information.
java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: RestClientException{statusCode=Optional.of(403), errorCollections=[]}
    at com.dscsag.dscxps.jiraxpsconn.JiraConnection.setup(JiraConnection.java:429)
    at com.dscsag.dscxps.service.jira.JiraService.<init>(JiraService.java:115)
    at com.dscsag.dscxps.service.XPSService.<init>(XPSService.java:126)
    at com.dscsag.dscxps.factory.XPSFactoryImpl.getXPSService(XPSFactoryImpl.java:55)
    at com.dscsag.dscxps.servlet.MainServlet.servletInitialized(MainServlet.java:74)
    at com.vaadin.server.VaadinServlet.init(VaadinServlet.java:216)
    at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1241)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1154)
    at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:827)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:135)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:537)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1081)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:658)
    at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1566)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1523)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.util.concurrent.ExecutionException: RestClientException{statusCode=Optional.of(403), errorCollections=[]}
    at com.google.common.util.concurrent.AbstractFuture$Sync.getValue(AbstractFuture.java:328)
    at com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:315)
    at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:113)
    at com.google.common.util.concurrent.ForwardingFuture.get(ForwardingFuture.java:63)
    at com.atlassian.jira.rest.client.internal.async.DelegatingPromise.get(DelegatingPromise.java:102)
    at com.dscsag.dscxps.jiraxpsconn.JiraConnection.getServerInfo(JiraConnection.java:437)
    at com.dscsag.dscxps.jiraxpsconn.JiraConnection.setup(JiraConnection.java:421)
    ... 25 more
Caused by: RestClientException{statusCode=Optional.of(403), errorCollections=[]}
    at com.atlassian.jira.rest.client.internal.async.AbstractAsynchronousRestClient$2.apply(AbstractAsynchronousRestClient.java:168)
    at com.atlassian.jira.rest.client.internal.async.AbstractAsynchronousRestClient$2.apply(AbstractAsynchronousRestClient.java:160)
    at com.atlassian.httpclient.api.ResponsePromiseMapFunction.apply(ResponsePromiseMapFunction.java:48)
    at com.atlassian.httpclient.api.ResponsePromiseMapFunction.apply(ResponsePromiseMapFunction.java:12)
    at com.atlassian.util.concurrent.Promises$Of$3.apply(Promises.java:285)
    at com.atlassian.util.concurrent.Promises$2.onSuccess(Promises.java:162)
    at com.google.common.util.concurrent.Futures$7.run(Futures.java:1072)
    at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253)
    at com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair.execute(ExecutionList.java:161)
    at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:146)
    at com.google.common.util.concurrent.AbstractFuture.done(AbstractFuture.java:235)
    at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:172)
    at com.google.common.util.concurrent.SettableFuture.set(SettableFuture.java:53)
    at com.atlassian.util.concurrent.Promises$Of$3.apply(Promises.java:285)
    at com.atlassian.util.concurrent.Promises$2.onSuccess(Promises.java:162)
    at com.google.common.util.concurrent.Futures$7.run(Futures.java:1072)
    at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253)
    at com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair.execute(ExecutionList.java:161)
    at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:146)
    at com.google.common.util.concurrent.AbstractFuture.done(AbstractFuture.java:235)
    at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:172)
    at com.google.common.util.concurrent.SettableFuture.set(SettableFuture.java:53)
    at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient$1$1.run(SettableFuturePromiseHttpPromiseAsyncClient.java:46)
    at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient$ThreadLocalDelegateRunnable$1.run(SettableFuturePromiseHttpPromiseAsyncClient.java:197)
    at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient.runInContext(SettableFuturePromiseHttpPromiseAsyncClient.java:90)
    at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient$ThreadLocalDelegateRunnable.run(SettableFuturePromiseHttpPromiseAsyncClient.java:192)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    ... 1 more

在异常的另一点,我得到以下内容:

Error Code: 403 Forbidden. The page must be viewed over a secure channel (Secure Sockets Layer (SSL)). Contact the server administrator.

0 个答案:

没有答案