Elasticsearch-river-csv Error: "NoClassSettingsException[Failed to load class with value [csv]]; nested: ClassNotFoundException[csv];"

Hi to all.

My name is Mohammad Rafi.
And i am new learner to this ElasticSearch.

I am using windows 7 64-bit
Elasticsearch version 0.19.8
and i have added HEAD and RIVER-CSV plugins to my elasticsearch.

I have gone through the following links to read csv-river plugin for
elastisearch.
"http://www.elasticsearch.org/guide/reference/modules/plugins.html" and
"https://github.com/xxBedy/elasticsearch-river-csv"

I have created "g:/me_demos/test01.csv" file in my file system. which
contain:
name,age,message
ram,12,hi ram
rakesh,22,hi rakesh.

And I have "g:/me_demos/insertrivercsv.json" file which contain:
{
"type" : "csv",
"csv_file" : {
"folder" : "/me_demos",
"filename_mask" : ".*\test01.csv$",
"poll":"5m",
"fields" : [
"name",
"age",
"msg"
],
"field_separator" : ",",
"escape_character" : ";",
"quote_character" : "'"
},
"index" : {
"index" : "my_csv_dat",
"type" : "csv_row",
"bulk_size" : 10000,
"bulk_threshold" : 50
}
}

I have tried to insert ".csv" file data to elasticsearch by using csv
river.
I have used curl command for inserting and it display as
curl -XPOST http://localhost:9200/_river/my_csv_river/_meta -d
@g:/me_demos/insertrivercsv.json
[image: curl ocmmand]
I have inserted only one _id that is "_meta".
but it inserted two _ids and they are _meta and _status.
_meta has some data but _status has error message. as below
[image: ES side error message]
But in Elasticsearch the .csv file is not inserted and also I got an error
message like:
NoClassSettingsException[Failed to load class with value [csv]]; nested:
ClassNotFoundException[csv];

can any one tell me why this is happening?
Suggest me, how to resolve it?
And also please tell me where should I get more documentation/information
about csv-river for Elasticsearch.

Thanks to you all.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Probably your plugin is not well setup.
Have look in your logs.

When you restart ES can you see the plugin name in logs as a plugin (not as a site plugin) ?

How did you install the plugin ?
Which is the ES version ?

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 25 mars 2013 à 07:14, rafi me.mrafi.en@gmail.com a écrit :

Hi to all.

My name is Mohammad Rafi.
And i am new learner to this ElasticSearch.

I am using windows 7 64-bit
Elasticsearch version 0.19.8
and i have added HEAD and RIVER-CSV plugins to my elasticsearch.

I have gone through the following links to read csv-river plugin for elastisearch.
"http://www.elasticsearch.org/guide/reference/modules/plugins.html" and
"https://github.com/xxBedy/elasticsearch-river-csv"

I have created "g:/me_demos/test01.csv" file in my file system. which contain:
name,age,message
ram,12,hi ram
rakesh,22,hi rakesh.

And I have "g:/me_demos/insertrivercsv.json" file which contain:
{
"type" : "csv",
"csv_file" : {
"folder" : "/me_demos",
"filename_mask" : ".*\test01.csv$",
"poll":"5m",
"fields" : [
"name",
"age",
"msg"
],
"field_separator" : ",",
"escape_character" : ";",
"quote_character" : "'"
},
"index" : {
"index" : "my_csv_dat",
"type" : "csv_row",
"bulk_size" : 10000,
"bulk_threshold" : 50
}
}

I have tried to insert ".csv" file data to elasticsearch by using csv river.
I have used curl command for inserting and it display as
curl -XPOST http://localhost:9200/_river/my_csv_river/_meta -d @g:/me_demos/insertrivercsv.json

I have inserted only one _id that is "_meta".
but it inserted two _ids and they are _meta and _status.
_meta has some data but _status has error message. as below

But in Elasticsearch the .csv file is not inserted and also I got an error message like:
NoClassSettingsException[Failed to load class with value [csv]]; nested: ClassNotFoundException[csv];

can any one tell me why this is happening?
Suggest me, how to resolve it?
And also please tell me where should I get more documentation/information about csv-river for Elasticsearch.

Thanks to you all.

You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

hi, David..
Thanks you very much for responding.

Which is the ES version ?
I am using, elasticsearch-0.19.8 Version.

Probably your plugin is not well setup.
How did you install the plugin ?

This is the link which I followed the instructions to install,

In above link, it contain instructions like,

In order to install the plugin, simply run: bin/plugin -install
xxBedy/elasticsearch-river-csv/1.0.1.

If it doesn't work, clone git repository and build plugin manually.

| CSV Plugin | ElasticSearch |


| master | 0.19.x -> master |


| 1.0.1 | 0.19.x |


| 1.0.0 | 0.19.x |

I have tried to use "plugin -install xxBedy/elasticsearch-river-csv/1.0.1"
but it fails. Then again

I have used “plugin -install xxBedy/elasticsearch-river-csv/1.0.0” like:

C:\elasticsearch-0.19.8\elasticsearch-0.19.8\bin> plugin -install
xxBedy/elasticsearch-river-csv/1.0.0

And When I hit the enter key

Then it dispals "installed river-csv". consider the following image,

https://lh6.googleusercontent.com/-ZdgokSQ6JxY/UU_5mb657LI/AAAAAAAAAA0/YprpaRj0pLY/s1600/es_log_ins_csv.png

Have look in your logs.
When you restart ES can you see the plugin name in logs as a plugin (not
as a site plugin) ?

https://lh5.googleusercontent.com/-HyCa4aom6Ks/UU_5Ax2CEXI/AAAAAAAAAAs/IfRBmjwCIxI/s1600/es_ins_log.png

Thus in the above fig:, when i started the elasticsearch, in log it
displays the plugin details like:
[plugins][Killer Shrike] loaded [ ], sites [ river-csv, head].

thus in the above i have river-csv in my elasticsearch.
did i have do any wrong while installation?

I have read "java-api, bulk indexing, ..." which will help me to do bulk
loading with java api from the source of elasticsearch.org
still I have many doubts
1.I don't know how to index .csv file into elasticsearch. please tell me
where can i get more information regarding to
" indexing .csv file ( which contain huge amount of documents to load )
contents using java api into elasticsearch".
2. how can i index .json file ( which contains 1million documents to load)
into ElasticSearch using java api?
3. what is the process for loading that huge amount of data?

Thanks you very much, David.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

So the plugin is recognized as a site plugin, which is the issue.
It's a known problem due to some changes at github about download service.

You should try to build it yourself and unzip the ZIP file in your es/plugins/elasticsearch-river-csv dir.

Or wait for advices from the author :wink:

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 25 mars 2013 à 08:32, rafi me.mrafi.en@gmail.com a écrit :

hi, David..
Thanks you very much for responding.

Which is the ES version ?
I am using, elasticsearch-0.19.8 Version.

Probably your plugin is not well setup.
How did you install the plugin ?
This is the link which I followed the instructions to install,
https://github.com/xxBedy/elasticsearch-river-csv
In above link, it contain instructions like,

In order to install the plugin, simply run: bin/plugin -install xxBedy/elasticsearch-river-csv/1.0.1.

If it doesn't work, clone git repository and build plugin manually.

| CSV Plugin | ElasticSearch |

| master | 0.19.x -> master |

| 1.0.1 | 0.19.x |

| 1.0.0 | 0.19.x |

I have tried to use "plugin -install xxBedy/elasticsearch-river-csv/1.0.1" but it fails. Then again
I have used “plugin -install xxBedy/elasticsearch-river-csv/1.0.0” like:
C:\elasticsearch-0.19.8\elasticsearch-0.19.8\bin> plugin -install xxBedy/elasticsearch-river-csv/1.0.0
And When I hit the enter key
Then it dispals "installed river-csv". consider the following image,

Have look in your logs.
When you restart ES can you see the plugin name in logs as a plugin (not as a site plugin) ?

Thus in the above fig:, when i started the elasticsearch, in log it displays the plugin details like:
[plugins][Killer Shrike] loaded [ ], sites [ river-csv, head].

thus in the above i have river-csv in my elasticsearch.
did i have do any wrong while installation?

I have read "java-api, bulk indexing, ..." which will help me to do bulk loading with java api from the source of elasticsearch.org
still I have many doubts
1.I don't know how to index .csv file into elasticsearch. please tell me where can i get more information regarding to
" indexing .csv file ( which contain huge amount of documents to load ) contents using java api into elasticsearch".
2. how can i index .json file ( which contains 1million documents to load) into ElasticSearch using java api?
3. what is the process for loading that huge amount of data?

Thanks you very much, David.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Hi David,
Once again thanks for quick responce.

ok i will try as per you said, to build it by unzipping the ZIP file in to
my es/plugins/elasticsearch-river-csv dir.
and i will let you know the result.

thanks for your reply.

cheers...

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Hi to All.
good Evening.,

As per David suggestion,
I have downloaded zip file from the site:github regarding to
elasticserach-river-csv.
And i have done all the process, like
unzipping elasticsearch-river-csv.zip file into my
..\elasticsearch-0.19.8\elasticsearch-0.19.8\plugins directory.
and i have removed _river index feom my ES
Then again i started elasticsearch and tryed to insert .csv file data
into ElasticSearch.
but again it fails to load csv river.
I follwed below steps for inserting.....

curl -XPUT localhost:9200/_river/my_csv_river/_meta --data-binary
@democsvclient.json

in democsvclient.json file....
{
"type" : "csv",
"csv_file" : {
"folder" : "/test",
"filename_mask" : "csvdata.csv",
"poll":"5m",
"fields" : [
"user",
"age",
"dis"
],
"field_separator" : ",",
"escape_character" : ";",
"quote_character" : "'"
},
"index" : {
"index" : "my_csv_dat",
"type" : "csv_row",
"bulk_size" : 100,
"bulk_threshold" : 50
}
}

In my ES log, it shows exception like,

org.elasticsearch.common.settings.NoClassSettingsException: Failed to load
class with value [csv]
at
org.elasticsearch.river.RiverModule.loadTypeModule(RiverModule.java:86)
at org.elasticsearch.river.RiverModule.spawnModules(RiverModule.java:57)
at
org.elasticsearch.common.inject.ModulesBuilder.add(ModulesBuilder.java:44)
at
org.elasticsearch.river.RiversService.createRiver(RiversService.java:135)
at
org.elasticsearch.river.RiversService$ApplyRivers$2.onResponse(RiversService.java:270)
at
org.elasticsearch.river.RiversService$ApplyRivers$2.onResponse(RiversService.java:264)
at
org.elasticsearch.action.support.TransportAction$ThreadedActionListener$1.run(TransportAction.java:86)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.ClassNotFoundException: csv
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at
org.elasticsearch.river.RiverModule.loadTypeModule(RiverModule.java:72)
... 9 more

I think the statments I have written in democsvclient.json file is wrong.
which I was shown below.
In source of GitHub, instructions like:
{
...........

"csv_file" : {
    "folder" : "/tmp",      <------------
    "filename_mask" : ".*\\.csv$",   <----------

.......
}

In my democsvclient.json file
{
"type" : "csv",
"csv_file" : {
"folder" : "/test", <-----------
"filename_mask" : "csvdata.csv", <---------
...
....
}
If any one knows this issue please suggest me how to handle it.

can any one suggest me, what i have made mistake to insert .csv file data
into elasticsearch?
Also please tell me, Is there any alternate technique to handle *.csv file
and insert into elasticsearch?

Regards

David Pilato

So the plugin is recognized as a site plugin, which is the issue.

It's a known problem due to some changes at github about download service.

You should try to build it yourself and unzip the ZIP file in your

es/plugins/elasticsearch-river-csv dir.

Or wait for advices from the author :wink:

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfrhttps://twitter.com/elasticsearchfr
| @scrutmydocs https://twitter.com/scrutmydocs

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

You cannot use the zip file found on github. That zip file is merely the
contents of the repository bundled as a zip. You need to clone the repo and
build the plugin yourself. The resulting zip file is the one you need to
use.

--
Ivan

On Wed, Mar 27, 2013 at 4:41 AM, rafi me.mrafi.en@gmail.com wrote:

Hi to All.
good Evening.,

As per David suggestion,
I have downloaded zip file from the site:github regarding to
elasticserach-river-csv.
And i have done all the process, like
unzipping elasticsearch-river-csv.zip file into my
..\elasticsearch-0.19.8\elasticsearch-0.19.8\plugins directory.
and i have removed _river index feom my ES
Then again i started elasticsearch and tryed to insert .csv file data
into ElasticSearch.
but again it fails to load csv river.
I follwed below steps for inserting.....

curl -XPUT localhost:9200/_river/my_csv_river/_meta --data-binary
@democsvclient.json

in democsvclient.json file....
{
"type" : "csv",
"csv_file" : {
"folder" : "/test",
"filename_mask" : "csvdata.csv",
"poll":"5m",
"fields" : [
"user",
"age",
"dis"

        ],
    "field_separator" : ",",
    "escape_character" : ";",
    "quote_character" : "'"
},
"index" : {
    "index" : "my_csv_dat",
    "type" : "csv_row",
    "bulk_size" : 100,
    "bulk_threshold" : 50
}

}

In my ES log, it shows exception like,


org.elasticsearch.common.settings.NoClassSettingsException: Failed to load
class with value [csv]
at
org.elasticsearch.river.RiverModule.loadTypeModule(RiverModule.java:86)
at
org.elasticsearch.river.RiverModule.spawnModules(RiverModule.java:57)
at
org.elasticsearch.common.inject.ModulesBuilder.add(ModulesBuilder.java:44)
at
org.elasticsearch.river.RiversService.createRiver(RiversService.java:135)
at
org.elasticsearch.river.RiversService$ApplyRivers$2.onResponse(RiversService.java:270)
at
org.elasticsearch.river.RiversService$ApplyRivers$2.onResponse(RiversService.java:264)
at
org.elasticsearch.action.support.TransportAction$ThreadedActionListener$1.run(TransportAction.java:86)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.ClassNotFoundException: csv
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at
org.elasticsearch.river.RiverModule.loadTypeModule(RiverModule.java:72)
... 9 more


I think the statments I have written in democsvclient.json file is wrong.
which I was shown below.
In source of GitHub, instructions like:
{
...........

"csv_file" : {
    "folder" : "/tmp",      <------------
    "filename_mask" : ".*\\.csv$",   <----------

.......
}

In my democsvclient.json file
{
"type" : "csv",
"csv_file" : {
"folder" : "/test", <-----------
"filename_mask" : "csvdata.csv", <---------
...
....
}
If any one knows this issue please suggest me how to handle it.

can any one suggest me, what i have made mistake to insert .csv file data
into elasticsearch?
Also please tell me, Is there any alternate technique to handle *.csv
file and insert into elasticsearch?

Regards

David Pilato

So the plugin is recognized as a site plugin, which is the issue.

It's a known problem due to some changes at github about download service.

You should try to build it yourself and unzip the ZIP file in your

es/plugins/elasticsearch-**river-csv dir.

Or wait for advices from the author :wink:

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfrhttps://twitter.com/elasticsearchfr
|** @scrutmydocs https://twitter.com/scrutmydocs

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Good morning to all,

hi Brusic,
Thank for your suggestion.

I have tried it but still i am getting the same Exception.

What I have done is,
I have cloned the Elasticsearch-river-csv from repo of github.
And placed it under
..\elasticsearch-0.19.8\elasticsearch-0.19.8\plugins directory.

   And again I have started the elasticsearch and done the all process 

to insert my csvdata.csv file content into elasticsearch.
This time also i am getting the same Exception.

"org.elasticsearch.common.settings.NoClassSettingsException: Failed to load
class with value [csv]"

so, what I have to do for insert .csv file data into elasticsearch?
any one can suggest me, how to handle (bulk index using java-api) csv file
into elasticsearch?
Is there any other technique for it?

Regards..

Ivan Brusic

4:51 AM (5 hours ago)
You cannot use the zip file found on github. That zip file is merely
the contents of the repository bundled as a zip. You need to clone the repo
and build the plugin yourself. The resulting zip file is the one you need
to use.

--
Ivan

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Unzip your zip file under ./plugins/csv
Restart ES.

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 28 mars 2013 à 06:07, rafi me.mrafi.en@gmail.com a écrit :

Good morning to all,

hi Brusic,
Thank for your suggestion.

I have tried it but still i am getting the same Exception.

What I have done is,
I have cloned the Elasticsearch-river-csv from repo of github.
And placed it under ..\elasticsearch-0.19.8\elasticsearch-0.19.8\plugins directory.

   And again I have started the elasticsearch and done the all process to insert my csvdata.csv file content into elasticsearch.
   This time also i am getting the same Exception. 
               "org.elasticsearch.common.settings.NoClassSettingsException: Failed to load class with value [csv]"

so, what I have to do for insert .csv file data into elasticsearch?
any one can suggest me, how to handle (bulk index using java-api) csv file into elasticsearch?
Is there any other technique for it?

Regards..

Ivan Brusic

4:51 AM (5 hours ago)

You cannot use the zip file found on github. That zip file is merely the contents of the repository bundled as a zip. You need to clone the repo and build the plugin yourself. The resulting zip file is the one you need to use.

--
Ivan
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Did you actually build the plugin? I don't see that step.

That github site should be updated to resolve the confusion.

--
Ivan

On Wed, Mar 27, 2013 at 11:05 PM, David Pilato david@pilato.fr wrote:

Unzip your zip file under ./plugins/csv
Restart ES.

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 28 mars 2013 à 06:07, rafi me.mrafi.en@gmail.com a écrit :

Good morning to all,

hi Brusic,
Thank for your suggestion.

I have tried it but still i am getting the same Exception.

What I have done is,
I have cloned the Elasticsearch-river-csv from repo of github.
And placed it under
..\elasticsearch-0.19.8\elasticsearch-0.19.8\plugins directory.

   And again I have started the elasticsearch and done the all process

to insert my csvdata.csv file content into elasticsearch.
This time also i am getting the same Exception.

"org.elasticsearch.common.settings.NoClassSettingsException: Failed to load
class with value [csv]"

so, what I have to do for insert .csv file data into elasticsearch?
any one can suggest me, how to handle (bulk index using java-api) csv file
into elasticsearch?
Is there any other technique for it?

Regards..

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.