Skip to content
Advertisement

java.lang.NoClassDefFoundError with Intellij And Maven

I am working with Maven 3.0.5 and Intellij 14.0.2 and Maven is not copying the required Jars in my project’s calsspath so I am copying it manually and trying to exccute the main class of my project it is throwing me following error:

JavaScript

I know its very common and found a bunch of solutions at StackOverflow but none of them are working for me. Any help will be appreciated.

pom.xml

JavaScript

Advertisement

Answer

The scope of the storm library is provided, which means, that at runtime you have to provide the dependency yourself (this is usually used, when you deploy an application to an application server and the library is already in the appserver). For a standalone application, change the scope to compile (or remove it, since compile is the default). Then the JAR should be in the classpath when running the application.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement