This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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
why so ?
Joined: Jun 17, 2009
this the output, of the above code when i add bean-cfg.xml, and run MainPractise04.java from command prompt
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.