lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben McCarthy <>
Subject RE: need help to integrate SolrJ with my web application.
Date Mon, 16 Apr 2012 12:32:22 GMT

When I have seen this it usually means the SOLR you are trying to connect to is not available.

Do you have it installed on:


Try opening that address in your browser.  If your running the example solr using the embedded
Jetty you wont be on 8080 :D

Hope that helps

-----Original Message-----
From: Vijaya Kumar Tadavarthy [] 
Sent: 16 April 2012 12:15
To: ''
Subject: need help to integrate SolrJ with my web application.

Hi All,

I am trying to integrate solr with my Spring application.

I have performed following steps:

1) Added below list of jars to my webapp lib folder.
2) I have added Tika jar files for processing binary files.
3) I have modified web.xml added below setup.


I am trying to test this setup by running a simple java program with extract content of MS
Excel file as below

public SolrServer createNewSolrServer()
          try {
            // setup the server...
            String url = "http://localhost:8080/solr";
            CommonsHttpSolrServer s = new CommonsHttpSolrServer( url );
            s.setConnectionTimeout(100); // 1/10th sec

            // where the magic happens
            s.setParser(new BinaryResponseParser());
            s.setRequestWriter(new BinaryRequestWriter());

            return s;
          catch( Exception ex ) {
            throw new RuntimeException( ex );
        public static void main(String[] args) throws IOException, SolrServerException {
                IndexFilesSolrCell infil = new IndexFilesSolrCell();
                System.setProperty("solr.solr.home", "/WebApp/PCS-DMI/WebContent/resources/solr");
                SolrServer serverone = infil.createNewSolrServer();
            ContentStreamUpdateRequest reqext = new ContentStreamUpdateRequest("/update/extract");
            reqext.addFile(new File("Open Search Approach.xlsx"));
            reqext.setParam(ExtractingParams.EXTRACT_ONLY, "true");
            System.out.println("Content Stream Data path: "+serverone.toString());
            NamedList<Object> result = serverone.request(reqext);
            System.out.println("Result: " + result);
I am getting below exception....
Exception in thread "main" org.apache.solr.common.SolrException: Not Found

Not Found
request: http://localhost:8080/solr/update/extract?extractOnly=true&wt=javabin&version=2
        at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(
        at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(

Please direct me how to extract content...
I  have tried to work with example with solr distribution to extract a MS Excel file.
 The file extraction was successful and I could check the metadata using admin of example

Vijaya Kumar T
PACIFIC COAST STEEL (Pinnacle) Project
Ness Technologies India Pvt. Ltd
1st & 2nd Floor, 2A Maximus Builing, Raheja Mindspace IT Park, Madhapur, Hyderabad, 500081,
India. | Tel: +91 40 41962079 | Mobile: +91 9963001551 |

The information contained in this communication is intended solely for the use of the individual
or entity to whom it is addressed and others authorized to receive it. It may contain confidential
or legally privileged information. If you are not the intended recipient you are hereby notified
that any disclosure, copying, distribution or taking any action in reliance on the contents
of this information is strictly prohibited and may be unlawful. If you have received this
communication in error, please notify us immediately by forwarding this email to
and then delete it from your system. Ness technologies is neither liable for the proper and
complete transmission of the information contained in this communication nor for any delay
in its receipt.


This e-mail is sent on behalf of Trader Media Group Limited, Registered Office: Auto Trader
House, Cutbush Park Industrial Estate, Danehill, Lower Earley, Reading, Berkshire, RG6 4UT(Registered
in England No. 4768833). This email and any files transmitted with it are confidential and
may be legally privileged, and intended solely for the use of the individual or entity to
whom they are addressed. If you have received this email in error please notify the sender.
This email message has been swept for the presence of computer viruses. 

View raw message