feliperazeek / playframework-elasticsearch

Integrate Elastic Search in a Play! Framework Application. This module uses JPA events to notify Elastic Search of events of their own. It embeds a running Elastic Search instance for Rapid Development.
http://geeks.aretotally.in/play-framework-module-elastic-search-distributed-searching-with-json-http-rest-or-java
84 stars 43 forks source link

Fixes required for building latest release #30

Closed bgooren closed 13 years ago

feliperazeek commented 13 years ago

Hey Bas it seems like the problem is still there:

compile: [javac] /Users/felipera/development/playframework-elasticsearch/build.xml:29: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds [javac] Compiling 31 source files to /Users/felipera/development/playframework-elasticsearch/tmp/classes [javac] /Users/felipera/development/playframework-elasticsearch/src/play/modules/elasticsearch/ElasticSearch.java:61: cannot find symbol [javac] symbol : method setQuery(org.elasticsearch.index.query.QueryBuilder) [javac] location: class org.elasticsearch.client.action.search.SearchRequestBuilder [javac] SearchRequestBuilder builder = client().prepareSearch(index).setSearchType(SearchType.QUERY_THEN_FETCH).setQuery(query); [javac] ^ [javac] 1 error

bgooren commented 13 years ago

It looks like it's an issue with elastic search, since setQuery() is a method on an ES class.

Haven't been able to reproduce it so far, so not sure how we should proceed. Ideas?

Bas

Op 2-11-2011 18:10, schreef Felipe Oliveira:

Hey Bas it seems like the problem is still there:

compile: [javac] /Users/felipera/development/playframework-elasticsearch/build.xml:29: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds [javac] Compiling 31 source files to /Users/felipera/development/playframework-elasticsearch/tmp/classes [javac] /Users/felipera/development/playframework-elasticsearch/src/play/modules/elasticsearch/ElasticSearch.java:61: cannot find symbol [javac] symbol : method setQuery(org.elasticsearch.index.query.QueryBuilder) [javac] location: class org.elasticsearch.client.action.search.SearchRequestBuilder [javac] SearchRequestBuilder builder = client().prepareSearch(index).setSearchType(SearchType.QUERY_THEN_FETCH).setQuery(query); [javac] ^ [javac] 1 error

feliperazeek commented 13 years ago

Lemme look at it I will figure it out. I am in Turks and Caicos now, heading back to the US tomorrow. That will keep me busy in the plane ride!!! :)

Thank you, Felipe Oliveira

Blog: http://geeks.aretotally.in Twitter: http://twitter.com/_felipera Play Framework: http://playframework.info Skype: felipera2000 Mobile: 561.756.7465

On Wednesday, November 2, 2011 at 10:13 AM, Sebastian Gooren wrote:

It looks like it's an issue with elastic search, since setQuery() is a method on an ES class.

Haven't been able to reproduce it so far, so not sure how we should proceed. Ideas?

Bas

Op 2-11-2011 18:10, schreef Felipe Oliveira:

Hey Bas it seems like the problem is still there:

compile: [javac] /Users/felipera/development/playframework-elasticsearch/build.xml:29: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds [javac] Compiling 31 source files to /Users/felipera/development/playframework-elasticsearch/tmp/classes [javac] /Users/felipera/development/playframework-elasticsearch/src/play/modules/elasticsearch/ElasticSearch.java:61: cannot find symbol [javac] symbol : method setQuery(org.elasticsearch.index.query.QueryBuilder) [javac] location: class org.elasticsearch.client.action.search.SearchRequestBuilder [javac] SearchRequestBuilder builder = client().prepareSearch(index).setSearchType(SearchType.QUERY_THEN_FETCH).setQuery(query); [javac] ^ [javac] 1 error

Reply to this email directly or view it on GitHub: https://github.com/feliperazeek/playframework-elasticsearch/pull/30#issuecomment-2606309

feliperazeek commented 13 years ago

Hi Bas, I fixed the compilation issue but didn't have too much time to test it. I am getting the following exception when I add a model:

org.elasticsearch.common.jackson.JsonGenerationException: Can not start an object, expecting field name at org.elasticsearch.common.jackson.impl.JsonGeneratorBase._reportError(JsonGeneratorBase.java:480) at org.elasticsearch.common.jackson.impl.Utf8Generator._verifyValueWrite(Utf8Generator.java:1015) at org.elasticsearch.common.jackson.impl.Utf8Generator.writeStartObject(Utf8Generator.java:370) at org.elasticsearch.common.xcontent.json.JsonXContentGenerator.writeStartObject(JsonXContentGenerator.java:62) at org.elasticsearch.common.xcontent.XContentBuilder.startObject(XContentBuilder.java:157) at play.modules.elasticsearch.mapping.impl.PlayModelMapper.addModel(PlayModelMapper.java:127) at play.modules.elasticsearch.mapping.impl.PlayModelMapper.addModel(PlayModelMapper.java:26) at play.modules.elasticsearch.adapter.ElasticSearchAdapter.indexModel(ElasticSearchAdapter.java:146) at play.modules.elasticsearch.ElasticSearchIndexAction.invoke(ElasticSearchIndexAction.java:53) at play.modules.elasticsearch.ElasticSearchIndexer.doJob(ElasticSearchIndexer.java:54) at play.jobs.Job.doJobWithResult(Job.java:50) at play.jobs.Job.call(Job.java:146) at play.jobs.Job$1.call(Job.java:66) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206) 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:680)

Do you see the same thing?

bgooren commented 13 years ago

Hi Felipe,

Looking into it right now...

Bas

Op 3-11-2011 0:32, schreef Felipe Oliveira:

Hi Bas, I fixed the compilation issue but didn't have too much time to test it. I am getting the following exception when I add a model:

org.elasticsearch.common.jackson.JsonGenerationException: Can not start an object, expecting field name at org.elasticsearch.common.jackson.impl.JsonGeneratorBase._reportError(JsonGeneratorBase.java:480) at org.elasticsearch.common.jackson.impl.Utf8Generator._verifyValueWrite(Utf8Generator.java:1015) at org.elasticsearch.common.jackson.impl.Utf8Generator.writeStartObject(Utf8Generator.java:370) at org.elasticsearch.common.xcontent.json.JsonXContentGenerator.writeStartObject(JsonXContentGenerator.java:62) at org.elasticsearch.common.xcontent.XContentBuilder.startObject(XContentBuilder.java:157) at play.modules.elasticsearch.mapping.impl.PlayModelMapper.addModel(PlayModelMapper.java:127) at play.modules.elasticsearch.mapping.impl.PlayModelMapper.addModel(PlayModelMapper.java:26) at play.modules.elasticsearch.adapter.ElasticSearchAdapter.indexModel(ElasticSearchAdapter.java:146) at play.modules.elasticsearch.ElasticSearchIndexAction.invoke(ElasticSearchIndexAction.java:53) at play.modules.elasticsearch.ElasticSearchIndexer.doJob(ElasticSearchIndexer.java:54) at play.jobs.Job.doJobWithResult(Job.java:50) at play.jobs.Job.call(Job.java:146) at play.jobs.Job$1.call(Job.java:66) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206) 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:680)

Do you see the same thing?

bgooren commented 13 years ago

Hi!

I've fixed the error you hit, will push my changes shortly.

However, I also ran into you compilation issues on one of my test projects. It turns out that this project was still referencing elasticsearch-0.16.2 (which does not contain the necessary setQuery() method). I've just updated the project so it references the new elasticsearch-0.17.6 and now it works. So your compilation fix is not required (anymor).

Bas

Op 3-11-2011 0:32, schreef Felipe Oliveira:

Hi Bas, I fixed the compilation issue but didn't have too much time to test it. I am getting the following exception when I add a model:

org.elasticsearch.common.jackson.JsonGenerationException: Can not start an object, expecting field name at org.elasticsearch.common.jackson.impl.JsonGeneratorBase._reportError(JsonGeneratorBase.java:480) at org.elasticsearch.common.jackson.impl.Utf8Generator._verifyValueWrite(Utf8Generator.java:1015) at org.elasticsearch.common.jackson.impl.Utf8Generator.writeStartObject(Utf8Generator.java:370) at org.elasticsearch.common.xcontent.json.JsonXContentGenerator.writeStartObject(JsonXContentGenerator.java:62) at org.elasticsearch.common.xcontent.XContentBuilder.startObject(XContentBuilder.java:157) at play.modules.elasticsearch.mapping.impl.PlayModelMapper.addModel(PlayModelMapper.java:127) at play.modules.elasticsearch.mapping.impl.PlayModelMapper.addModel(PlayModelMapper.java:26) at play.modules.elasticsearch.adapter.ElasticSearchAdapter.indexModel(ElasticSearchAdapter.java:146) at play.modules.elasticsearch.ElasticSearchIndexAction.invoke(ElasticSearchIndexAction.java:53) at play.modules.elasticsearch.ElasticSearchIndexer.doJob(ElasticSearchIndexer.java:54) at play.jobs.Job.doJobWithResult(Job.java:50) at play.jobs.Job.call(Job.java:146) at play.jobs.Job$1.call(Job.java:66) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206) 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:680)

Do you see the same thing?

bgooren commented 13 years ago

Felipe,

I've just issued a pull request which fixes this problem. It also reverts a change you made to ElasticSearch#builder(), since that change simply means you have an "old" version (pre- 0.17.0) of elasticsearch on your project classpath. If you are using at least version 0.2 of the elasticsearch module, it should automatically use 0.17.6.

Bas

Op 3-11-2011 0:32, schreef Felipe Oliveira:

Hi Bas, I fixed the compilation issue but didn't have too much time to test it. I am getting the following exception when I add a model:

org.elasticsearch.common.jackson.JsonGenerationException: Can not start an object, expecting field name at org.elasticsearch.common.jackson.impl.JsonGeneratorBase._reportError(JsonGeneratorBase.java:480) at org.elasticsearch.common.jackson.impl.Utf8Generator._verifyValueWrite(Utf8Generator.java:1015) at org.elasticsearch.common.jackson.impl.Utf8Generator.writeStartObject(Utf8Generator.java:370) at org.elasticsearch.common.xcontent.json.JsonXContentGenerator.writeStartObject(JsonXContentGenerator.java:62) at org.elasticsearch.common.xcontent.XContentBuilder.startObject(XContentBuilder.java:157) at play.modules.elasticsearch.mapping.impl.PlayModelMapper.addModel(PlayModelMapper.java:127) at play.modules.elasticsearch.mapping.impl.PlayModelMapper.addModel(PlayModelMapper.java:26) at play.modules.elasticsearch.adapter.ElasticSearchAdapter.indexModel(ElasticSearchAdapter.java:146) at play.modules.elasticsearch.ElasticSearchIndexAction.invoke(ElasticSearchIndexAction.java:53) at play.modules.elasticsearch.ElasticSearchIndexer.doJob(ElasticSearchIndexer.java:54) at play.jobs.Job.doJobWithResult(Job.java:50) at play.jobs.Job.call(Job.java:146) at play.jobs.Job$1.call(Job.java:66) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206) 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:680)

Do you see the same thing?

feliperazeek commented 13 years ago

Bas releasing 0.3 now! Thank you very much again!

bgooren commented 13 years ago

Thanks! I've just pinged pascal, he'll be happy ;-)

How was your flight?

Bas

Op 3-11-2011 16:04, schreef Felipe Oliveira:

Bas releasing 0.3 now! Thank you very much again!


Reply to this email directly or view it on GitHub: https://github.com/feliperazeek/playframework-elasticsearch/pull/30#issuecomment-2618035

feliperazeek commented 13 years ago

Leaving soon!