Page 1 of 1

Exception occurred during XML-RPC call

Posted: Thu Apr 15, 2021 4:09 pm
by jimipeisun
I meet error, help me, very thanks.

my Code:

URL serverUrl = null;
try {
serverUrl = new URL("https", "api.opensubtitles.org", 443, "/xml-rpc");


} catch (MalformedURLException e) {
e.printStackTrace();
}
try {
OpenSubtitlesClient osClient = new OpenSubtitlesClientImpl(serverUrl);
ServerInfo serverInfo = osClient.serverInfo();
Log.i("vr4p","serverInfo="+serverInfo.getXmlRpcURL());
LoginResponse response = (LoginResponse) osClient.login("", "", "en", "TemporaryUserAgent");
Log.i("vr4p","response.getStatus()="+response.getStatus());
Log.i("vr4p","response.getStatus()="+response.getStatus());
assert response.getStatus() == ResponseStatus.OK;
assert osClient.isLoggedIn();
UserInfo userInfo = response.getUserInfo();
osClient.logout();
} catch (XmlRpcException e) {
e.printStackTrace();
}



meet error:

2021-04-15 09:55:56.192 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: org.apache.xmlrpc.XmlRpcException: Exception occurred during XML-RPC call
2021-04-15 09:55:56.192 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.github.wtekiela.opensub4j.xmlrpc.client.RetryableXmlRpcClient.execute(RetryableXmlRpcClient.java:97)
2021-04-15 09:55:56.192 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.github.wtekiela.opensub4j.impl.AbstractOperation.execute(AbstractOperation.java:23)
2021-04-15 09:55:56.192 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.github.wtekiela.opensub4j.impl.OpenSubtitlesClientImpl.serverInfo(OpenSubtitlesClientImpl.java:108)
2021-04-15 09:55:56.192 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at cn.vr4p.vr4pmovieplayer.V4PlayerViewOp.InitPlaySpeedSel(V4PlayerViewOp.java:480)
2021-04-15 09:55:56.193 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at cn.vr4p.vr4pmovieplayer.V4PlayerActivity.ShowVideoSpeedUIView(V4PlayerActivity.java:1075)
2021-04-15 09:55:56.193 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at cn.vr4p.vr4pmovieplayer.V4PlayerViewOp$8.onClick(V4PlayerViewOp.java:149)
2021-04-15 09:55:56.193 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at android.view.View.performClick(View.java:7281)
2021-04-15 09:55:56.193 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at android.view.View.performClickInternal(View.java:7255)
2021-04-15 09:55:56.193 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at android.view.View.access$3600(View.java:828)
2021-04-15 09:55:56.193 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at android.view.View$PerformClick.run(View.java:27924)
2021-04-15 09:55:56.193 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at android.os.Handler.handleCallback(Handler.java:900)
2021-04-15 09:55:56.193 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at android.os.Handler.dispatchMessage(Handler.java:103)
2021-04-15 09:55:56.193 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at android.os.Looper.loop(Looper.java:219)
2021-04-15 09:55:56.193 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at android.app.ActivityThread.main(ActivityThread.java:8387)
2021-04-15 09:55:56.193 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at java.lang.reflect.Method.invoke(Native Method)
2021-04-15 09:55:56.193 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
2021-04-15 09:55:56.193 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1055)
2021-04-15 09:55:56.194 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: Caused by: android.os.NetworkOnMainThreadException
2021-04-15 09:55:56.194 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1565)
2021-04-15 09:55:56.194 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:115)
2021-04-15 09:55:56.194 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:103)
2021-04-15 09:55:56.194 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at java.net.InetAddress.getAllByName(InetAddress.java:1152)
2021-04-15 09:55:56.194 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.android.okhttp.Dns$1.lookup(Dns.java:41)
2021-04-15 09:55:56.194 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.android.okhttp.internal.http.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:178)
2021-04-15 09:55:56.194 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.android.okhttp.internal.http.RouteSelector.nextProxy(RouteSelector.java:144)
2021-04-15 09:55:56.194 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.android.okhttp.internal.http.RouteSelector.next(RouteSelector.java:86)
2021-04-15 09:55:56.194 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:176)
2021-04-15 09:55:56.194 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:128)
2021-04-15 09:55:56.194 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:97)
2021-04-15 09:55:56.194 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:289)
2021-04-15 09:55:56.194 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:232)
2021-04-15 09:55:56.194 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:465)
2021-04-15 09:55:56.194 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:131)
2021-04-15 09:55:56.194 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:262)
2021-04-15 09:55:56.195 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getOutputStream(DelegatingHttpsURLConnection.java:219)
2021-04-15 09:55:56.195 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:30)
2021-04-15 09:55:56.195 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at org.apache.xmlrpc.client.XmlRpcSunHttpTransport.writeRequest(XmlRpcSunHttpTransport.java:104)
2021-04-15 09:55:56.195 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(XmlRpcStreamTransport.java:151)
2021-04-15 09:55:56.195 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at org.apache.xmlrpc.client.XmlRpcHttpTransport.sendRequest(XmlRpcHttpTransport.java:143)
2021-04-15 09:55:56.195 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at org.apache.xmlrpc.client.XmlRpcSunHttpTransport.sendRequest(XmlRpcSunHttpTransport.java:69)
2021-04-15 09:55:56.195 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at org.apache.xmlrpc.client.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:56)
2021-04-15 09:55:56.195 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:167)
2021-04-15 09:55:56.195 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:137)
2021-04-15 09:55:56.195 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:126)
2021-04-15 09:55:56.195 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.github.wtekiela.opensub4j.xmlrpc.client.RetryableXmlRpcClient.access$001(RetryableXmlRpcClient.java:22)
2021-04-15 09:55:56.195 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.github.wtekiela.opensub4j.xmlrpc.client.RetryableXmlRpcClient.lambda$execute$0$RetryableXmlRpcClient(RetryableXmlRpcClient.java:90)
2021-04-15 09:55:56.195 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.github.wtekiela.opensub4j.xmlrpc.client.-$$Lambda$RetryableXmlRpcClient$j7neqpl-kwS73SAks_rGMBFTUPo.call(Unknown Source:6)
2021-04-15 09:55:56.195 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.github.wtekiela.opensub4j.xmlrpc.client.RetryableCallable.call(RetryableCallable.java:36)
2021-04-15 09:55:56.195 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.github.wtekiela.opensub4j.xmlrpc.client.RetryableXmlRpcClient.execute(RetryableXmlRpcClient.java:95)
2021-04-15 09:55:56.195 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: ... 16 more
2021-04-15 09:55:56.195 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: Caused by:
2021-04-15 09:55:56.195 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: android.os.NetworkOnMainThreadException
2021-04-15 09:55:56.195 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1565)
2021-04-15 09:55:56.195 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:115)
2021-04-15 09:55:56.195 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:103)
2021-04-15 09:55:56.196 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at java.net.InetAddress.getAllByName(InetAddress.java:1152)
2021-04-15 09:55:56.196 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.android.okhttp.Dns$1.lookup(Dns.java:41)
2021-04-15 09:55:56.196 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.android.okhttp.internal.http.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:178)
2021-04-15 09:55:56.196 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.android.okhttp.internal.http.RouteSelector.nextProxy(RouteSelector.java:144)
2021-04-15 09:55:56.196 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.android.okhttp.internal.http.RouteSelector.next(RouteSelector.java:86)
2021-04-15 09:55:56.196 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:176)
2021-04-15 09:55:56.196 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:128)
2021-04-15 09:55:56.196 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:97)
2021-04-15 09:55:56.196 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:289)
2021-04-15 09:55:56.196 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:232)
2021-04-15 09:55:56.196 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:465)
2021-04-15 09:55:56.196 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:131)
2021-04-15 09:55:56.196 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:262)
2021-04-15 09:55:56.196 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getOutputStream(DelegatingHttpsURLConnection.java:219)
2021-04-15 09:55:56.196 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:30)
2021-04-15 09:55:56.196 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at org.apache.xmlrpc.client.XmlRpcSunHttpTransport.writeRequest(XmlRpcSunHttpTransport.java:104)
2021-04-15 09:55:56.196 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(XmlRpcStreamTransport.java:151)
2021-04-15 09:55:56.196 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at org.apache.xmlrpc.client.XmlRpcHttpTransport.sendRequest(XmlRpcHttpTransport.java:143)
2021-04-15 09:55:56.196 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at org.apache.xmlrpc.client.XmlRpcSunHttpTransport.sendRequest(XmlRpcSunHttpTransport.java:69)
2021-04-15 09:55:56.196 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at org.apache.xmlrpc.client.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:56)
2021-04-15 09:55:56.196 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:167)
2021-04-15 09:55:56.196 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:137)
2021-04-15 09:55:56.196 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:126)
2021-04-15 09:55:56.196 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.github.wtekiela.opensub4j.xmlrpc.client.RetryableXmlRpcClient.access$001(RetryableXmlRpcClient.java:22)
2021-04-15 09:55:56.196 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.github.wtekiela.opensub4j.xmlrpc.client.RetryableXmlRpcClient.lambda$execute$0$RetryableXmlRpcClient(RetryableXmlRpcClient.java:90)
2021-04-15 09:55:56.196 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.github.wtekiela.opensub4j.xmlrpc.client.-$$Lambda$RetryableXmlRpcClient$j7neqpl-kwS73SAks_rGMBFTUPo.call(Unknown Source:6)
2021-04-15 09:55:56.196 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.github.wtekiela.opensub4j.xmlrpc.client.RetryableCallable.call(RetryableCallable.java:36)
2021-04-15 09:55:56.196 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.github.wtekiela.opensub4j.xmlrpc.client.RetryableXmlRpcClient.execute(RetryableXmlRpcClient.java:95)
2021-04-15 09:55:56.196 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.github.wtekiela.opensub4j.impl.AbstractOperation.execute(AbstractOperation.java:23)
2021-04-15 09:55:56.196 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.github.wtekiela.opensub4j.impl.OpenSubtitlesClientImpl.serverInfo(OpenSubtitlesClientImpl.java:108)
2021-04-15 09:55:56.196 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at cn.vr4p.vr4pmovieplayer.V4PlayerViewOp.InitPlaySpeedSel(V4PlayerViewOp.java:480)
2021-04-15 09:55:56.196 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at cn.vr4p.vr4pmovieplayer.V4PlayerActivity.ShowVideoSpeedUIView(V4PlayerActivity.java:1075)
2021-04-15 09:55:56.196 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at cn.vr4p.vr4pmovieplayer.V4PlayerViewOp$8.onClick(V4PlayerViewOp.java:149)
2021-04-15 09:55:56.197 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at android.view.View.performClick(View.java:7281)
2021-04-15 09:55:56.197 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at android.view.View.performClickInternal(View.java:7255)
2021-04-15 09:55:56.197 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at android.view.View.access$3600(View.java:828)
2021-04-15 09:55:56.197 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at android.view.View$PerformClick.run(View.java:27924)
2021-04-15 09:55:56.197 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at android.os.Handler.handleCallback(Handler.java:900)
2021-04-15 09:55:56.197 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at android.os.Handler.dispatchMessage(Handler.java:103)
2021-04-15 09:55:56.197 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at android.os.Looper.loop(Looper.java:219)
2021-04-15 09:55:56.197 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at android.app.ActivityThread.main(ActivityThread.java:8387)
2021-04-15 09:55:56.197 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at java.lang.reflect.Method.invoke(Native Method)
2021-04-15 09:55:56.197 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
2021-04-15 09:55:56.197 28586-28586/cn.vr4p.vr4pmovieplayer W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1055)