NoSuchMethodError with Spring MutableValues

Posted by jakob on Stack Overflow See other posts from Stack Overflow or by jakob
Published on 2010-04-16T15:02:15Z Indexed on 2010/04/16 15:23 UTC
Read the original article Hit count: 664

Hello experts!

I have written a test where i specify my application context location with annotations. I then autowire my dao into the 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();

    //test
    myDao.save(entity)

    //assert                                                            
    assertNotNull(entity.getId());                                

  }                                                                       
});                                                                         


}

When i run the test i get an exception which states that the application context could not be loaded and it boils down to:

    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 looking, why do i get this error and how can i resolve it? Info springframework 3.0.2.RELEASE, Hibernate 3.4.0.GA, testng 5.9

Thank you!

© Stack Overflow or respective owner

Related posts about spring-framework

Related posts about testng