Hi,
I am developing a search application. When I try to create an instance of CommonsHttpSolrServer I get an Error: java.lang.NoSuchMethodError: org.apache.commons.httpclient.HttpConnectionManager.getParams()Lorg/apache/commons/httpclient/params/HttpConnectionManagerParams; Strangely i dont get this error when i execute this code from command line. This error only occurs when i access it from a web application. Secondly, this same method works fine with another web application. Both web applications are deployed on tomcat 6. One application works fine and the other one crashes. I have read on forums to check for the versions of commons-httpclient and solrj. I have attached my pom entries below as well. They seem fine (as the same code works fine from command line and from web application for first application) . Any suggestions? ----- Code ------ String serverUrl = "http://localhost:8080/solr-scots/"; CommonsHttpSolrServer server = new CommonsHttpSolrServer(serverUrl); -------- pom.xml ---------- <dependency> <groupId>commons-httpclient</groupId> <artifactId>commons-httpclient</artifactId> <version>3.1</version> </dependency> <dependency> <groupId>org.apache.solr</groupId> <artifactId>solr-solrj</artifactId> <version>1.3.0</version> </dependency> ------------- Stack Trace: -------------- java.lang.NoSuchMethodError: org.apache.commons.httpclient.HttpConnectionManager.getParams()Lorg/apache/commons/httpclient/params/HttpConnectionManagerParams; at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.setDefaultMaxConnectionsPerHost(CommonsHttpSolrServer.java:455) at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.<init>(CommonsHttpSolrServer.java:152) at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.<init>(CommonsHttpSolrServer.java:125) at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.<init>(CommonsHttpSolrServer.java:97) at my.solr.test.scots.ScotsSearcher.search(ScotsSearcher.java:29) at my.solr.test.scots.ScotsController.search(ScotsController.java:69) at my.liferay.portlets.ScotsModel.processLocal(ScotsModel.java:58) at my.liferay.portlets.ScotsModel.process(ScotsModel.java:45) at my.liferay.portlets.JSPPortlet.processAction(JSPPortlet.java:126) at com.sun.portal.portletcontainer.appengine.filter.FilterChainImpl.doFilter(FilterChainImpl.java:98) at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:57) at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:100) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:535) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:472) at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:618) at com.liferay.portlet.InvokerPortletImpl.invokeAction(InvokerPortletImpl.java:664) ---------------------- Any Help will be appreciated. Thanks. Sulman. -- View this message in context: http://old.nabble.com/java.lang.NoSuchMethodError%3A-org.apache.commons.httpclient.HttpConnectionManager.getParams%28%29Lorg-apache-commons-httpclient-params-HttpConnectionManagerParams--tp26614488p26614488.html Sent from the Solr - User mailing list archive at Nabble.com.