Hi,
I have a classs SpringManager, it extends another class BaseManger. I have another class Basemanger.
Entries in the Spring context file are :
<bean id="SpringManager" class="com.test.springweb.bus.SpringManager">
</bean>
<bean id="BaseSeason" class="com.test.springweb.bus.BaseSeason">
<property name="test" ref="Test"></property>
</bean>
SpringManager has a method check()
public String check()
{
test(); // calls BaseManager's method
}
BaseManager has a mehtod test()
public void test()
{
test.testmethod(); // calls testmethod() of Test class
}
When run the application and call SpringManager's check method, am getting
Null pointer exception in test.testmethod() line.
The corresponding setter methods are proper.
I guess it is may be cos SpringManager does nto have a refernce to its base class.
Doesnt Spring creates an object of its base also, thus creating the object of its refrence?
Can you anyone help regarding this ? Thanks in advance.


Reply With Quote