Re: How can I Initialize getJdbcTemplate()?
Have you annotated your JUnit test class one way or another to tell it to load the application context that it needs to wire the beans that you plan to use for testing. I have a feeling that your job bean is probably null at this point.
Code:
@RunWith (SpringJUnit4ClassRunner.class)
@ContextConfiguration (locations={"/application-context.xml"})
assuming that you have an 'application-context.xml' in the same project, otherwise you have to use
Code:
classpath*:out-of-scope-context.xml
note that these names application-context.xml and out-of-scope-context.xml need to match your contexts
Last edited by Deliverance; October 26th, 2009 at 09:22 AM.
------
If you are satisfied with the responses, add to the user's rep!