You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Arming, Sebastian" <Se...@oeaw.ac.at> on 2012/05/25 12:13:22 UTC

@Inject vs @InjectResource in 5.3

Hi

I tried to @Inject a Logger into a service (a tapestry-resteasy resource if that matters) and got an exception:
oejs.ServletHandler:/intern/
java.lang.RuntimeException: Exception constructing service 'ResteasyRequestFilter': Error building service proxy for service 'Application' (at org.tynamo.resteasy.Application(Collection) (at Application.java:14) via org.tynamo.resteasy.ResteasyModule.bind(ServiceBinder) (at ResteasyModule.java:31)): Error invoking service contribution method org.tynamo.resteasy.ResteasyModule.javaxWsRsCoreApplication(Configuration, ObjectLocator, ResteasyPackageManager, ClassNameLocator): No service implements the interface org.slf4j.Logger.
at org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.obtainObjectFromCreator(JustInTimeObjectCreator.java:75)
...

Google quickly brought up the solution to use @InjectResource instead, and that works perfectly fine.
But @InjectResource shows up as deprecated and the documentation states it should behave identical to @Inject.
It doesn't in my case. Should I raise a issue?

Sebastian

RE: @Inject vs @InjectResource in 5.3

Posted by "Arming, Sebastian" <Se...@oeaw.ac.at>.
>What  version of Tapestry are you using?
5.3.3

I looked into it again:
 * it only occurs with javax.inject.Inject - o.a.t.ioc.annotations.Inject works as advertised.
 * it has nothing to do with tapestry-resteasy.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: @Inject vs @InjectResource in 5.3

Posted by Howard Lewis Ship <hl...@gmail.com>.
What  version of Tapestry are you using?

On Fri, May 25, 2012 at 3:13 AM, Arming, Sebastian
<Se...@oeaw.ac.at> wrote:
> Hi
>
> I tried to @Inject a Logger into a service (a tapestry-resteasy resource if that matters) and got an exception:
> oejs.ServletHandler:/intern/
> java.lang.RuntimeException: Exception constructing service 'ResteasyRequestFilter': Error building service proxy for service 'Application' (at org.tynamo.resteasy.Application(Collection) (at Application.java:14) via org.tynamo.resteasy.ResteasyModule.bind(ServiceBinder) (at ResteasyModule.java:31)): Error invoking service contribution method org.tynamo.resteasy.ResteasyModule.javaxWsRsCoreApplication(Configuration, ObjectLocator, ResteasyPackageManager, ClassNameLocator): No service implements the interface org.slf4j.Logger.
> at org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.obtainObjectFromCreator(JustInTimeObjectCreator.java:75)
> ...
>
> Google quickly brought up the solution to use @InjectResource instead, and that works perfectly fine.
> But @InjectResource shows up as deprecated and the documentation states it should behave identical to @Inject.
> It doesn't in my case. Should I raise a issue?
>
> Sebastian



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

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