Hello!

I am using a Service A, which is using the services from another service B,
but the Service B is null if i am calling a method from my Service B within
the class of Service A. 

public class ServiceA {

@Inject 
ServiceB serviceB;

public void someMethod(){

  serviceB.doSomething();

  }
}

but tapestry reports a nullPointer exception. the debugger shows me, that
serviceB is null. But if I am using serviceB from a normal page class,
serviceB is not null / and useable. 

in my case, service A is the groupService, and service B the featureService.
I am declaring both Services in my ApplicationContext.xml

        <bean name="featureService"
class="com.airwriting.service.data.FeatureService">
                <property name="baseFeatureItemDAO" ref="BaseFeatureItemDAO" />
                <property name="baseFeatureDAO" ref="BaseFeatureDAO" />
        </bean>

        <bean name="groupService" 
class="com.airwriting.service.data.GroupService">
                <property name="groupDAO" ref="GroupDAO" />
                <property name="groupUserDAO" ref="GroupUserDAO" />
                <property name="userDAO" ref="UserDAO" />
        </bean>

hm...



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Inject-Service-in-another-Service-Service-is-null-tp5717598.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to