flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Metzger <rmetz...@apache.org>
Subject Re: TopologyBuilder throws java.lang.ExceptionInInitializerError
Date Mon, 04 Apr 2016 14:22:24 GMT
Hi,

I suspect that this dependency:

<dependency>
			<groupId>storm</groupId>
			<artifactId>storm-kafka</artifactId>
			<version>0.9.0-wip16a-scala292</version>
		</dependency>


pulls in a different storm version.
Can you exclude the storm from that dependency?


You can also run: mvn clean install and then mvn dependency:tree to see
where the two conflicting storm dependencies are coming from.


On Thu, Mar 31, 2016 at 6:35 PM, Sharma, Samiksha <samiksha.sharma@here.com>
wrote:

> Yes I tried cleaning the repo but that did not help either, please find
> attached pom.xml for your reference.
>
> Thanks
> Samiksha
>
>
> From: Till Rohrmann <trohrmann@apache.org>
> Reply-To: "user@flink.apache.org" <user@flink.apache.org>
> Date: Wednesday, March 23, 2016 at 2:00 AM
> To: "user@flink.apache.org" <user@flink.apache.org>
> Subject: Re: TopologyBuilder throws java.lang.ExceptionInInitializerError
>
> Hi,
>
> have you tried clearing your m2 repository? It would also be helpful to
> see your dependencies (pom.xml).
>
> Cheers,
> Till
>
> On Tue, Mar 22, 2016 at 10:41 PM, Sharma, Samiksha <
> samiksha.sharma@here.com> wrote:
>
>> Hi,
>>
>> I am converting a storm topology to Flink-storm topology using the
>> flink-storm dependency. When I run my code the FlinkTopologyBuilder
>> eventually calls createTopology method in TopologyBuilder and throws the
>> error at the following highlighted line:-
>>
>> public StormTopology createTopology() {
>>
>>         Map<String, Bolt> boltSpecs = new HashMap<String, Bolt>();
>>
>>         Map<String, SpoutSpec> spoutSpecs = new HashMap<String,
>> SpoutSpec>();
>>
>>         for(String boltId: _bolts.keySet()) {
>>
>>             IRichBolt bolt = _bolts.get(boltId);
>>
>>             ComponentCommon common = getComponentCommon(boltId, bolt);
>>
>>             boltSpecs.put(boltId, new
>>  Bolt(ComponentObject.serialized_java(Utils.serialize(bolt)), common));
>>         }
>>
>> Exception in thread "main" java.lang.ExceptionInInitializerError
>>
>> at
>> backtype.storm.topology.TopologyBuilder.createTopology(TopologyBuilder.java:106)
>>
>> at
>> org.apache.flink.storm.api.FlinkTopologyBuilder.createTopology(FlinkTopologyBuilder.java:82)
>>
>> at
>> com.medio.services.avalanche.storm.common.BaseTopology.deploy(BaseTopology.java:118)
>>
>> at
>> com.medio.services.avalanche.realtime.eventcounter.EventCounterTopology.main(EventCounterTopology.java:18)
>>
>> Caused by: java.lang.RuntimeException: Found multiple defaults.yaml
>> resources. You're probably bundling the Storm jars with your topology jar.
>> [jar:file:/Users/samsharm/.m2/repository/storm/storm-core/
>> 0.9.0.1/storm-core-0.9.0.1.jar!/defaults.yaml,
>> jar:file:/Users/samsharm/.m2/repository/org/apache/storm/storm-core/0.9.4/storm-core-0.9.4.jar!/defaults.yaml]
>>
>> at backtype.storm.utils.Utils.findAndReadConfigFile(Utils.java:133)
>>
>> at backtype.storm.utils.Utils.readDefaultConfig(Utils.java:160)
>>
>> at backtype.storm.utils.Utils.readStormConfig(Utils.java:184)
>>
>> at backtype.storm.utils.Utils.<clinit>(Utils.java:71)
>>
>> ... 4 more
>>
>>
>>
>> Looks like some bad storm dependencies are getting in the project. May I
>> request to please assist what might be going wrong?
>>
>>
>> I also emailed the dev community, and got the following response.
>> Following that did not help either
>>
>>
>> Hi,
>>
>> I am not sure if this is useful, I once had similar issue.
>> Are you including storm-core dependency in your project? flink-storm
>> dependency doesn't need any specific storm-core dependency.
>>
>> Just including flink-storm and removing storm-core dependency worked for
>> me.
>>
>> This has more information,
>>
>> https://flink.apache.org/news/2015/12/11/storm-compatibility.html
>>
>>
>> Thanks
>> Samiksha Sharma
>>
>>
>>
>>
>

Mime
View raw message