Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Storm error: java.lang.Long cannot be cast to java.lang.Integer when upgrading from 0.10.0 to 1.0.1

Solved Go to solution

Storm error: java.lang.Long cannot be cast to java.lang.Integer when upgrading from 0.10.0 to 1.0.1

New Contributor

I am upgrading from Storm 0.10.0 to 1.0.1 . All is great but when I run it I get the following error.

java.lang.RuntimeException: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer
	at org.apache.storm.eventhubs.spout.EventHubSpout.open(EventHubSpout.java:156) ~[storm-eventhubs-1.0.1.jar:1.0.1]
	at cat.tmatic.mh.spout.TmaticsEventHubSpout.open(TmaticsEventHubSpout.java:71) ~[classes/:?]
	at org.apache.storm.daemon.executor$fn__7885$fn__7900.invoke(executor.clj:601) ~[storm-core-1.0.1.jar:1.0.1]
	at org.apache.storm.util$async_loop$fn__625.invoke(util.clj:482) [storm-core-1.0.1.jar:1.0.1]
	at clojure.lang.AFn.run(AFn.java:22) [clojure-1.7.0.jar:?]
	at java.lang.Thread.run(Unknown Source) [?:1.8.0_74]
Caused by: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer
	at org.apache.storm.eventhubs.spout.EventHubSpout.preparePartitions(EventHubSpout.java:124) ~[storm-eventhubs-1.0.1.jar:1.0.1]
	at org.apache.storm.eventhubs.spout.EventHubSpout.open(EventHubSpout.java:153) ~[storm-eventhubs-1.0.1.jar:1.0.1]
	... 5 more

This error references this line in the EventHubSpout.jar:

 stateStore = new ZookeeperStateStore(zkEndpointAddress,
          (Integer)config.get(Config.STORM_ZOOKEEPER_RETRY_TIMES),  <-- right here!
          (Integer)config.get(Config.STORM_ZOOKEEPER_RETRY_INTERVAL));

Any love?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Storm error: java.lang.Long cannot be cast to java.lang.Integer when upgrading from 0.10.0 to 1.0.1

New Contributor

This code is in the EventHub jar. I submitted it to Hortonworks and they wrote a JIRA for it. It is an official bug. Not sure how the code ever ran for anyone...

3 REPLIES 3

Re: Storm error: java.lang.Long cannot be cast to java.lang.Integer when upgrading from 0.10.0 to 1.0.1

Mentor

@mark juchems the property is actually a String, but silly question, did you try casting to long instead of Integer?

(long)config.get(Config.STORM_ZOOKEEPER_RETRY_TIMES)

https://storm.apache.org/releases/1.0.2/javadocs/org/apache/storm/Config.html#STORM_ZOOKEEPER_RETRY_...

Re: Storm error: java.lang.Long cannot be cast to java.lang.Integer when upgrading from 0.10.0 to 1.0.1

New Contributor

This code is in the EventHub jar. I submitted it to Hortonworks and they wrote a JIRA for it. It is an official bug. Not sure how the code ever ran for anyone...

Re: Storm error: java.lang.Long cannot be cast to java.lang.Integer when upgrading from 0.10.0 to 1.0.1

Mentor

@mark juchems any chance you can update the thread with JIRA name? Just for a complete picture.

Don't have an account?
Coming from Hortonworks? Activate your account here