Issue 118 in solrmeter: Could not update statistic com.plugtree.solrmeter.model.exception.StatisticConnectionException: java.lang.ClassCastException

51 views
Skip to first unread message

solr...@googlecode.com

unread,
Jan 13, 2014, 8:11:47 AM1/13/14
to solr...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 118 by thomas.p...@gmail.com: Could not update statistic
com.plugtree.solrmeter.model.exception.StatisticConnectionException:
java.lang.ClassCastException
http://code.google.com/p/solrmeter/issues/detail?id=118

What steps will reproduce the problem?

Run solrmeter and monitor cache statistics

What is the expected output? What do you see instead?

[Thread-1207]|ERROR|[CacheHistoryStatistic]|13:20:02,374 | Could not update
statistic
com.plugtree.solrmeter.model.exception.StatisticConnectionException:
java.lang.ClassCastException: java.lang.Float cannot be cast to
java.lang.String
at
com.plugtree.solrmeter.model.statistic.RequestHandlerConnection.getData(RequestHandlerConnection.java:72)
at
com.plugtree.solrmeter.model.statistic.CacheHistoryStatistic.updateData(CacheHistoryStatistic.java:114)
at
com.plugtree.solrmeter.model.statistic.CacheHistoryStatistic$StatisticUpdateThread.run(CacheHistoryStatistic.java:163)
Caused by: java.lang.ClassCastException: java.lang.Float cannot be cast to
java.lang.String
at
com.plugtree.solrmeter.model.statistic.RequestHandlerConnection.getCacheData(RequestHandlerConnection.java:84)
at
com.plugtree.solrmeter.model.statistic.RequestHandlerConnection.getData(RequestHandlerConnection.java:62)
... 2 more


What version of the product are you using? On what operating system?

solrmeter-0.3.0.jar, SOLR 4.6.0

Please provide any additional information below.

In SOLR 4.4 hit ratio was changed from String to float in the JMX
interface. See also:
https://issues.apache.org/jira/browse/SOLR-4616
https://github.com/apache/lucene-solr/commit/17e8ee6573e69567ff7221e7907db38c60033bf2


--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

solr...@googlecode.com

unread,
Mar 31, 2014, 3:16:58 PM3/31/14
to solr...@googlegroups.com

Comment #1 on issue 118 by msoko...@safaribooksonline.com: Could not update
statistic
com.plugtree.solrmeter.model.exception.StatisticConnectionException:
java.lang.ClassCastException
http://code.google.com/p/solrmeter/issues/detail?id=118

I'm attaching a patch that fixes this issue

solr...@googlecode.com

unread,
Apr 2, 2014, 5:25:54 AM4/2/14
to solr...@googlegroups.com

Comment #2 on issue 118 by acabrer...@emergya.com: Could not update
statistic
com.plugtree.solrmeter.model.exception.StatisticConnectionException:
java.lang.ClassCastException
http://code.google.com/p/solrmeter/issues/detail?id=118

Find attached the patch that worked for me (applied on trunk and using solr
4.4). It has not been tested in depth, so please use it under your
responsability.


note: I've attached it as I havent found the msoko...@safaribooksonline.com
proposed one.

Attachments:
118nonofficial.patch 1.7 KB

solr...@googlecode.com

unread,
Jan 6, 2015, 9:57:34 AM1/6/15
to solr...@googlegroups.com

Comment #3 on issue 118 by sy...@HAL9K.com: Could not update statistic
com.plugtree.solrmeter.model.exception.StatisticConnectionException:
java.lang.ClassCastException
https://code.google.com/p/solrmeter/issues/detail?id=118

I applied the patch with no complaints and rebuild fails in maven
javac 1.7.0_71
Building on Linux X86-64 environment if it matters

Can you really rebuild this in maven???

Tests in error:

testConnectionData(com.plugtree.solrmeter.statistic.RequestHandlerConnectionTestCase):
java.lang.ClassCastException: java.lang.String cannot be cast to
java.lang.Float

testAllCachesPresent(com.plugtree.solrmeter.statistic.RequestHandlerConnectionTestCase):
java.lang.ClassCastException:
java.lang.String cannot be cast to
java.lang.Float

testCumulativeData(com.plugtree.solrmeter.statistic.RequestHandlerConnectionTestCase):
java.lang.ClassCastException: java.lang.String cannot be cast to
java.lang.Float

testMissingCaches(com.plugtree.solrmeter.statistic.RequestHandlerConnectionTestCase):
java.lang.ClassCastException: java.lang.String cannot be cast to
java.lang.Float
Reply all
Reply to author
Forward
0 new messages