I'm trying to deploy my web app within Spring Tool Suite (STS) using vFabric tc Server but I get exceptions. It's worth noting it runs fine if I compile and run in a standalone Tomcat 6. I've tried vFabric tc versions tomcat-7.0.35.B.RELEASE and tomcat-6.0.36.B.RELEASE.
The error is:
java.lang.IllegalArgumentException: class [springapp.web.spring.MyInitializer] must implement ApplicationContextInitializerclass springapp.web.spring.MyInitializer is not assignable to interface org.springframework.context.ApplicationContextInitializer
I can't decipher why this error is occurring as the initializer does implement ApplicationContextInitializer
:
public class MyInitializer implements ApplicationContextInitializer {
public void initialize(ConfigurableApplicationContext ctx) {
try {
PropertySource ps = new ResourcePropertySource("file:///home/jim/development/act/impact/webapp.properties");
ctx.getEnvironment().getPropertySources().addFirst(ps);
// perform any other initialization of the context ...
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
Does anyone have any suggestions on what I could try to get this running?