- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
当我的 Java 程序使用 Java 8 和 Java 11 运行时,我有一个非常奇怪的行为差异。
我正在使用 MSGraph API (1.7.0) 对 Onedrive API 进行多次调用。为了进行这些调用,我使用 4 个并行线程来同步硬盘上的大量文件(大约 1000 个)。
当我使用 Java 8 执行程序时,我没有遇到任何异常。当我使用 java 11 执行它时,我在大约 60% 的调用中得到了 Socket Timeout Exception。
配置IGraphServiceClient
,我使用的是默认配置。就我而言,在这种情况下,HTTP Provider 是 OKHttp3。
有没有人经历过这样的事情?
[UPDATE-1]
这些是我测试过的环境:
com.microsoft.graph.core.ClientException: Error during http request
at com.microsoft.graph.http.CoreHttpProvider.sendRequestInternal(CoreHttpProvider.java:422) ~[easybox-0.1-SNAPSHOT.jar:?]
at com.microsoft.graph.http.CoreHttpProvider.send(CoreHttpProvider.java:204) ~[easybox-0.1-SNAPSHOT.jar:?]
at com.microsoft.graph.http.CoreHttpProvider.send(CoreHttpProvider.java:184) ~[easybox-0.1-SNAPSHOT.jar:?]
at com.microsoft.graph.http.BaseStreamRequest.send(BaseStreamRequest.java:85) ~[easybox-0.1-SNAPSHOT.jar:?]
at com.microsoft.graph.requests.extensions.DriveItemStreamRequest.get(DriveItemStreamRequest.java:55) ~[easybox-0.1-SNAPSHOT.jar:?]
at easybox.provider.onedrive.OnedriveServiceClient.download(OnedriveServiceClient.java:236) ~[easybox-0.1-SNAPSHOT.jar:?]
at easybox.provider.onedrive.OnedriveFile.download(OnedriveFile.java:42) ~[easybox-0.1-SNAPSHOT.jar:?]
at easybox.model.wrapper.RemoteFile.download(RemoteFile.java:20) ~[easybox-0.1-SNAPSHOT.jar:?]
at easybox.syncing.task.LocalFileDownloadSyncTask.downloadIntoTemp(LocalFileDownloadSyncTask.java:71) ~[easybox-0.1-SNAPSHOT.jar:?]
at easybox.syncing.task.LocalFileDownloadSyncTask.execute(LocalFileDownloadSyncTask.java:54) ~[easybox-0.1-SNAPSHOT.jar:?]
at easybox.syncing.Syncer.lambda$taskRunner$1(Syncer.java:66) ~[easybox-0.1-SNAPSHOT.jar:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.net.SocketTimeoutException: timeout
at okhttp3.internal.http2.Http2Stream$StreamTimeout.newTimeoutException(Http2Stream.java:656) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http2.Http2Stream$StreamTimeout.exitAndThrowIfTimedOut(Http2Stream.java:664) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http2.Http2Stream.takeHeaders(Http2Stream.java:153) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http2.Http2Codec.readResponseHeaders(Http2Codec.java:131) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:88) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:126) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) ~[easybox-0.1-SNAPSHOT.jar:?]
at com.microsoft.graph.httpcore.TelemetryHandler.intercept(TelemetryHandler.java:35) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) ~[easybox-0.1-SNAPSHOT.jar:?]
at com.microsoft.graph.httpcore.RedirectHandler.intercept(RedirectHandler.java:123) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) ~[easybox-0.1-SNAPSHOT.jar:?]
at com.microsoft.graph.httpcore.RetryHandler.intercept(RetryHandler.java:140) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) ~[easybox-0.1-SNAPSHOT.jar:?]
at com.microsoft.graph.httpcore.AuthenticationHandler.intercept(AuthenticationHandler.java:31) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:254) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.RealCall.execute(RealCall.java:92) ~[easybox-0.1-SNAPSHOT.jar:?]
at com.microsoft.graph.http.CoreHttpProvider.sendRequestInternal(CoreHttpProvider.java:356) ~[easybox-0.1-SNAPSHOT.jar:?]
... 15 more
Caused by: java.net.SocketTimeoutException: timeout
at okhttp3.internal.http2.Http2Stream$StreamTimeout.newTimeoutException(Http2Stream.java:656) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http2.Http2Stream$StreamTimeout.exitAndThrowIfTimedOut(Http2Stream.java:664) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http2.Http2Stream$FramingSource.read(Http2Stream.java:398) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http2.Http2Codec$StreamFinishingSource.read(Http2Codec.java:205) ~[easybox-0.1-SNAPSHOT.jar:?]
at okio.RealBufferedSource$1.read(RealBufferedSource.java:439) ~[easybox-0.1-SNAPSHOT.jar:?]
at java.io.BufferedInputStream.fill(BufferedInputStream.java:252) ~[?:?]
at java.io.BufferedInputStream.read1(BufferedInputStream.java:292) ~[?:?]
at java.io.BufferedInputStream.read(BufferedInputStream.java:351) ~[?:?]
at java.io.FilterInputStream.read(FilterInputStream.java:107) ~[?:?]
at easybox.provider.onedrive.OnedriveServiceClient.download(OnedriveServiceClient.java:239) ~[easybox-0.1-SNAPSHOT.jar:?]
at easybox.provider.onedrive.OnedriveFile.download(OnedriveFile.java:42) ~[easybox-0.1-SNAPSHOT.jar:?]
... 9 more
com.microsoft.graph.core.ClientException: Error during http request
at com.microsoft.graph.http.CoreHttpProvider.sendRequestInternal(CoreHttpProvider.java:422) ~[easybox-0.1-SNAPSHOT.jar:?]
at com.microsoft.graph.http.CoreHttpProvider.send(CoreHttpProvider.java:204) ~[easybox-0.1-SNAPSHOT.jar:?]
at com.microsoft.graph.http.CoreHttpProvider.send(CoreHttpProvider.java:184) ~[easybox-0.1-SNAPSHOT.jar:?]
at com.microsoft.graph.http.BaseStreamRequest.send(BaseStreamRequest.java:85) ~[easybox-0.1-SNAPSHOT.jar:?]
at com.microsoft.graph.requests.extensions.DriveItemStreamRequest.get(DriveItemStreamRequest.java:55) ~[easybox-0.1-SNAPSHOT.jar:?]
at easybox.provider.onedrive.OnedriveServiceClient.download(OnedriveServiceClient.java:236) ~[easybox-0.1-SNAPSHOT.jar:?]
at easybox.provider.onedrive.OnedriveFile.download(OnedriveFile.java:42) ~[easybox-0.1-SNAPSHOT.jar:?]
at easybox.model.wrapper.RemoteFile.download(RemoteFile.java:20) ~[easybox-0.1-SNAPSHOT.jar:?]
at easybox.syncing.task.LocalFileDownloadSyncTask.downloadIntoTemp(LocalFileDownloadSyncTask.java:71) ~[easybox-0.1-SNAPSHOT.jar:?]
at easybox.syncing.task.LocalFileDownloadSyncTask.execute(LocalFileDownloadSyncTask.java:54) ~[easybox-0.1-SNAPSHOT.jar:?]
at easybox.syncing.Syncer.lambda$taskRunner$1(Syncer.java:66) ~[easybox-0.1-SNAPSHOT.jar:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.net.SocketTimeoutException: timeout
at okhttp3.internal.http2.Http2Stream$StreamTimeout.newTimeoutException(Http2Stream.kt:677) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http2.Http2Stream$StreamTimeout.exitAndThrowIfTimedOut(Http2Stream.kt:686) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http2.Http2Stream.takeHeaders(Http2Stream.kt:143) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http2.Http2ExchangeCodec.readResponseHeaders(Http2ExchangeCodec.kt:96) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.connection.Exchange.readResponseHeaders(Exchange.kt:106) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.kt:79) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:34) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:96) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) ~[easybox-0.1-SNAPSHOT.jar:?]
at com.microsoft.graph.httpcore.TelemetryHandler.intercept(TelemetryHandler.java:35) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) ~[easybox-0.1-SNAPSHOT.jar:?]
at com.microsoft.graph.httpcore.RedirectHandler.intercept(RedirectHandler.java:123) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) ~[easybox-0.1-SNAPSHOT.jar:?]
at com.microsoft.graph.httpcore.RetryHandler.intercept(RetryHandler.java:140) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) ~[easybox-0.1-SNAPSHOT.jar:?]
at com.microsoft.graph.httpcore.AuthenticationHandler.intercept(AuthenticationHandler.java:31) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:197) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.connection.RealCall.execute(RealCall.kt:148) ~[easybox-0.1-SNAPSHOT.jar:?]
at com.microsoft.graph.http.CoreHttpProvider.sendRequestInternal(CoreHttpProvider.java:356) ~[easybox-0.1-SNAPSHOT.jar:?]
... 15 more
com.microsoft.graph.core.ClientException: Error during http request
at com.microsoft.graph.http.CoreHttpProvider.sendRequestInternal(CoreHttpProvider.java:422) ~[easybox-0.1-SNAPSHOT.jar:?]
at com.microsoft.graph.http.CoreHttpProvider.send(CoreHttpProvider.java:204) ~[easybox-0.1-SNAPSHOT.jar:?]
at com.microsoft.graph.http.CoreHttpProvider.send(CoreHttpProvider.java:184) ~[easybox-0.1-SNAPSHOT.jar:?]
at com.microsoft.graph.http.BaseStreamRequest.send(BaseStreamRequest.java:85) ~[easybox-0.1-SNAPSHOT.jar:?]
at com.microsoft.graph.requests.extensions.DriveItemStreamRequest.get(DriveItemStreamRequest.java:55) ~[easybox-0.1-SNAPSHOT.jar:?]
at easybox.provider.onedrive.OnedriveServiceClient.download(OnedriveServiceClient.java:236) ~[easybox-0.1-SNAPSHOT.jar:?]
at easybox.provider.onedrive.OnedriveFile.download(OnedriveFile.java:42) ~[easybox-0.1-SNAPSHOT.jar:?]
at easybox.model.wrapper.RemoteFile.download(RemoteFile.java:20) ~[easybox-0.1-SNAPSHOT.jar:?]
at easybox.syncing.task.LocalFileDownloadSyncTask.downloadIntoTemp(LocalFileDownloadSyncTask.java:71) ~[easybox-0.1-SNAPSHOT.jar:?]
at easybox.syncing.task.LocalFileDownloadSyncTask.execute(LocalFileDownloadSyncTask.java:54) ~[easybox-0.1-SNAPSHOT.jar:?]
at easybox.syncing.Syncer.lambda$taskRunner$1(Syncer.java:66) ~[easybox-0.1-SNAPSHOT.jar:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: okhttp3.internal.http2.StreamResetException: stream was reset: CANCEL
at okhttp3.internal.http2.Http2Stream.takeHeaders(Http2Stream.kt:148) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http2.Http2ExchangeCodec.readResponseHeaders(Http2ExchangeCodec.kt:96) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.connection.Exchange.readResponseHeaders(Exchange.kt:106) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.kt:79) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:34) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:96) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) ~[easybox-0.1-SNAPSHOT.jar:?]
at com.microsoft.graph.httpcore.TelemetryHandler.intercept(TelemetryHandler.java:35) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) ~[easybox-0.1-SNAPSHOT.jar:?]
at com.microsoft.graph.httpcore.RedirectHandler.intercept(RedirectHandler.java:123) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) ~[easybox-0.1-SNAPSHOT.jar:?]
at com.microsoft.graph.httpcore.RetryHandler.intercept(RetryHandler.java:140) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) ~[easybox-0.1-SNAPSHOT.jar:?]
at com.microsoft.graph.httpcore.AuthenticationHandler.intercept(AuthenticationHandler.java:31) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:197) ~[easybox-0.1-SNAPSHOT.jar:?]
at okhttp3.internal.connection.RealCall.execute(RealCall.kt:148) ~[easybox-0.1-SNAPSHOT.jar:?]
at com.microsoft.graph.http.CoreHttpProvider.sendRequestInternal(CoreHttpProvider.java:356) ~[easybox-0.1-SNAPSHOT.jar:?]
... 15 more
最佳答案
JDK9(或 JDK8 252+)上的 OkHttp,默认会协商 HTTP/2。很有可能与这种变化有关。
尝试构建一个没有 HTTP/2 的客户端,看看你是否仍然遇到这个问题。
val client = OkHttpClient.Builder()
.protocols(listOf(Protocol.HTTP_1_1))
.build()
如果它修复了问题,则可能是服务器与 HTTP/2 不兼容,或者与连接重用有关,例如单个连接上的请求过多。
关于java - Java 11 上的 SocketTimeout,但 Java 8 上没有,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62031298/
我正在使用的库有问题。可能是库的问题,也可能是我使用错误! 基本上,当我这样做时(超时以毫秒为单位) _ignitedHttp.setConnectionTimeout(1); // v short
我有一个 Activity 需要 jsoup 连接到 URL。 问题是我时不时会遇到 09-21 23:11:56.140: WARN/System.err(5725): java.net.Socke
Jsoup 出现超时错误。我怎样才能解决这个问题? 报错的代码行是 Document doc; doc = Jsoup.connect("http://google.com").timeout(300
我正在使用 MongoDb,但在从数据库中读取记录时遇到问题。我能够将它们放在游标中但是当我尝试使用游标从游标中获取记录时cursor.hasNext() 它给了我以下异常: com.mongodb.
我有一个在 MongoDB 上执行一些聚合的 Java 应用程序,但有时它只是挂起并抛出 SocketTimeout 异常。出现异常后,应用程序将正常运行(稍等片刻,然后它可能会再次引发异常)。 我刚
有人可以帮助解决这个异常(exception)吗? Uncaught exception from servlet java.net.SocketTimeoutException: Timeout w
我只是尝试使用 Retrofit 进行 post api 调用。服务器正在响应正确的数据。我与 Postman (Chrome) 进行了核对。我的代码如下 公共(public)类 MainActivi
socketTimeout 之间有什么区别?在 JDBC URL 和 networkTimeout 上在 java.sql.Connection 上 最佳答案 Connection.networkTi
我的目标是获得 Adapter 类的代码覆盖率。我已经为 read SocketTimeoutException(read timed out) 编写了 Junit 测试用例,它没有调用 getSam
所以这是交易。我有一个 Web 服务 WSDL,我需要在公司网络外部进行 SOAP 调用。 Web 服务是 HTTPS SOAP,需要客户端证书。我已经从 wsdl2java 生成了 Java 客户端
我们正在使用 lua 脚本对数据库更新时的数据执行批量删除。 Jedis 使用管道执行 lua 脚本。 local result = redis.call('lrange',key,0,12470)
我已经为 URLconnection 和 Parser 类实现了一个 try catch block ,如下所示。 try { Url uri = new Url(urlString);
我正在使用 HttpClient 4.1.2。将 ConnectionTimeout 和 SocketTimeout 设置为一个值永远不会生效。 代码: Long startTime = null
当我的 Java 程序使用 Java 8 和 Java 11 运行时,我有一个非常奇怪的行为差异。 我正在使用 MSGraph API (1.7.0) 对 Onedrive API 进行多次调用。为了
我是一名优秀的程序员,十分优秀!