Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring class EnvironmentCapable

I received run-time error for string

ApplicationContext context = new ClassPathXmlApplicationContext("Beans.xml");

java.lang.NoClassDefFoundError: org/springframework/core/env/EnvironmentCapable

I have checked jar org.springframework.core-3.0.4.RELEASE.jar and doesnt' found this class. In which package this class? Thanks.

like image 235
user710818 Avatar asked Jul 17 '11 18:07

user710818


2 Answers

I think that need use version 3.1.0 - in package org.springframework.core-3.1.0.M2.jar this class presents.

like image 54
user810430 Avatar answered Oct 30 '22 13:10

user810430


That's a Spring 3.1 (still a milestone release) class. If you're intending to use Spring 3.0, you must have mixed in some 3.1 stuff accidentally.

like image 22
Ryan Stewart Avatar answered Oct 30 '22 12:10

Ryan Stewart