yahia
(yahia)
February 26, 2013, 9:28am
1
I used apache SORL in my project and I would like to migrate NOW to elastic
search, but I encountered a problem during initialization of a Node "node =
nodeBuilder().clusterName("elasticsearch").node();"
the server shows me this error* "Error injecting constructor,
java.lang.NoSuchFieldError: LUCENE_36"*, I searched the net and I found the
source of problem that I do not use the right lucene jar, but the jar
lucene will be added automatically without elasticsearch !
elasticsearch added the flowing lucene jars : lucene-analyzer-3.6.2.jar,
lucene-core3.6.2.jar,lucene-highlighter-3.6.2.jar,lucene-memory-3.6.2.jar,lucene-queries-.3.6.2
i use elasticsearch 0.20.4, and my .classpath file pointing to the correct
lucene jars...
My pom.xml:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
4.0.0
org.neoxia
war
0.1.0.BUILD-SNAPSHOT
nLooker
<roo.version>1.1.0.M1</roo.version>
<spring.version>3.0.5.RELEASE</spring.version>
<aspectj.version>1.6.9</aspectj.version>
<slf4j.version>1.6.1</slf4j.version>
spring-maven-release
Spring Maven Release Repository
http://maven.springframework.org/release
spring-maven-milestone
Spring Maven Milestone Repository
http://maven.springframework.org/milestone
JBoss Repo
https://repository.jboss.org/nexus/content/repositories/releases
JBoss Repo
junit
junit
4.8.1
test
log4j
log4j
1.2.16
org.slf4j
slf4j-api
${slf4j.version}
org.slf4j
jcl-over-slf4j
${slf4j.version}
org.slf4j
slf4j-log4j12
${slf4j.version}
org.aspectj
aspectjrt
${aspectj.version}
javax.servlet
servlet-api
2.5
provided
org.springframework.roo
org.springframework.roo.annotations
${roo.version}
provided
org.springframework
spring-core
${spring.version}
commons-logging
commons-logging
org.springframework
spring-test
${spring.version}
test
commons-logging
commons-logging
org.springframework
spring-context
${spring.version}
org.springframework
spring-aop
${spring.version}
org.springframework
spring-aspects
${spring.version}
org.springframework
spring-tx
${spring.version}
mysql
mysql-connector-java
5.1.16
jar
false
org.hibernate
hibernate-core
3.5.1-Final
cglib
cglib
net.sf.ehcache
ehcache
asm
asm
asm
asm-attrs
javax.transaction
jta
org.hibernate
hibernate-entitymanager
3.5.1-Final
cglib
cglib
dom4j
dom4j
org.hibernate.javax.persistence
hibernate-jpa-2.0-api
1.0.0.Final
org.hibernate
hibernate-validator
4.0.2.GA
javax.xml.bind
jaxb-api
com.sun.xml.bind
jaxb-impl
javax.validation
validation-api
1.0.0.GA
cglib
cglib-nodep
2.2
javax.transaction
jta
1.1
org.springframework
spring-jdbc
${spring.version}
org.springframework
spring-orm
${spring.version}
commons-pool
commons-pool
1.5.4
commons-logging
commons-logging
commons-dbcp
commons-dbcp
1.3
commons-logging
commons-logging
commons-pool
commons-pool
xerces
xerces
xerces
xercesImpl
xml-apis
xml-apis
com.vaadin
vaadin
6.6.0
org.springframework
spring-web
${spring.version}
commons-logging
commons-logging
org.springframework
spring-webmvc
${spring.version}
org.codehaus.jackson
jackson-mapper-asl
1.6.0
org.codehaus.jackson
jackson-core-asl
1.6.0
org.apache.commons
commons-lang3
3.0
org.elasticsearch
elasticsearch
0.20.4
org.elasticsearch
elasticsearch-mapper-attachments
0.17.6
com.fasterxml.jackson.core
jackson-databind
2.1.3
org.hamcrest
hamcrest-all
1.1
test
org.apache.maven.plugins
maven-war-plugin
2.1-beta-1
org.apache.maven.plugins
maven-compiler-plugin
2.1
1.6
1.6
org.codehaus.mojo
aspectj-maven-plugin
1.0
org.aspectj
aspectjrt
${aspectj.version}
org.aspectj
aspectjtools
${aspectj.version}
true
org.springframework
spring-aspects
1.6
1.6
org.apache.maven.plugins
maven-resources-plugin
2.4.2
UTF-8
org.apache.maven.plugins
maven-surefire-plugin
2.5
**/*_Roo_*
org.apache.maven.plugins
maven-assembly-plugin
2.2-beta-5
jar-with-dependencies
org.apache.maven.plugins
maven-deploy-plugin
2.5
org.apache.maven.plugins
maven-eclipse-plugin
2.7
true
false
2.0
org.eclipse.ajdt.core.ajbuilder
org.springframework.aspects
org.springframework.ide.eclipse.core.springbuilder
org.eclipse.ajdt.ui.ajnature
com.springsource.sts.roo.core.nature
org.springframework.ide.eclipse.core.springnature
org.apache.maven.plugins
maven-idea-plugin
2.2
true
true
org.codehaus.mojo
tomcat-maven-plugin
1.0
org.mortbay.jetty
jetty-maven-plugin
7.1.2.v20100523
/${project.name}
nLooker
my .classpath:
<?xml version="1.0" encoding="UTF-8"?>
it's been a day and I still have not found the solution !!!
--
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 .
dadoonet
(David Pilato)
February 26, 2013, 9:42am
2
Did you clean your project?
Any chance you have old dependencies remaining somewhere?
BTW, if you are using Spring, may I suggest that you give a look at GitHub - dadoonet/spring-elasticsearch: Spring factories for elasticsearch
It could help you to inject your client.
--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr | @scrutmydocs
Le 26 févr. 2013 à 10:28, Ammar Yahia yahia.ammar.info@gmail.com a écrit :
I used apache SORL in my project and I would like to migrate NOW to Elasticsearch, but I encountered a problem during initialization of a Node "node = nodeBuilder().clusterName("elasticsearch").node();"
the server shows me this error "Error injecting constructor, java.lang.NoSuchFieldError: LUCENE_36", I searched the net and I found the source of problem that I do not use the right lucene jar, but the jar lucene will be added automatically without elasticsearch !
elasticsearch added the flowing lucene jars : lucene-analyzer-3.6.2.jar, lucene-core3.6.2.jar,lucene-highlighter-3.6.2.jar,lucene-memory-3.6.2.jar,lucene-queries-.3.6.2
i use elasticsearch 0.20.4, and my .classpath file pointing to the correct lucene jars...
My pom.xml:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
4.0.0
org.neoxia
war
0.1.0.BUILD-SNAPSHOT
nLooker
<roo.version>1.1.0.M1</roo.version>
<spring.version>3.0.5.RELEASE</spring.version>
<aspectj.version>1.6.9</aspectj.version>
<slf4j.version>1.6.1</slf4j.version>
spring-maven-release
Spring Maven Release Repository
http://maven.springframework.org/release
spring-maven-milestone
Spring Maven Milestone Repository
http://maven.springframework.org/milestone
JBoss Repo
Index of /repositories/releases
JBoss Repo
<!-- General dependencies for standard applications -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>${aspectj.version}</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>
<!-- ROO dependencies -->
<dependency>
<groupId>org.springframework.roo</groupId>
<artifactId>org.springframework.roo.annotations</artifactId>
<version>${roo.version}</version>
<scope>provided</scope>
</dependency>
<!-- Spring dependencies -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.16</version>
<type>jar</type>
<optional>false</optional>
</dependency>
<!-- <dependency> -->
<!-- <groupId>org.hsqldb</groupId> -->
<!-- <artifactId>hsqldb</artifactId> -->
<!-- <version>2.0.0</version> -->
<!-- </dependency> -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>3.5.1-Final</version>
<exclusions>
<exclusion>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
</exclusion>
<exclusion>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache</artifactId>
</exclusion>
<exclusion>
<groupId>asm</groupId>
<artifactId>asm</artifactId>
</exclusion>
<exclusion>
<groupId>asm</groupId>
<artifactId>asm-attrs</artifactId>
</exclusion>
<exclusion>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>3.5.1-Final</version>
<exclusions>
<exclusion>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
</exclusion>
<exclusion>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.0-api</artifactId>
<version>1.0.0.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>4.0.2.GA</version>
<exclusions>
<exclusion>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
</dependency>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib-nodep</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>commons-pool</groupId>
<artifactId>commons-pool</artifactId>
<version>1.5.4</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.3</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
<exclusion>
<groupId>commons-pool</groupId>
<artifactId>commons-pool</artifactId>
</exclusion>
<exclusion>
<groupId>xerces</groupId>
<artifactId>xerces</artifactId>
</exclusion>
<exclusion>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
</exclusion>
<exclusion>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin</artifactId>
<version>6.6.0</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.6.0</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-asl</artifactId>
<version>1.6.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.0</version>
</dependency>
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<version>0.20.4</version>
</dependency>
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch-mapper-attachments</artifactId>
<version>0.17.6</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.1.3</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.1</version>
<scope>test</scope>
</dependency>
org.apache.maven.plugins
maven-war-plugin
2.1-beta-1
org.apache.maven.plugins
maven-compiler-plugin
2.1
1.6
1.6
org.codehaus.mojo
aspectj-maven-plugin
1.0
org.aspectj
aspectjrt
${aspectj.version}
org.aspectj
aspectjtools
${aspectj.version}
true
org.springframework
spring-aspects
1.6
1.6
org.apache.maven.plugins
maven-resources-plugin
2.4.2
UTF-8
org.apache.maven.plugins
maven-surefire-plugin
2.5
**/*_Roo_*
org.apache.maven.plugins
maven-assembly-plugin
2.2-beta-5
jar-with-dependencies
org.apache.maven.plugins
maven-deploy-plugin
2.5
org.apache.maven.plugins
maven-eclipse-plugin
2.7
true
false
2.0
org.eclipse.ajdt.core.ajbuilder
org.springframework.aspects
org.springframework.ide.eclipse.core.springbuilder
org.eclipse.ajdt.ui.ajnature
com.springsource.sts.roo.core.nature
org.springframework.ide.eclipse.core.springnature
org.apache.maven.plugins
maven-idea-plugin
2.2
true
true
org.codehaus.mojo
tomcat-maven-plugin
1.0
org.mortbay.jetty
jetty-maven-plugin
7.1.2.v20100523
/${project.name}
nLooker
my .classpath:
<?xml version="1.0" encoding="UTF-8"?>
it's been a day and I still have not found the solution !!!
--
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 .
yahia
(yahia)
February 26, 2013, 9:54am
3
thank you for the link, and I'll try to integrate elasticsearch with spring,
yes I refreshed my project several times but no solution, the problem
persists, and I could not find the dependency that causes me the problem
!!
--
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 .
javanna
(Luca Cavanna)
February 26, 2013, 9:59am
4
Hi,
given that you previously had solr-core 3.3 in your classpath, you're just
dealing with an old lucene here, which came with solr-core itself.
Elasticsearch is trying to make use of it with no luck.
I would try again to clean the project in order to get rid of the old
dependencies that are now commented out (and transitive ones) and make use
of lucene 3.6.2 which comes with elasticsearch 0.20.4.
Good luck!
On Tuesday, February 26, 2013 10:54:45 AM UTC+1, Ammar Yahia wrote:
thank you for the link, and I'll try to integrate elasticsearch with
spring,
yes I refreshed my project several times but no solution, the problem
persists, and I could not find the dependency that causes me the problem
!!
--
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 .
yahia
(yahia)
February 26, 2013, 10:29am
5
Hi,
I remove SORL dependencies from my pom.xml and I cleaned the project, my
.classpath file points to the good lucene.jar 3.6.2, but the problem still
persists !!!:
my .classPath:
<?xml version="1.0" encoding="UTF-8"?>
no luck until now
--
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 .
dadoonet
(David Pilato)
February 26, 2013, 10:48am
6
Replace the mapper attachment with a more recent one.
--
David
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
Le 26 févr. 2013 à 11:29, Ammar Yahia yahia.ammar.info@gmail.com a écrit :
Hi,
I remove SORL dependencies from my pom.xml and I cleaned the project, my .classpath file points to the good lucene.jar 3.6.2, but the problem still persists !!!:
my .classPath:
<?xml version="1.0" encoding="UTF-8"?>
no luck until now
--
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 .
javanna
(Luca Cavanna)
February 26, 2013, 10:56am
7
Sure, I agree that's definitely the problem. But I thought the
elasticsearch dependency was supposed to be provided in plugins instead of
compile...maybe I'm wrong.
Cheers
On Tuesday, February 26, 2013 11:48:15 AM UTC+1, David Pilato wrote:
Replace the mapper attachment with a more recent one.
--
David
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
Le 26 févr. 2013 à 11:29, Ammar Yahia <yahia.am...@gmail.com <javascript:>>
a écrit :
Hi,
I remove SORL dependencies from my pom.xml and I cleaned the project, my
.classpath file points to the good lucene.jar 3.6.2, but the problem still
persists !!!:
my .classPath:
<?xml version="1.0" encoding="UTF-8"?>
no luck until now
--
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 elasticsearc...@googlegroups.com <javascript:>.
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 .
yahia
(yahia)
February 26, 2013, 3:37pm
8
Hi
finally the error has disappeared, I found a jar solr lying around
somewhere in my project, which has caused me problems, even though the
.classpath file does not use this jar
As soon as I removed the jar, the problem is solved.
--
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 .
yahia
(yahia)
February 26, 2013, 3:38pm
9
thank you very much for your support
cordially
--
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 .