ClassNotFoundException: kuromoji_tokenizer

Hi guys,

I try to use Japanese(Kuromoji)Analysis plugin, but can't use
kuromoji_tokenizer by ClassNotFoundException.
here is comman line.

wget
https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.11.tar.gz
.
tar -zxvf elasticsearch-0.19.11.tar.gz
cd elasticsearch-0.19.11
bin/plugin -install elasticsearch/elasticsearch-analysis-kuromoji/1.0.0
bin/elasticsearch
curl -XPUT 'http://localhost:9200/wiki/' -d'
{
"index" : {
"analysis" : {
"tokenizer" : {
"kuromoji" : {
"type" : " kuromoji_tokenizer"
}
}
}
}
}
'
"error":"IndexCreationException[[wiki] failed to create index]; nested:
ElasticSearchIllegalArgumentException[failed to find tokenizer type [
kuromoji_tokenizer] for [kuromoji]]; nested:
NoClassSettingsException[Failed to load class setting [type] with value [
kuromoji_tokenizer]]; nested: ClassNotFoundException[ kuromoji_tokenizer];
","status":500}

And following is elasticsearch.log.

org.elasticsearch.indices.IndexCreationException: [wiki] failed to create
index
at
org.elasticsearch.indices.InternalIndicesService.createIndex(InternalIndicesService.java:289)
at
org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$1.execute(MetaDataCreateIndexService.java:241)
at
org.elasticsearch.cluster.service.InternalClusterService$2.run(InternalClusterService.java:208)
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: org.elasticsearch.ElasticSearchIllegalArgumentException: failed
to find tokenizer type [ kuromoji_tokenizer] for [kuromoji]
at
org.elasticsearch.index.analysis.AnalysisModule.configure(AnalysisModule.java:308)
at
org.elasticsearch.common.inject.AbstractModule.configure(AbstractModule.java:60)
at
org.elasticsearch.common.inject.spi.Elements$RecordingBinder.install(Elements.java:201)
at
org.elasticsearch.common.inject.spi.Elements.getElements(Elements.java:82)
at
org.elasticsearch.common.inject.InjectorShell$Builder.build(InjectorShell.java:130)
at
org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:99)
at
org.elasticsearch.common.inject.InjectorImpl.createChildInjector(InjectorImpl.java:129)
at
org.elasticsearch.common.inject.ModulesBuilder.createChildInjector(ModulesBuilder.java:66)
at
org.elasticsearch.indices.InternalIndicesService.createIndex(InternalIndicesService.java:287)
... 5 more
Caused by: org.elasticsearch.common.settings.NoClassSettingsException:
Failed to load class setting [type] with value [ kuromoji_tokenizer]
at
org.elasticsearch.common.settings.ImmutableSettings.getAsClass(ImmutableSettings.java:243)
at
org.elasticsearch.index.analysis.AnalysisModule.configure(AnalysisModule.java:298)
... 13 more
Caused by: java.lang.ClassNotFoundException: kuromoji_tokenizer
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.common.settings.ImmutableSettings.getAsClass(ImmutableSettings.java:227)
... 14 more

then I use only kuromoji analyzer, creating index and mapping is success,
can index documents.

curl -XPUT 'http://localhost:9200/wiki/'
curl -XPUT 'http://localhost:9200/wiki/page/_mapping' -d '
{
"page" : {
"properties" : {
"title" : { "type" : "string", "index" : "analyzed",
"analyzer":"kuromoji", "store" : "yes"},
"text" : { "type" : "string", "index" : "analyzed",
"analyzer":"kuromoji", "store" : "yes"}
}
}
}
'

I don't know why kuromoji_tokenizer occur ClassNotFound Exception, but even
then kuromoji analyzer can use.
Is there anything wrong steps for using kuromoji_tokenizer ?

Thank you,
hirotakaster

--

Hi Hirotakaster,

The tokenizer 'kuromoji_tokenizer' isn't available in version 1.0.0,
so that is the reason why kuromoji_tokenizer can't be found.
Also I noticed that you had a whitespace before the tokenizer name:
"type" : " kuromoji_tokenizer"
This also results in the tokenizer not being found.

I'll make a 1.1.0 release soon.

If you're impatient you can always try to build the project yourself
by cloning the project
(GitHub - elastic/elasticsearch-analysis-kuromoji: Japanese (kuromoji) Analysis Plugin)
and run: 'mvn clean package'

After this replace the 1.0.0 plugin jar file in the plugins directory
with the jar file that you've build with Maven.

Martijn

On 13 November 2012 11:52, hirotakaster hirotakaster@gmail.com wrote:

Hi guys,

I try to use Japanese(Kuromoji)Analysis plugin, but can't use
kuromoji_tokenizer by ClassNotFoundException.
here is comman line.

wget
https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.11.tar.gz
.
tar -zxvf elasticsearch-0.19.11.tar.gz
cd elasticsearch-0.19.11
bin/plugin -install elasticsearch/elasticsearch-analysis-kuromoji/1.0.0
bin/elasticsearch
curl -XPUT 'http://localhost:9200/wiki/' -d'
{
"index" : {
"analysis" : {
"tokenizer" : {
"kuromoji" : {
"type" : " kuromoji_tokenizer"
}
}
}
}
}
'
"error":"IndexCreationException[[wiki] failed to create index]; nested:
ElasticSearchIllegalArgumentException[failed to find tokenizer type [
kuromoji_tokenizer] for [kuromoji]]; nested: NoClassSettingsException[Failed
to load class setting [type] with value [ kuromoji_tokenizer]]; nested:
ClassNotFoundException[ kuromoji_tokenizer]; ","status":500}

And following is elasticsearch.log.

org.elasticsearch.indices.IndexCreationException: [wiki] failed to create
index
at
org.elasticsearch.indices.InternalIndicesService.createIndex(InternalIndicesService.java:289)
at
org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$1.execute(MetaDataCreateIndexService.java:241)
at
org.elasticsearch.cluster.service.InternalClusterService$2.run(InternalClusterService.java:208)
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: org.elasticsearch.ElasticSearchIllegalArgumentException: failed
to find tokenizer type [ kuromoji_tokenizer] for [kuromoji]
at
org.elasticsearch.index.analysis.AnalysisModule.configure(AnalysisModule.java:308)
at
org.elasticsearch.common.inject.AbstractModule.configure(AbstractModule.java:60)
at
org.elasticsearch.common.inject.spi.Elements$RecordingBinder.install(Elements.java:201)
at
org.elasticsearch.common.inject.spi.Elements.getElements(Elements.java:82)
at
org.elasticsearch.common.inject.InjectorShell$Builder.build(InjectorShell.java:130)
at
org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:99)
at
org.elasticsearch.common.inject.InjectorImpl.createChildInjector(InjectorImpl.java:129)
at
org.elasticsearch.common.inject.ModulesBuilder.createChildInjector(ModulesBuilder.java:66)
at
org.elasticsearch.indices.InternalIndicesService.createIndex(InternalIndicesService.java:287)
... 5 more
Caused by: org.elasticsearch.common.settings.NoClassSettingsException:
Failed to load class setting [type] with value [ kuromoji_tokenizer]
at
org.elasticsearch.common.settings.ImmutableSettings.getAsClass(ImmutableSettings.java:243)
at
org.elasticsearch.index.analysis.AnalysisModule.configure(AnalysisModule.java:298)
... 13 more
Caused by: java.lang.ClassNotFoundException: kuromoji_tokenizer
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.common.settings.ImmutableSettings.getAsClass(ImmutableSettings.java:227)
... 14 more

then I use only kuromoji analyzer, creating index and mapping is success,
can index documents.

curl -XPUT 'http://localhost:9200/wiki/'
curl -XPUT 'http://localhost:9200/wiki/page/_mapping' -d '
{
"page" : {
"properties" : {
"title" : { "type" : "string", "index" : "analyzed",
"analyzer":"kuromoji", "store" : "yes"},
"text" : { "type" : "string", "index" : "analyzed",
"analyzer":"kuromoji", "store" : "yes"}
}
}
}
'

I don't know why kuromoji_tokenizer occur ClassNotFound Exception, but even
then kuromoji analyzer can use.
Is there anything wrong steps for using kuromoji_tokenizer ?

Thank you,
hirotakaster

--

--
Met vriendelijke groet,

Martijn van Groningen

--

Hi Martijn,

Thanks for your advice!!
I known this github but I think that version is 1.0.0, so I didn't know why kuromoji_tokenizer
included.
I will try to build this with your advice.

Thank you sincerely,
hirotakater

2012年11月13日火曜日 22時31分42秒 UTC+9 Martijn v Groningen:

Hi Hirotakaster,

The tokenizer 'kuromoji_tokenizer' isn't available in version 1.0.0,
so that is the reason why kuromoji_tokenizer can't be found.
Also I noticed that you had a whitespace before the tokenizer name:
"type" : " kuromoji_tokenizer"
This also results in the tokenizer not being found.

I'll make a 1.1.0 release soon.

If you're impatient you can always try to build the project yourself
by cloning the project
(GitHub - elastic/elasticsearch-analysis-kuromoji: Japanese (kuromoji) Analysis Plugin)
and run: 'mvn clean package'

After this replace the 1.0.0 plugin jar file in the plugins directory
with the jar file that you've build with Maven.

Martijn

On 13 November 2012 11:52, hirotakaster <hirota...@gmail.com <javascript:>>
wrote:

Hi guys,

I try to use Japanese(Kuromoji)Analysis plugin, but can't use
kuromoji_tokenizer by ClassNotFoundException.
here is comman line.

wget

https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.11.tar.gz

.
tar -zxvf elasticsearch-0.19.11.tar.gz
cd elasticsearch-0.19.11
bin/plugin -install elasticsearch/elasticsearch-analysis-kuromoji/1.0.0
bin/elasticsearch
curl -XPUT 'http://localhost:9200/wiki/' -d'
{
"index" : {
"analysis" : {
"tokenizer" : {
"kuromoji" : {
"type" : " kuromoji_tokenizer"
}
}
}
}
}
'
"error":"IndexCreationException[[wiki] failed to create index]; nested:
ElasticSearchIllegalArgumentException[failed to find tokenizer type [
kuromoji_tokenizer] for [kuromoji]]; nested:
NoClassSettingsException[Failed
to load class setting [type] with value [ kuromoji_tokenizer]]; nested:
ClassNotFoundException[ kuromoji_tokenizer]; ","status":500}

And following is elasticsearch.log.

org.elasticsearch.indices.IndexCreationException: [wiki] failed to
create
index
at

org.elasticsearch.indices.InternalIndicesService.createIndex(InternalIndicesService.java:289)

at

org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$1.execute(MetaDataCreateIndexService.java:241)

at

org.elasticsearch.cluster.service.InternalClusterService$2.run(InternalClusterService.java:208)

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: org.elasticsearch.ElasticSearchIllegalArgumentException:
failed
to find tokenizer type [ kuromoji_tokenizer] for [kuromoji]
at

org.elasticsearch.index.analysis.AnalysisModule.configure(AnalysisModule.java:308)

at

org.elasticsearch.common.inject.AbstractModule.configure(AbstractModule.java:60)

at

org.elasticsearch.common.inject.spi.Elements$RecordingBinder.install(Elements.java:201)

at

org.elasticsearch.common.inject.spi.Elements.getElements(Elements.java:82)

at

org.elasticsearch.common.inject.InjectorShell$Builder.build(InjectorShell.java:130)

at

org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:99)

at

org.elasticsearch.common.inject.InjectorImpl.createChildInjector(InjectorImpl.java:129)

at

org.elasticsearch.common.inject.ModulesBuilder.createChildInjector(ModulesBuilder.java:66)

at

org.elasticsearch.indices.InternalIndicesService.createIndex(InternalIndicesService.java:287)

... 5 more
Caused by: org.elasticsearch.common.settings.NoClassSettingsException:
Failed to load class setting [type] with value [ kuromoji_tokenizer]
at

org.elasticsearch.common.settings.ImmutableSettings.getAsClass(ImmutableSettings.java:243)

at

org.elasticsearch.index.analysis.AnalysisModule.configure(AnalysisModule.java:298)

... 13 more
Caused by: java.lang.ClassNotFoundException: kuromoji_tokenizer
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.common.settings.ImmutableSettings.getAsClass(ImmutableSettings.java:227)

... 14 more

then I use only kuromoji analyzer, creating index and mapping is
success,
can index documents.

curl -XPUT 'http://localhost:9200/wiki/'
curl -XPUT 'http://localhost:9200/wiki/page/_mapping' -d '
{
"page" : {
"properties" : {
"title" : { "type" : "string", "index" : "analyzed",
"analyzer":"kuromoji", "store" : "yes"},
"text" : { "type" : "string", "index" : "analyzed",
"analyzer":"kuromoji", "store" : "yes"}
}
}
}
'

I don't know why kuromoji_tokenizer occur ClassNotFound Exception, but
even
then kuromoji analyzer can use.
Is there anything wrong steps for using kuromoji_tokenizer ?

Thank you,
hirotakaster

--

--
Met vriendelijke groet,

Martijn van Groningen

--

Hi Hirotakaster,

I've released the 1.1.0 version of the kuromoji analysis plugin.

Martijn

On 13 November 2012 15:49, hirotakaster hirotakaster@gmail.com wrote:

Hi Martijn,

Thanks for your advice!!
I known this github but I think that version is 1.0.0, so I didn't know why
kuromoji_tokenizer included.
I will try to build this with your advice.

Thank you sincerely,
hirotakater

2012年11月13日火曜日 22時31分42秒 UTC+9 Martijn v Groningen:

Hi Hirotakaster,

The tokenizer 'kuromoji_tokenizer' isn't available in version 1.0.0,
so that is the reason why kuromoji_tokenizer can't be found.
Also I noticed that you had a whitespace before the tokenizer name:
"type" : " kuromoji_tokenizer"
This also results in the tokenizer not being found.

I'll make a 1.1.0 release soon.

If you're impatient you can always try to build the project yourself
by cloning the project
(GitHub - elastic/elasticsearch-analysis-kuromoji: Japanese (kuromoji) Analysis Plugin)
and run: 'mvn clean package'

After this replace the 1.0.0 plugin jar file in the plugins directory
with the jar file that you've build with Maven.

Martijn

On 13 November 2012 11:52, hirotakaster hirota...@gmail.com wrote:

Hi guys,

I try to use Japanese(Kuromoji)Analysis plugin, but can't use
kuromoji_tokenizer by ClassNotFoundException.
here is comman line.

wget

https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.11.tar.gz
.
tar -zxvf elasticsearch-0.19.11.tar.gz
cd elasticsearch-0.19.11
bin/plugin -install elasticsearch/elasticsearch-analysis-kuromoji/1.0.0
bin/elasticsearch
curl -XPUT 'http://localhost:9200/wiki/' -d'
{
"index" : {
"analysis" : {
"tokenizer" : {
"kuromoji" : {
"type" : " kuromoji_tokenizer"
}
}
}
}
}
'
"error":"IndexCreationException[[wiki] failed to create index]; nested:
ElasticSearchIllegalArgumentException[failed to find tokenizer type [
kuromoji_tokenizer] for [kuromoji]]; nested:
NoClassSettingsException[Failed
to load class setting [type] with value [ kuromoji_tokenizer]]; nested:
ClassNotFoundException[ kuromoji_tokenizer]; ","status":500}

And following is elasticsearch.log.

org.elasticsearch.indices.IndexCreationException: [wiki] failed to
create
index
at

org.elasticsearch.indices.InternalIndicesService.createIndex(InternalIndicesService.java:289)
at

org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$1.execute(MetaDataCreateIndexService.java:241)
at

org.elasticsearch.cluster.service.InternalClusterService$2.run(InternalClusterService.java:208)
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: org.elasticsearch.ElasticSearchIllegalArgumentException:
failed
to find tokenizer type [ kuromoji_tokenizer] for [kuromoji]
at

org.elasticsearch.index.analysis.AnalysisModule.configure(AnalysisModule.java:308)
at

org.elasticsearch.common.inject.AbstractModule.configure(AbstractModule.java:60)
at

org.elasticsearch.common.inject.spi.Elements$RecordingBinder.install(Elements.java:201)
at

org.elasticsearch.common.inject.spi.Elements.getElements(Elements.java:82)
at

org.elasticsearch.common.inject.InjectorShell$Builder.build(InjectorShell.java:130)
at

org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:99)
at

org.elasticsearch.common.inject.InjectorImpl.createChildInjector(InjectorImpl.java:129)
at

org.elasticsearch.common.inject.ModulesBuilder.createChildInjector(ModulesBuilder.java:66)
at

org.elasticsearch.indices.InternalIndicesService.createIndex(InternalIndicesService.java:287)
... 5 more
Caused by: org.elasticsearch.common.settings.NoClassSettingsException:
Failed to load class setting [type] with value [ kuromoji_tokenizer]
at

org.elasticsearch.common.settings.ImmutableSettings.getAsClass(ImmutableSettings.java:243)
at

org.elasticsearch.index.analysis.AnalysisModule.configure(AnalysisModule.java:298)
... 13 more
Caused by: java.lang.ClassNotFoundException: kuromoji_tokenizer
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.common.settings.ImmutableSettings.getAsClass(ImmutableSettings.java:227)
... 14 more

then I use only kuromoji analyzer, creating index and mapping is
success,
can index documents.

curl -XPUT 'http://localhost:9200/wiki/'
curl -XPUT 'http://localhost:9200/wiki/page/_mapping' -d '
{
"page" : {
"properties" : {
"title" : { "type" : "string", "index" : "analyzed",
"analyzer":"kuromoji", "store" : "yes"},
"text" : { "type" : "string", "index" : "analyzed",
"analyzer":"kuromoji", "store" : "yes"}
}
}
}
'

I don't know why kuromoji_tokenizer occur ClassNotFound Exception, but
even
then kuromoji analyzer can use.
Is there anything wrong steps for using kuromoji_tokenizer ?

Thank you,
hirotakaster

--

--
Met vriendelijke groet,

Martijn van Groningen

--

--
Met vriendelijke groet,

Martijn van Groningen

--