hi all,

solr version: 4.9.0


I create and get a HttpSolrServer connection by singleton pattern. I find the 
method of "shutdown" in solrj API, so I decided to use "shutdown" to release 
resources, but I got the error as below, It is due to singleton pattern?



Error executing query
org.apache.solr.client.solrj.SolrServerException: Error executing query
at 
org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:100)
 ~[solr-solrj-4.9.1.jar:4.9.1 1625909 - mike - 2014-09-18 04:09:05]
at org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:301) 
~[solr-solrj-4.9.1.jar:4.9.1 1625909 - mike - 2014-09-18 04:09:05]
at 
com.suning.review.business.ReviewSolrBusiness.getReviewCntByReviewType(ReviewSolrBusiness.java:1072)
 ~[classes:na]
at 
com.suning.review.business.ReviewSolrBusiness.getReviewCountFromSolr(ReviewSolrBusiness.java:675)
 ~[classes:na]
at 
com.suning.review.business.ReviewCmmdtyBusiness.getCmmdtysCnt(ReviewCmmdtyBusiness.java:736)
 [classes:na]
at 
com.suning.review.business.ReviewCmmdtyBusiness.singleCmmdtyCnts(ReviewCmmdtyBusiness.java:877)
 [classes:na]
at 
com.suning.review.service.impl.CommodityReviewServiceImpl.getCmmdtyReviewCount(CommodityReviewServiceImpl.java:372)
 ~[classes:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_25]
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
~[na:1.7.0_25]
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[na:1.7.0_25]
at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_25]
at com.suning.rsf.util.MethodUtils.invokeMethod(MethodUtils.java:268) 
~[rsf-2.0.1.jar:2.0.1]
at 
com.suning.rsf.provider.ServiceExecutorImpl.invoke(ServiceExecutorImpl.java:171)
 ~[rsf-2.0.1.jar:2.0.1]
at 
com.suning.rsf.provider.ServiceExecutorImpl.invoke(ServiceExecutorImpl.java:89) 
~[rsf-2.0.1.jar:2.0.1]
at 
com.suning.rsf.protocol.tcp.TcpEntryPoint$MessageHandler$1.run(TcpEntryPoint.java:178)
 ~[rsf-2.0.1.jar:2.0.1]
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
~[na:1.7.0_25]
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
~[na:1.7.0_25]
at java.lang.Thread.run(Thread.java:724) ~[na:1.7.0_25]
Caused by: java.lang.IllegalStateException: Connection pool shut down
at org.apache.http.util.Asserts.check(Asserts.java:34) 
~[httpcore-4.4.1.jar:4.4.1]
at org.apache.http.pool.AbstractConnPool.lease(AbstractConnPool.java:184) 
~[httpcore-4.4.1.jar:4.4.1]
at org.apache.http.pool.AbstractConnPool.lease(AbstractConnPool.java:217) 
~[httpcore-4.4.1.jar:4.4.1]
at 
org.apache.http.impl.conn.PoolingClientConnectionManager.requestConnection(PoolingClientConnectionManager.java:184)
 ~[httpclient-4.5.jar:4.5]
at 
org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:415)
 ~[httpclient-4.5.jar:4.5]
at 
org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:882)
 ~[httpclient-4.5.jar:4.5]
at 
org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
 ~[httpclient-4.5.jar:4.5]
at 
org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107)
 ~[httpclient-4.5.jar:4.5]
at 
org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)
 ~[httpclient-4.5.jar:4.5]
at 
org.apache.solr.client.solrj.impl.HttpSolrServer.executeMethod(HttpSolrServer.java:452)
 ~[solr-solrj-4.9.1.jar:4.9.1 1625909 - mike - 2014-09-18 04:09:05]
at 
org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:210)
 ~[solr-solrj-4.9.1.jar:4.9.1 1625909 - mike - 2014-09-18 04:09:05]
at 
org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:206)
 ~[solr-solrj-4.9.1.jar:4.9.1 1625909 - mike - 2014-09-18 04:09:05]
at 
org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:91) 
~[solr-solrj-4.9.1.jar:4.9.1 1625909 - mike - 2014-09-18 04:09:05]
... 17 common frames omitted



look forward to your reply!

Best Regards!
Kent Mu

Reply via email to