I wrote a test where I indicate my location of the application context with annotations. Then I complete my Tao test.
@ContextConfiguration(locations = {"file:service/src/main/webapp/WEB-INF/applicationContext.xml"}) public class MyTest extends AbstractTestNGSpringContextTests { @Autowired protected MyDao myDao; private PlatformTransactionManager transactionManager; private TransactionTemplate transactionTemplate; @Test public void shouldSaveEntityToDb() { transactionTemplate.execute(new TransactionCallbackWithoutResult() { protected void doInTransactionWithoutResult(TransactionStatus status) { Entity entity = new Entity();
When I run the test, I get an exception that indicates that the application context cannot be loaded, and it boils down to the following:
Caused by: java.lang.NoSuchMethodError:
org.springframework.beans.MutablePropertyValues.add (Ljava / lang / String; Ljava / lang / Object;) Lorg / springframework / beans / MutablePropertyValues;
I have no idea where to start, why am I getting this error and how to solve it? Information springframework 3.0.2.RELEASE, Hibernate 3.4.0.GA, testng 5.9
Thanks!
java spring nosuchmethoderror testng
jakob
source share