Spring injection issue while using iBatis DAO Object in two classes

Injecting SqlMapClient to one webservice implementation pojo(A) class and a normal pojo(A) classes using SPRING.

When I do only for class A,I am able to get ADao object instantiated and able to get connected todatabase and get database transaction done and returning values.

But when I do(injecting) for two classes A ,B .It gets instantiated ,but it does not return any value.It throws NullPointerException at m_aDao.saveAndReturnId(); Where I am using object of ADao to run sql queries to get some values using SqlMapClient of iBatis.

Is there any problems in injecting in spring file? is there any problem in using same object for both A and B classes?

Please help me to resolve this issue.

Thanks.

How do I have access to same DAO Object in two classes and at the same I should be able to instantiate one class in another class and should not throw NullPointerException when accessing a method in that DAO Object.This DAO Object is implemented using iBatis.