That's because the injected request shadow in your service doesn't
have the real request backing it up since the request wasn't processed
by Tapestry5 but Tapestry 4. It's the same situation if call a service
from say a Quartz job - you never had the request in the first place.
You need to do it the old-fashioned way in this, i.e. pass in a
HttpServletRequest object as part of the arguments of a service
operation and use that request object in your service.

Kalle

On Thu, Oct 8, 2009 at 4:55 PM, cuartz <carlos.pc...@gmail.com> wrote:
>
> Hello everybody, i had a problem trying to use the tapestr5 IoC from tapestry
> 4 pages, its a big system whit tpaestry5 and tapestry 4 pages, when i call a
> service that handles the request (org.apache.tapestry5.services.Request)
> from tapestry5 pages everything is ok, but when i call this service from a
> tapestry4 page i get a java.lang.RuntimeException, everithing is ok but when
> the service call some method from the request i get this error.
>
> i hope someone can help me, believe me i try a lot of diferent methods to
> solve this but i simply cant.
>
>
> java.lang.NullPointerException
> Stack Trace:
>
>    *
> org.apache.tapestry5.ioc.internal.ConstructorServiceCreator.createObject(ConstructorServiceCreator.java:76)
>    *
> org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator$1.invoke(OperationTrackingObjectCreator.java:45)
>    *
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:68)
>    *
> org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
>    *
> org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:941)
>    *
> org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator.createObject(OperationTrackingObjectCreator.java:49)
>    *
> org.apache.tapestry5.ioc.internal.services.PerThreadServiceCreator.createObject(PerThreadServiceCreator.java:48)
> --
> View this message in context: 
> http://www.nabble.com/Tapestry5-IoC-and-Request-problem-tp25813570p25813570.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
>
>

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

Reply via email to