roaporl / solrmeter

Automatically exported from code.google.com/p/solrmeter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Null Pointer Exception if any cache is disabled in Solr

GoogleCodeExporter opened this issue · comments

I was trying to compare 1.4 and 3.1 performance but got this error while 
testing:


[Thread-191]|ERROR|[com.plugtree.solrmeter.model.statistic.CacheHistoryStatistic
]|12:23:18,850 | Could not update statistic
com.plugtree.solrmeter.model.exception.StatisticConnectionException: 
java.lang.NullPointerException
    at com.plugtree.solrmeter.model.statistic.RequestHandlerConnection.getData(RequestHandlerConnection.java:72)
    at com.plugtree.solrmeter.model.statistic.CacheHistoryStatistic.updateData(CacheHistoryStatistic.java:115)
    at com.plugtree.solrmeter.model.statistic.CacheHistoryStatistic$StatisticUpdateThread.run(CacheHistoryStatistic.java:155)
Caused by: java.lang.NullPointerException
    at com.plugtree.solrmeter.model.statistic.RequestHandlerConnection.getCacheData(RequestHandlerConnection.java:79)
    at com.plugtree.solrmeter.model.statistic.RequestHandlerConnection.getData(RequestHandlerConnection.java:62)
    ... 2 more

Original issue reported on code.google.com by denizdur...@gmail.com on 10 Nov 2011 at 4:24

Hi, can you give some more details so i can reproduce the exception?
Which SolrMeter version are you using: trunk or 0.2.0?
On which Solr version do you get the exception: Solr 3.x or Solr 1.4?

Original comment by edoardo.tosca on 10 Nov 2011 at 9:38

Well, I was using 0.2.0 for 3.x and I didnt do any kind of changes other than i 
used for 1.4. 

Original comment by denizdur...@gmail.com on 11 Nov 2011 at 1:23

There are two different versions of SolrMeter depending on the Solr version, 
one for 1.4.1 or previous and one for 3.x and 4.x (SolrJ changed the javabin 
format in version 3.x, see 
http://code.google.com/p/solrmeter/wiki/SolrJVersionError). The stacktrace you 
see is actually more related to the issue 
http://code.google.com/p/solrmeter/issues/detail?id=67, which you could fix by 
disabling the CacheStatistic (Settings->Statistic Settings-> unselect the 
CacheStatistic checkbox), but you'll get to the error descibed in 
http://code.google.com/p/solrmeter/wiki/SolrJVersionError. So, the solution is 
to use this other download 
(http://code.google.com/p/solrmeter/downloads/detail?name=solrmeter-0.2.0-jar-wi
th-dependencies_3_1_4_0.jar&can=2&q=) for the 3.x version.

Regards,

Tomás

Original comment by tflo...@gmail.com on 11 Nov 2011 at 12:06

I am already using solrmeter for 3.x version... I got the error with the 
version that you have sent me

Original comment by denizdur...@gmail.com on 11 Nov 2011 at 2:13

Thats rare then, can you access this page?
http://host:port/solr/corename/admin/mbeans?cat=CACHE

If you disable the CacheStatistic (Settings->Statistic Settings-> unselect the 
CacheStatistic checkbox), do you see some other kind of error?

Original comment by tflo...@gmail.com on 11 Nov 2011 at 5:04

... to be more clear: 
http://[host]:[port]/solr/[corename]/admin/mbeans?cat=CACHE

Original comment by tflo...@gmail.com on 11 Nov 2011 at 5:05

Any new on this issue? did you get to see that URL?

Original comment by tflo...@gmail.com on 14 Nov 2011 at 11:46

Issue 99 has been merged into this issue.

Original comment by tflo...@gmail.com on 23 Feb 2012 at 2:47

This issue is also described here: 
http://groups.google.com/group/solrmeter/browse_thread/thread/d5ef95fce30f6e7f/6
35623bbb38a1c49
The problem seems to be with disabled caches in Solr. Need to check which 
caches are present and which are not in the caches statistic.

Original comment by tflo...@gmail.com on 23 Feb 2012 at 3:18

  • Changed state: Accepted
  • Added labels: Milestone-Release-0.2.1, Priority-High
  • Removed labels: Priority-Medium

Original comment by tflo...@gmail.com on 24 Feb 2012 at 5:39

  • Changed title: Null Pointer Exception if any cache is disabled in Solr
Issue 98 has been merged into this issue.

Original comment by tflo...@gmail.com on 24 Feb 2012 at 5:40

SolrMeter now validates that caches are present in Solr to avoid NPE. Resolved 
in revision r=288

Original comment by tflo...@gmail.com on 29 Feb 2012 at 11:29

  • Changed state: Resolved

Original comment by tflo...@gmail.com on 9 Oct 2012 at 10:48

  • Added labels: Milestone-Release-0.3.0
  • Removed labels: Milestone-Release-0.2.1