When i run the above file, the program runs fine and prints the sop in method perform();
but when i switch the xml file to new xml ie. bean-cfg.xml as follows,
and in MainPractise04.java, i change the path of called xml to bean-cfg.xml,
the perform() method is not called and i get Nullpointerexception, ie. obj is still null, thought the constructor sop of Juggler.java is called
As far as your error, what is different. I would say the other beans, so I would say one of the other beans has a problem. And I am going to guess, because the stack trace is too short there to show the real error. (By the, way read exceptions in Spring from bottom up, looking for the true root cause of the exception) I would say it is the initBean that is the cause of the problems.