This is a duplicate of another topic "strange solr version error (
http://lucene.472066.n3.nabble.com/strange-solr-version-error-td4070636.html)".
Please ignore or delete it.


On Fri, Jun 14, 2013 at 5:54 PM, Jenny Huang <
sunearthmoonwaterf...@gmail.com> wrote:

> Hi,
>
> I need to use solrj to do a full data import from a table in database, and
> encountered the solr version error: "java.lang.RuntimeException: Invalid
> version (expected 2, but 60) or the data in not in 'javabin' format".  To
> figure out what went wrong, I stripped the program to bare bone and let it
> run data import for the 'db' in solr tutorial example-DIH
> (\solr-4.3.0\example\example-DIH), and experienced the same version error.
>
> I downloaded and run the most recent solr-4.3.0 in window 7, and pulled
> the same version of solrj when writing the small solrj program for data
> import (see below maven import).
>
>         <dependency>
>             <groupId>org.apache.solr</groupId>
>             <artifactId>solr-solrj</artifactId>
>             <version>4.3.0</version>
>         </dependency>
>         <dependency>
>             <groupId>org.apache.solr</groupId>
>             <artifactId>solr-core</artifactId>
>             <version>4.3.0</version>
>         </dependency>
>
>
> The main part of data import solrj program is very simple, see below.
>
> public class DbDataImportClient {
>     public void fullImport(String url) {
>         try {
>            HttpSolrServer server = new HttpSolrServer(url);
>            ModifiableSolrParams params = new ModifiableSolrParams();
>            params.set("qt", "/dataimport");
>            params.set("command", "full-import");
>            server.query(params);
>          } catch (Exception e) {
>             e.printStackTrace();
>           }
>     }
>
>     public static void main(String[] args) {
>         String url = "http://localhost:8983/solr/#/db";;
>         new DbDataImportClient().fullImport(url);
>     }
> }
>
> I have been going through almost all the pieces of internet search for
> that error for two days.  Majority of them are about incompatible
> versions.  I don't think it's my case.  I am at my wits end on what went
> wrong, and really need help in the problem.
>
>
> Thanks ahead
>

Reply via email to