Quando eu tento executar o código a seguir:
public static void main(String[] args) {
SetorDAO setorDAO;
ApplicationContext context = new ClassPathXmlApplicationContext("ApplicationContext.xml");
setorDAO = (SetorDAO) context.getBean("setorDAO");
SetorVO setor = new SetorVO();
setor.setDescricao("DTI - Departamento de Tecnologia da Informação");
setorDAO.incluir(setor);
}
Ocorre o seguinte erro
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.springframework.core.io.DefaultResourceLoader.<init>(DefaultResourceLoader.java:52)
at org.springframework.context.support.AbstractApplicationContext.<init>(AbstractApplicationContext.java:181)
at org.springframework.context.support.AbstractRefreshableApplicationContext.<init>(AbstractRefreshableApplicationContext.java:80)
at org.springframework.context.support.AbstractXmlApplicationContext.<init>(AbstractXmlApplicationContext.java:58)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:89)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:75)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:65)
at br.gov.mt.mp.ci.dao.Teste.main(Teste.java:16)
Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: java.lang.NullPointerException (Caused by java.lang.NullPointerException) (Caused by org.apache.commons.logging.LogConfigurationException: java.lang.NullPointerException (Caused by java.lang.NullPointerException))
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
at org.springframework.util.ClassUtils.<clinit>(ClassUtils.java:67)
Alguém pode me ajudar com isso ai???