Code:
public class EmployeeServicesTestCase {
/**
* @param args
*/
public static void main(String[] s)throws Exception {
// TODO Auto-generated method stub
BeanFactory beans=new XmlBeanFactory(new ClassPathResource("applicationContext.xml"));
EmployeeService es=(EmployeeService)beans.getBean("employeeService");
es.incrementSalary(Integer.parseInt(s[0]), 1000);
}
}
Exception is:------
log4j:WARN No appenders could be found for logger (org.springfram ework.util.Clas sUtils).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" java.lang.Array IndexOutOfBound sException: 0
at com.shaik.sprin g.Test.Employee ServicesTestCas e.main(Employee ServicesTestCas e.java:22)
Comment