posted 5 years ago
Ive been following a tutorial on youtube and Im upto the point where we start using autowire. But the program throws a nullpointerexception and the member variables dont get the proper values. Im including the code so please let me know whats going on
This is the main program "Drawing.java"
My triangle classs "Triangle.java"
The Point class "Point.java"
and finally the xml file "Spring1.xml"
If I remove the autowire tag and include the property statements, then the application works, but if add in the autowire and delete the property statements, then the application gives a null pointer exception in Triangle class at line 54 (where it is supposed to prints the coordinates of point A" and also in the Drawing class at line 11 where the draw method is called. Whats going on, why is it not working?
May the force of the Java be in all of us !!!