Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

HDInsight Storm dependency version issue

avatar
Visitor

Hi, I'm using HDInsight Storm on Azure. It uses HDP version 2.4.2.x. I have written a topology and deployed on the cluster. Topology has thrown an error "java.lang.NoSuchMethodError: org.apache.commons.lang3.time.StopWatch.isStarted()Z". What I observered from the error is that , 'My topology uses commons-lang3-3.3.1 version, But storm has commons-lang3-3.1 in it's lib folder. So when I deploy the topology it has two StopWatch classes in classpath. I think this is the problem. But not so sure'. If this is the problem, I can upgrade commons-lang3 jar on Storm's lib folder. But I don't want to do that. Is there any other way to resolve this issue.

1 ACCEPTED SOLUTION

avatar
Super Guru

@Sasikumar Natarajan its better to shade common-lang dependency in your topologoy jars instead of upgrading jar provided with storm distribution.

View solution in original post

2 REPLIES 2

avatar
Super Guru

@Sasikumar Natarajan its better to shade common-lang dependency in your topologoy jars instead of upgrading jar provided with storm distribution.

avatar
Visitor

@Rajkumar Singh I'm already using maven shade plugin. There is a way of relocating Classes using maven shade plugin (https://maven.apache.org/plugins/maven-shade-plugin/examples/class-relocation.html). But the problem is, StopWatch class is not being referred directly from my topology. I have used it in code which is being added as a dependency to my topology.