# Compile error with 0.20.2

**URL:** https://discuss.elastic.co/t/compile-error-with-0-20-2/10498
**Category:** Elasticsearch
**Created:** [January 24, 2013, 7:20pm UTC](https://discuss.elastic.co/t/compile-error-with-0-20-2/10498 "2013-01-24T19:20:46Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![sulemanmubarik](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@sulemanmubarik](https://discuss.elastic.co/u/sulemanmubarik)
#### Post date: [January 24, 2013, 7:20pm UTC](https://discuss.elastic.co/t/compile-error-with-0-20-2/10498/1 "2013-01-24T19:20:46Z")

</div>

Hi

I have upgraded the ES from 0.19.12 to 0.20.2

And I am unable to compile the code with maven I am getting this error

error: value andFilter is not a member of object  
org.elasticsearch.index.query.FilterBuilders

[INFO] var andFilterBuilder = FilterBuilders.andFilter()

But it is working fine with 0.19.12

I get the same error with 0.20.0

Thanks

--

---

<div class="post-metadata">

### Author: ![sulemanmubarik](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@sulemanmubarik](https://discuss.elastic.co/u/sulemanmubarik)
#### Post date: [January 24, 2013, 7:23pm UTC](https://discuss.elastic.co/t/compile-error-with-0-20-2/10498/2 "2013-01-24T19:23:05Z")

</div>

here is the full error

[ERROR] error: error while loading FilterBuilders, class file  
'......./.m2/repository/org/elasticsearch/elasticsearch/0.20.2/elasticsearch-0.20.2.jar(org/elasticsearch/index/query/FilterBuilders.class)'  
is broken  
[INFO] (class java.lang.NullPointerException/)

error: value andFilter is not a member of object  
org.elasticsearch.index.query.FilterBuilders

[INFO] var andFilterBuilder = FilterBuilders.andFilter()

On Thursday, January 24, 2013 11:20:46 AM UTC-8, suleman mubarik wrote:

> Hi
> 
> I have upgraded the ES from 0.19.12 to 0.20.2
> 
> And I am unable to compile the code with maven I am getting this error
> 
> error: value andFilter is not a member of object  
> org.elasticsearch.index.query.FilterBuilders
> 
> [INFO] var andFilterBuilder = FilterBuilders.andFilter()
> 
> But it is working fine with 0.19.12
> 
> I get the same error with 0.20.0
> 
> Thanks

--

---

<div class="post-metadata">

### Author: ![sulemanmubarik](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@sulemanmubarik](https://discuss.elastic.co/u/sulemanmubarik)
#### Post date: [January 24, 2013, 7:29pm UTC](https://discuss.elastic.co/t/compile-error-with-0-20-2/10498/3 "2013-01-24T19:29:36Z")

</div>

[ERROR] error: error while loading QueryBuilders, class file  
'....../.m2/repository/org/elasticsearch/elasticsearch/0.20.2/elasticsearch-0.20.2.jar(org/elasticsearch/index/query/QueryBuilders.class)'  
is broken  
[INFO] (class java.lang.NullPointerException/)

[ERROR] error: error while loading FilterBuilders, class file  
'......./.m2/repository/org/  
elasticsearch/elasticsearch/0.20.2/elasticsearch-0.20.2.jar(org/elasticsearch/index/query/FilterBuilders.class)'  
is broken  
[INFO] (class java.lang.NullPointerException/)

error: value andFilter is not a member of object  
org.elasticsearch.index.query.FilterBuilders

[INFO] var andFilterBuilder = FilterBuilders.andFilter()

On Thursday, January 24, 2013 11:20:46 AM UTC-8, suleman mubarik wrote:

> Hi
> 
> I have upgraded the ES from 0.19.12 to 0.20.2
> 
> And I am unable to compile the code with maven I am getting this error
> 
> error: value andFilter is not a member of object  
> org.elasticsearch.index.query.FilterBuilders
> 
> [INFO] var andFilterBuilder = FilterBuilders.andFilter()
> 
> But it is working fine with 0.19.12
> 
> I get the same error with 0.20.0
> 
> Thanks

--

---

<div class="post-metadata">

### Author: ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)
#### Post date: [January 27, 2013, 10:35am UTC](https://discuss.elastic.co/t/compile-error-with-0-20-2/10498/4 "2013-01-27T10:35:20Z")

</div>

Unsure, its there in the codebase: andFilte, the failures look strange, are you getting NPE while compiling?

On Jan 24, 2013, at 8:29 PM, suleman mubarik [sulemanmubarik@gmail.com](mailto:sulemanmubarik@gmail.com) wrote:

> [ERROR] error: error while loading QueryBuilders, class file '....../.m2/repository/org/elasticsearch/elasticsearch/0.20.2/elasticsearch-0.20.2.jar(org/elasticsearch/index/query/QueryBuilders.class)' is broken  
> [INFO] (class java.lang.NullPointerException/)
> 
> [ERROR] error: error while loading FilterBuilders, class file '......./.m2/repository/org/  
> elasticsearch/elasticsearch/0.20.2/elasticsearch-0.20.2.jar(org/elasticsearch/index/query/FilterBuilders.class)' is broken  
> [INFO] (class java.lang.NullPointerException/)
> 
> error: value andFilter is not a member of object org.elasticsearch.index.query.FilterBuilders
> 
> [INFO] var andFilterBuilder = FilterBuilders.andFilter()
> 
> On Thursday, January 24, 2013 11:20:46 AM UTC-8, suleman mubarik wrote:  
> Hi
> 
> I have upgraded the ES from 0.19.12 to 0.20.2
> 
> And I am unable to compile the code with maven I am getting this error
> 
> error: value andFilter is not a member of object org.elasticsearch.index.query.FilterBuilders
> 
> [INFO] var andFilterBuilder = FilterBuilders.andFilter()
> 
> But it is working fine with 0.19.12
> 
> I get the same error with 0.20.0
> 
> Thanks
> 
> --

---

<div class="post-metadata">

### Author: ![Denis\_S](https://avatars.discourse-cdn.com/v4/letter/d/ec9cab/32.png) [@Denis\_S](https://discuss.elastic.co/u/Denis_S)
#### Post date: [January 28, 2013, 6:17pm UTC](https://discuss.elastic.co/t/compile-error-with-0-20-2/10498/5 "2013-01-28T18:17:22Z")

</div>

I am getting the same exact exception when importing QueryBuilders.\*. It's a compile time exception.

[error] error while loading QueryBuilders, class file '/Users/abcd/.ivy2/cache/org.elasticsearch/elasticsearch/jars/elasticsearch-0.20.2.jar(org/elasticsearch/index/query/QueryBuilders.class)' is broken  
[error] (class java.lang.NullPointerException/)

---

<div class="post-metadata">

### Author: ![Matthieu\_Guillermin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matthieu_guillermin/32/2505_2.png) [@Matthieu\_Guillermin](https://discuss.elastic.co/u/Matthieu_Guillermin)
#### Post date: [January 30, 2013, 6:28am UTC](https://discuss.elastic.co/t/compile-error-with-0-20-2/10498/6 "2013-01-30T06:28:09Z")

</div>

I had the same error when trying to upgrade a PlayFramework 2.1 module to  
0.20.x

Here is the error that I had when compiling from the SBT console :  
[warn] Class com.spatial4j.core.shape.Shape not found - continuing with a  
stub.  
[error] error while loading QueryBuilders, class file  
'/.../2.1-RC3/repository/cache/org.elasticsearch/elasticsearch/jars/elasticsearch-0.20.4.jar(org/elasticsearch/index/query/QueryBuilders.class)'  
is broken  
[error] (class java.lang.NullPointerException/)

The [warn] before the error led me to try adding a dependency on spatial4j  
in my project and it worked !  
I don't understand exactly why it was needed, but anyway this solved my  
issue.

Here is how my final dependencies look like :  
"org.elasticsearch" % "elasticsearch" % "0.20.4",  
"com.spatial4j" % "spatial4j" % "0.3"

Hope this helps,

Matthieu

On Sunday, January 27, 2013 11:35:20 AM UTC+1, kimchy wrote:

> Unsure, its there in the codebase: andFilte, the failures look strange,  
> are you getting NPE while compiling?
> 
> On Jan 24, 2013, at 8:29 PM, suleman mubarik \<[suleman...@gmail.com](mailto:suleman...@gmail.com)\<javascript:\>\>  
> wrote:
> 
> [ERROR] error: error while loading QueryBuilders, class file  
> '....../.m2/repository/org/elasticsearch/elasticsearch/0.20.2/elasticsearch-0.20.2.jar(org/elasticsearch/index/query/QueryBuilders.class)'  
> is broken  
> [INFO] (class java.lang.NullPointerException/)
> 
> [ERROR] error: error while loading FilterBuilders, class file  
> '......./.m2/repository/org/  
> elasticsearch/elasticsearch/0.20.2/elasticsearch-0.20.2.jar(org/elasticsearch/index/query/FilterBuilders.class)'  
> is broken  
> [INFO] (class java.lang.NullPointerException/)
> 
> error: value andFilter is not a member of object  
> org.elasticsearch.index.query.FilterBuilders
> 
> [INFO] var andFilterBuilder = FilterBuilders.andFilter()
> 
> On Thursday, January 24, 2013 11:20:46 AM UTC-8, suleman mubarik wrote:
> 
> > Hi
> > 
> > I have upgraded the ES from 0.19.12 to 0.20.2
> > 
> > And I am unable to compile the code with maven I am getting this error
> > 
> > error: value andFilter is not a member of object  
> > org.elasticsearch.index.query.FilterBuilders
> > 
> > [INFO] var andFilterBuilder = FilterBuilders.andFilter()
> > 
> > But it is working fine with 0.19.12
> > 
> > I get the same error with 0.20.0
> > 
> > Thanks
> 
> --

--  
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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [January 30, 2013, 6:46am UTC](https://discuss.elastic.co/t/compile-error-with-0-20-2/10498/7 "2013-01-30T06:46:47Z")

</div>

This time, it's only a warning, not an error.

See: [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/mapping/geo-shape-type.html)

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

Le 30 janv. 2013 à 07:28, Matthieu Guillermin [mguillermin@clever-age.com](mailto:mguillermin@clever-age.com) a écrit :

I had the same error when trying to upgrade a PlayFramework 2.1 module to 0.20.x

Here is the error that I had when compiling from the SBT console :  
[warn] Class com.spatial4j.core.shape.Shape not found - continuing with a stub.  
[error] error while loading QueryBuilders, class file '/.../2.1-RC3/repository/cache/org.elasticsearch/elasticsearch/jars/elasticsearch-0.20.4.jar(org/elasticsearch/index/query/QueryBuilders.class)' is broken  
[error] (class java.lang.NullPointerException/)

The [warn] before the error led me to try adding a dependency on spatial4j in my project and it worked !  
I don't understand exactly why it was needed, but anyway this solved my issue.

Here is how my final dependencies look like :  
"org.elasticsearch" % "elasticsearch" % "0.20.4",  
"com.spatial4j" % "spatial4j" % "0.3"

Hope this helps,

Matthieu

On Sunday, January 27, 2013 11:35:20 AM UTC+1, kimchy wrote:

> Unsure, its there in the codebase: andFilte, the failures look strange, are you getting NPE while compiling?
> 
> On Jan 24, 2013, at 8:29 PM, suleman mubarik [suleman...@gmail.com](mailto:suleman...@gmail.com) wrote:
> 
> > [ERROR] error: error while loading QueryBuilders, class file '....../.m2/repository/org/elasticsearch/elasticsearch/0.20.2/elasticsearch-0.20.2.jar(org/elasticsearch/index/query/QueryBuilders.class)' is broken  
> > [INFO] (class java.lang.NullPointerException/)
> > 
> > [ERROR] error: error while loading FilterBuilders, class file '......./.m2/repository/org/  
> > elasticsearch/elasticsearch/0.20.2/elasticsearch-0.20.2.jar(org/elasticsearch/index/query/FilterBuilders.class)' is broken  
> > [INFO] (class java.lang.NullPointerException/)
> > 
> > error: value andFilter is not a member of object org.elasticsearch.index.query.FilterBuilders
> > 
> > [INFO] var andFilterBuilder = FilterBuilders.andFilter()
> > 
> > On Thursday, January 24, 2013 11:20:46 AM UTC-8, suleman mubarik wrote:
> > 
> > > Hi
> > > 
> > > I have upgraded the ES from 0.19.12 to 0.20.2
> > > 
> > > And I am unable to compile the code with maven I am getting this error
> > > 
> > > error: value andFilter is not a member of object org.elasticsearch.index.query.FilterBuilders
> > > 
> > > [INFO] var andFilterBuilder = FilterBuilders.andFilter()
> > > 
> > > But it is working fine with 0.19.12
> > > 
> > > I get the same error with 0.20.0
> > > 
> > > Thanks
> > 
> > --  
> > --  
> > 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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Matthieu\_Guillermin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matthieu_guillermin/32/2505_2.png) [@Matthieu\_Guillermin](https://discuss.elastic.co/u/Matthieu_Guillermin)
#### Post date: [January 30, 2013, 7:00am UTC](https://discuss.elastic.co/t/compile-error-with-0-20-2/10498/8 "2013-01-30T07:00:39Z")

</div>

Thanks for the link, David.

From what I see it's an "optional dependecy", that's why I don't understand  
why it fails when I try to compile without it.

On Wednesday, January 30, 2013 7:46:47 AM UTC+1, David Pilato wrote:

> This time, it's only a warning, not an error.
> 
> See:  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/mapping/geo-shape-type.html)
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 30 janv. 2013 à 07:28, Matthieu Guillermin \<[mguil...@clever-age.com](mailto:mguil...@clever-age.com)\<javascript:\>\>  
> a écrit :
> 
> I had the same error when trying to upgrade a PlayFramework 2.1 module to  
> 0.20.x
> 
> Here is the error that I had when compiling from the SBT console :  
> [warn] Class com.spatial4j.core.shape.Shape not found - continuing with a  
> stub.  
> [error] error while loading QueryBuilders, class file  
> '/.../2.1-RC3/repository/cache/org.elasticsearch/elasticsearch/jars/elasticsearch-0.20.4.jar(org/elasticsearch/index/query/QueryBuilders.class)'  
> is broken  
> [error] (class java.lang.NullPointerException/)
> 
> The [warn] before the error led me to try adding a dependency on spatial4j  
> in my project and it worked !  
> I don't understand exactly why it was needed, but anyway this solved my  
> issue.
> 
> Here is how my final dependencies look like :  
> "org.elasticsearch" % "elasticsearch" % "0.20.4",  
> "com.spatial4j" % "spatial4j" % "0.3"
> 
> Hope this helps,
> 
> Matthieu
> 
> On Sunday, January 27, 2013 11:35:20 AM UTC+1, kimchy wrote:
> 
> > Unsure, its there in the codebase: andFilte, the failures look strange,  
> > are you getting NPE while compiling?
> > 
> > On Jan 24, 2013, at 8:29 PM, suleman mubarik [suleman...@gmail.com](mailto:suleman...@gmail.com)  
> > wrote:
> > 
> > [ERROR] error: error while loading QueryBuilders, class file  
> > '....../.m2/repository/org/elasticsearch/elasticsearch/0.20.2/elasticsearch-0.20.2.jar(org/elasticsearch/index/query/QueryBuilders.class)'  
> > is broken  
> > [INFO] (class java.lang.NullPointerException/)
> > 
> > [ERROR] error: error while loading FilterBuilders, class file  
> > '......./.m2/repository/org/  
> > elasticsearch/elasticsearch/0.20.2/elasticsearch-0.20.2.jar(org/elasticsearch/index/query/FilterBuilders.class)'  
> > is broken  
> > [INFO] (class java.lang.NullPointerException/)
> > 
> > error: value andFilter is not a member of object  
> > org.elasticsearch.index.query.FilterBuilders
> > 
> > [INFO] var andFilterBuilder = FilterBuilders.andFilter()
> > 
> > On Thursday, January 24, 2013 11:20:46 AM UTC-8, suleman mubarik wrote:
> > 
> > > Hi
> > > 
> > > I have upgraded the ES from 0.19.12 to 0.20.2
> > > 
> > > And I am unable to compile the code with maven I am getting this error
> > > 
> > > error: value andFilter is not a member of object  
> > > org.elasticsearch.index.query.FilterBuilders
> > > 
> > > [INFO] var andFilterBuilder = FilterBuilders.andFilter()
> > > 
> > > But it is working fine with 0.19.12
> > > 
> > > I get the same error with 0.20.0
> > > 
> > > Thanks
> > 
> > --
> > 
> > --  
> > 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](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > For more options, visit [https://groups.google.com/groups/opt\_out](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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [January 30, 2013, 7:34am UTC](https://discuss.elastic.co/t/compile-error-with-0-20-2/10498/9 "2013-01-30T07:34:59Z")

</div>

I'm not aware of the SBT and Play stuff. Does it use Maven dependencies, even if they are marked as optional?

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

Le 30 janv. 2013 à 08:00, Matthieu Guillermin [mguillermin@clever-age.com](mailto:mguillermin@clever-age.com) a écrit :

Thanks for the link, David.

From what I see it's an "optional dependecy", that's why I don't understand why it fails when I try to compile without it.

On Wednesday, January 30, 2013 7:46:47 AM UTC+1, David Pilato wrote:

> This time, it's only a warning, not an error.
> 
> See: [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/mapping/geo-shape-type.html)
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 30 janv. 2013 à 07:28, Matthieu Guillermin [mguil...@clever-age.com](mailto:mguil...@clever-age.com) a écrit :
> 
> I had the same error when trying to upgrade a PlayFramework 2.1 module to 0.20.x
> 
> Here is the error that I had when compiling from the SBT console :  
> [warn] Class com.spatial4j.core.shape.Shape not found - continuing with a stub.  
> [error] error while loading QueryBuilders, class file '/.../2.1-RC3/repository/cache/org.elasticsearch/elasticsearch/jars/elasticsearch-0.20.4.jar(org/elasticsearch/index/query/QueryBuilders.class)' is broken  
> [error] (class java.lang.NullPointerException/)
> 
> The [warn] before the error led me to try adding a dependency on spatial4j in my project and it worked !  
> I don't understand exactly why it was needed, but anyway this solved my issue.
> 
> Here is how my final dependencies look like :  
> "org.elasticsearch" % "elasticsearch" % "0.20.4",  
> "com.spatial4j" % "spatial4j" % "0.3"
> 
> Hope this helps,
> 
> Matthieu
> 
> On Sunday, January 27, 2013 11:35:20 AM UTC+1, kimchy wrote:
> 
> > Unsure, its there in the codebase: andFilte, the failures look strange, are you getting NPE while compiling?
> > 
> > On Jan 24, 2013, at 8:29 PM, suleman mubarik [suleman...@gmail.com](mailto:suleman...@gmail.com) wrote:
> > 
> > > [ERROR] error: error while loading QueryBuilders, class file '....../.m2/repository/org/elasticsearch/elasticsearch/0.20.2/elasticsearch-0.20.2.jar(org/elasticsearch/index/query/QueryBuilders.class)' is broken  
> > > [INFO] (class java.lang.NullPointerException/)
> > > 
> > > [ERROR] error: error while loading FilterBuilders, class file '......./.m2/repository/org/  
> > > elasticsearch/elasticsearch/0.20.2/elasticsearch-0.20.2.jar(org/elasticsearch/index/query/FilterBuilders.class)' is broken  
> > > [INFO] (class java.lang.NullPointerException/)
> > > 
> > > error: value andFilter is not a member of object org.elasticsearch.index.query.FilterBuilders
> > > 
> > > [INFO] var andFilterBuilder = FilterBuilders.andFilter()
> > > 
> > > On Thursday, January 24, 2013 11:20:46 AM UTC-8, suleman mubarik wrote:
> > > 
> > > > Hi
> > > > 
> > > > I have upgraded the ES from 0.19.12 to 0.20.2
> > > > 
> > > > And I am unable to compile the code with maven I am getting this error
> > > > 
> > > > error: value andFilter is not a member of object org.elasticsearch.index.query.FilterBuilders
> > > > 
> > > > [INFO] var andFilterBuilder = FilterBuilders.andFilter()
> > > > 
> > > > But it is working fine with 0.19.12
> > > > 
> > > > I get the same error with 0.20.0
> > > > 
> > > > Thanks
> > > 
> > > --  
> > > --  
> > > 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](mailto:elasticsearc...@googlegroups.com).  
> > > For more options, visit [https://groups.google.com/groups/opt\_out](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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)
#### Post date: [January 30, 2013, 9:03am UTC](https://discuss.elastic.co/t/compile-error-with-0-20-2/10498/10 "2013-01-30T09:03:09Z")

</div>

I think that his relate to a scala compiler bug that I think was fixed in the latest scala version. There was an issue open about it in ES that pointed to the scala compiler bug.

On Jan 30, 2013, at 8:00 AM, Matthieu Guillermin [mguillermin@clever-age.com](mailto:mguillermin@clever-age.com) wrote:

> Thanks for the link, David.
> 
> From what I see it's an "optional dependecy", that's why I don't understand why it fails when I try to compile without it.
> 
> On Wednesday, January 30, 2013 7:46:47 AM UTC+1, David Pilato wrote:  
> This time, it's only a warning, not an error.
> 
> See: [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/mapping/geo-shape-type.html)
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 30 janv. 2013 à 07:28, Matthieu Guillermin [mguil...@clever-age.com](mailto:mguil...@clever-age.com) a écrit :
> 
> I had the same error when trying to upgrade a PlayFramework 2.1 module to 0.20.x
> 
> Here is the error that I had when compiling from the SBT console :  
> [warn] Class com.spatial4j.core.shape.Shape not found - continuing with a stub.  
> [error] error while loading QueryBuilders, class file '/.../2.1-RC3/repository/cache/org.elasticsearch/elasticsearch/jars/elasticsearch-0.20.4.jar(org/elasticsearch/index/query/QueryBuilders.class)' is broken  
> [error] (class java.lang.NullPointerException/)
> 
> The [warn] before the error led me to try adding a dependency on spatial4j in my project and it worked !  
> I don't understand exactly why it was needed, but anyway this solved my issue.
> 
> Here is how my final dependencies look like :  
> "org.elasticsearch" % "elasticsearch" % "0.20.4",  
> "com.spatial4j" % "spatial4j" % "0.3"
> 
> Hope this helps,
> 
> Matthieu
> 
> On Sunday, January 27, 2013 11:35:20 AM UTC+1, kimchy wrote:  
> Unsure, its there in the codebase: andFilte, the failures look strange, are you getting NPE while compiling?
> 
> On Jan 24, 2013, at 8:29 PM, suleman mubarik [suleman...@gmail.com](mailto:suleman...@gmail.com) wrote:
> 
> > [ERROR] error: error while loading QueryBuilders, class file '....../.m2/repository/org/elasticsearch/elasticsearch/0.20.2/elasticsearch-0.20.2.jar(org/elasticsearch/index/query/QueryBuilders.class)' is broken  
> > [INFO] (class java.lang.NullPointerException/)
> > 
> > [ERROR] error: error while loading FilterBuilders, class file '......./.m2/repository/org/  
> > elasticsearch/elasticsearch/0.20.2/elasticsearch-0.20.2.jar(org/elasticsearch/index/query/FilterBuilders.class)' is broken  
> > [INFO] (class java.lang.NullPointerException/)
> > 
> > error: value andFilter is not a member of object org.elasticsearch.index.query.FilterBuilders
> > 
> > [INFO] var andFilterBuilder = FilterBuilders.andFilter()
> > 
> > On Thursday, January 24, 2013 11:20:46 AM UTC-8, suleman mubarik wrote:  
> > Hi
> > 
> > I have upgraded the ES from 0.19.12 to 0.20.2
> > 
> > And I am unable to compile the code with maven I am getting this error
> > 
> > error: value andFilter is not a member of object org.elasticsearch.index.query.FilterBuilders
> > 
> > [INFO] var andFilterBuilder = FilterBuilders.andFilter()
> > 
> > But it is working fine with 0.19.12
> > 
> > I get the same error with 0.20.0
> > 
> > Thanks
> > 
> > --
> 
> --  
> 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](mailto:elasticsearc...@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![sulemanmubarik](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@sulemanmubarik](https://discuss.elastic.co/u/sulemanmubarik)
#### Post date: [February 8, 2013, 6:15pm UTC](https://discuss.elastic.co/t/compile-error-with-0-20-2/10498/11 "2013-02-08T18:15:02Z")

</div>

Thanks  
there were couple of dependency that i need to set  
first one was com.spatial4j and second one was lucene-highlighter after  
adding these in maven pom i can compile the code

```
  <groupId>com.spatial4j</groupId>

  <artifactId>spatial4j</artifactId>

  <version>0.2</version>

```

```
  <dependency>

      <groupId>org.apache.lucene</groupId>

      <artifactId>lucene-highlighter</artifactId>

      <version>3.5.0</version>

  </dependency>

```

On Thursday, January 24, 2013 11:20:46 AM UTC-8, suleman mubarik wrote:

> Hi
> 
> I have upgraded the ES from 0.19.12 to 0.20.2
> 
> And I am unable to compile the code with maven I am getting this error
> 
> error: value andFilter is not a member of object  
> org.elasticsearch.index.query.FilterBuilders
> 
> [INFO] var andFilterBuilder = FilterBuilders.andFilter()
> 
> But it is working fine with 0.19.12
> 
> I get the same error with 0.20.0
> 
> Thanks

--  
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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 6, 2017, 2:52am UTC](https://discuss.elastic.co/t/compile-error-with-0-20-2/10498/12 "2017-07-06T02:52:20Z")

</div>


