-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Connection pool shut down #6
Comments
Update on 12th, Nov, 2018 BaiduTranslator baiduTranslator = new BaiduTranslator();
querierTrans.attach(baiduTranslator);
querierTrans.setParams(LANG.ZH, LANG.EN, source);
List<String> targets = querierTrans.execute();
querierTrans.detach(baiduTranslator);
for(String target: targets){
baiduTranslator = new BaiduTranslator();
querierTrans.attach(baiduTranslator);
querierTrans.setParams(LANG.EN, LANG.ZH, target);
List<String> source_ = querierTrans.execute();
querierTrans.detach(baiduTranslator);
} But this solution is rather complicated and time-consuming..This project is fairly helpful! querierTrans.setParams(LANG.ZH, LANG.EN, source);
List<String> targets = querierTrans.execute();
for(String target: targets){
querierTrans.setParams(LANG.EN, LANG.ZH, target);
List<String> source_ = querierTrans.execute();
} I met the very same issue as shown above. |
遇到这种情况怎么办,被谷歌限制了 rg.apache.http.conn.HttpHostConnectException: Connect to www.google.com:443 [www.google.com/127.0.0.1, www.google.com/2404:6800:4012:0:0:0:0:2004] failed: Connection timed out: connect |
java.lang.IllegalStateException: Connection pool shut down
at org.apache.http.util.Asserts.check(Asserts.java:34)
at org.apache.http.pool.AbstractConnPool.lease(AbstractConnPool.java:191)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.requestConnection(PoolingHttpClientConnectionManager.java:267)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:176)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:111)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108)
at com.swjtu.trans.impl.GoogleTranslator.query(GoogleTranslator.java:73)
at com.swjtu.trans.AbstractTranslator.run(AbstractTranslator.java:42)
at com.swjtu.querier.Querier.execute(Querier.java:25)
The text was updated successfully, but these errors were encountered: