i tried to create a test for loading applicationContext.xml using Spring TestContext Framework,the code is pretty simple:
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations={"/applicationContext.xml"})
public class ApplicationContextLoadingTest {
@Autowired
private ApplicationContext applicationContext;
@Ignore
@Test
public void testContext() {
}
}
when i run the test i got the error message:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pollInitializer' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
...
any one knows what that means? Thanks