Hi all!
I'm a little stuck with trying to inject the Tapestry Session Service
(org.apache.tapestry.services.Session)
I simply added in my page:
@Inject
private Session session;
I'm getting:
Caused by: java.lang.RuntimeException: No service implements the interface
org.apache.tapestry5.services.Session.
at
org.apache.tapestry5.ioc.internal.RegistryImpl.getServiceByTypeAlone(RegistryImpl.java:664)
at
org.apache.tapestry5.ioc.internal.RegistryImpl.getServiceByTypeAndMarkers(RegistryImpl.java:684)
at
org.apache.tapestry5.ioc.internal.RegistryImpl.getService(RegistryImpl.java:643)
at
org.apache.tapestry5.ioc.internal.ObjectLocatorImpl.getService(ObjectLocatorImpl.java:47)
at
org.apache.tapestry5.internal.services.ServiceInjectionProvider.provideInjection(ServiceInjectionProvider.java:43)
at $InjectionProvider2_ac1a0adc404.provideInjection(Unknown Source)
at $InjectionProvider2_ac1a0adc3d0.provideInjection(Unknown Source)
at
org.apache.tapestry5.internal.transform.InjectWorker$2.run(InjectWorker.java:73)
... 127 more
Is there any particular thing with the session service?
I was able to get it by injecting the Request service, and asking for the
session through it (with no forced creation), and it worked! I browsed into
the code, and it is asking for the session to the TapestrySessionFactory
service...
If we cannot @Inject the Session, should it be in the .services interfaces
package?
Regards,
Matias.