java.lang.NoClassDefFoundError: org/springframework/core/DefaultParameterNameDiscoverer
Already posted ansewers are correct. This issue is caused by conflicts in dependency version. The fastest way in my opinion to resolve those confilcts is to use plugin:
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> <version>1.4.1</version> <configuration> <rules><dependencyConvergence/></rules> </configuration></plugin>
Run it with mvn enforcer:enforce command. You will get a list of conficted dependencies. Check the library that has the lowest version of certain dependency and downgrade others. It is slow precess though so be patient
Resolution to this problem would depend on your pom.xml and what spring library it has. Some rejig of the spring jars including and excluding spring jars in maven will resolve this.
I added the following to resolve the mongo-db spring-data jar related issue.<properties> <spring.version>3.2.4.RELEASE</spring.version> <spring.data.version>1.6.1.RELEASE</spring.data.version> <spring.core.version>4.1.4.RELEASE</spring.core.version> </properties><dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> <version>${spring.version}</version> <exclusions> <exclusion> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> </exclusion> <exclusion> <groupId>org.springframework</groupId> <artifactId>spring-beans</artifactId> </exclusion> <exclusion> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> </exclusion> <exclusion> <groupId>org.springframework</groupId> <artifactId>spring-aop</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> <version>${spring.core.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-aop</artifactId> <version>4.1.4.RELEASE</version> </dependency> <dependency> <groupId>org.mongodb</groupId> <artifactId>mongo-java-driver</artifactId> <version>${mongo.driver.version}</version> </dependency> <dependency> <groupId>org.jongo</groupId> <artifactId>jongo</artifactId> <version>1.1</version> </dependency> <dependency> <groupId>org.springframework.data</groupId> <artifactId>spring-data-mongodb</artifactId> <version>${spring.data.version}</version> </dependency>