Yeah, this isn't a T5 thing - it's Java!

   @Inject
   private Logger log;

   public My() {
       log.info("Logger injected in service using @javax.inject.Inject");
   }

T5 can't do field injection until it's constructed the class. But when
T5 constructs the class you access the field --> NPE!

Steve.


On 15 June 2012 00:11, Taha Siddiqi <tawus.tapes...@gmail.com> wrote:
> I don't think you can use "@Inject"ed value in the constructor.
>
> The constructor is called first and then injection is done. As you are 
> accessing the service in constructor, at this point the field injection has 
> not been done. And as Logger has not been build by the registry, you get 
> Service not implemented error..
>
> regards
> Taha
>
> On Jun 14, 2012, at 9:25 PM, Muhammad Gelbana wrote:
>
>> <TapestryLogging.zip>
>

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

Reply via email to