user823473
user823473

Reputation: 63

java.lang.NoClassDefFoundError: org/springframework/core/io/ResourceLoader

I am using spring for some testing, and I am getting this error:

java.lang.NoClassDefFoundError: org/springframework/core/io/ResourceLoader  at org.springframework.mock.web.MockHttpServletRequest

The JAR that I installed is: spring-test-2.5.6.jar

Do I need another jar besides this?

Thanks

Upvotes: 2

Views: 35789

Answers (3)

pap
pap

Reputation: 27614

I strongly advice using Maven (or Ivy or Gradle) for dependency management. It can save you loads of pain in resolving these types of secondary and tertiary dependencies.

Upvotes: 2

henry
henry

Reputation: 6106

As per Amir's answer the jar you need is spring-core. You can generally solve this sort of issue by consulting jarfinder http://www.jarfinder.com/index.php/java/search/~org.springframework.core.io.ResourceLoader~

Upvotes: 1

Amir Raminfar
Amir Raminfar

Reputation: 34179

You also need spring-core-*.jar. You can usually tell what jars you are missing by looking at the package. In this org.springframework.core.* is all in the core jar file.

Upvotes: 8

Related Questions