You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Semen Vishniakov <vi...@gmail.com> on 2014/08/22 17:44:53 UTC

Tynamo-Conversations + Tapestry-Atmosphere

Hi all,

I'm trying to intrgrate tapestry-atmosphere library in my project,
where we already have tynamo conversation and tynamo security.

The following exception is thrown, when I try to broadcast message:

internal.PerRequestBroadcastFilterImpl -
Error rendering ComponentEventParameters[page=Home
component=Home:mainlayout.pushtarget event=notificationEvent]
java.lang.RuntimeException: java.util.concurrent.ExecutionException:
java.lang.NullPointerException
at org.lazan.t5.offline.services.internal.OfflineComponentRendererImpl.doRender(OfflineComponentRendererImpl.java:124)
at org.lazan.t5.offline.services.internal.OfflineComponentRendererImpl.renderComponent(OfflineComponentRendererImpl.java:83)
at $OfflineComponentRenderer_e08b8b016e7.renderComponent(Unknown Source)
at org.lazan.t5.atmosphere.services.internal.PerRequestBroadcastFilterImpl.filter(PerRequestBroadcastFilterImpl.java:56)
at org.atmosphere.cpr.BroadcasterConfig.filter(BroadcasterConfig.java:483)
at org.atmosphere.cpr.DefaultBroadcaster.perRequestFilter(DefaultBroadcaster.java:850)
at org.atmosphere.cpr.DefaultBroadcaster.deliverPush(DefaultBroadcaster.java:740)
at org.atmosphere.cpr.DefaultBroadcaster.push(DefaultBroadcaster.java:646)
at org.atmosphere.cpr.DefaultBroadcaster.perRequestFilter(DefaultBroadcaster.java:850)
at org.atmosphere.cpr.DefaultBroadcaster.deliverPush(DefaultBroadcaster.java:740)
at org.atmosphere.cpr.DefaultBroadcaster.push(DefaultBroadcaster.java:646)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.util.concurrent.ExecutionException:
java.lang.NullPointerException
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at org.lazan.t5.offline.services.internal.OfflineComponentRendererImpl.doRender(OfflineComponentRendererImpl.java:122)
... 13 more
Caused by: java.lang.NullPointerException
at org.apache.tapestry5.internal.services.InternalModule$1.getCookies(InternalModule.java:163)
at $CookieSource_e08b8b0171a.getCookies(Unknown Source)
at org.apache.tapestry5.internal.services.CookiesImpl.readCookieValue(CookiesImpl.java:61)
at $Cookies_e08b8b01719.readCookieValue(Unknown Source)
at org.tynamo.conversations.services.ConversationManagerImpl.activateConversation(ConversationManagerImpl.java:73)
at $ConversationManager_e08b8b01756.activateConversation(Unknown Source)
at org.tynamo.conversations.services.RequestHandlerDecoratorImpl$1.advise(RequestHandlerDecoratorImpl.java:25)
at org.apache.tapestry5.ioc.internal.util.InternalUtils$21.advise(InternalUtils.java:1455)
at org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:86)
at $ComponentRequestHandler_e08b8b01757.handleComponentEvent(Unknown Source)
at $ComponentRequestHandler_e08b8b0171d.handleComponentEvent(Unknown Source)
at org.lazan.t5.offline.services.internal.OfflineComponentRendererImpl$1.invoke(OfflineComponentRendererImpl.java:112)
at org.lazan.t5.offline.services.internal.OfflineComponentRendererImpl$1.invoke(OfflineComponentRendererImpl.java:100)
at org.apache.tapestry5.ioc.internal.services.ParallelExecutorImpl$1.call(ParallelExecutorImpl.java:58)
... 4 more


I checked cookies in this request and they are not empty. What could
be the cause of this problem?

Thanks,
Sem

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


Re: Tynamo-Conversations + Tapestry-Atmosphere

Posted by Lance Java <la...@googlemail.com>.
I notice from the exception that the error originates from
SecurityComponentRequestFilter

So it sounds like you'll need to contribute a ComponentRequestFilter. Make
sure you order it "before:" the tynamo filter.
 On 5 Sep 2014 22:10, "Lance Java" <la...@googlemail.com> wrote:

> I'm not familiar with tynamo security but Kalle has pointed out it uses a
> HttpServletFilter to initialise some per thread values.
>
> tapestry-atmosphere uses tapestry-offline to render component events.
> Unlike a normal request / response this doesn't go through the
> HttpServletRequestFilters etc.
>
> Take a look at the request processing diagram at the bottom of this page
> http://tapestry.apache.org/request-processing.html
>
> tapestry-offline invokes the
> org.apache.tapestry5.services.ComponentRequestHandler directly.
>
> Looking at the diagram, it looks like you have an opportunity to
> initialize the thread by contributing a ComponentEventFilter or a
> ComponentEventRequest filter.
> If you want to test for an offline request, you can check
> OfflineCookieGlobals.isCookiesStored()
>
>
> https://github.com/uklance/tapestry-offline/blob/master/src/main/java/org/lazan/t5/offline/services/OfflineCookieGlobals.java
>
> https://github.com/uklance/tapestry-offline/blob/master/src/main/java/org/lazan/t5/offline/services/internal/OfflineComponentRendererImpl.java
>
>
> On 5 September 2014 18:39, Kalle Korhonen <ka...@gmail.com>
> wrote:
>
>> On Fri, Sep 5, 2014 at 10:21 AM, Semen Vishniakov <vishnyakovsa@gmail.com
>> >
>> wrote:
>>
>> > Seems that SecurityManager is not accessible because of component
>> > "offline" rendering. Are there any solutions to fix it?
>> >
>>
>> I haven't paid close attention to this thread but the securitymanager
>> certainly isn't accessible. It's perhaps quite understandable that the
>> security library requires certain request (thread) attributes to exist to
>> uniquely identify the user, just the same way a persistence framework
>> requires a session/entitymanager. It's relatively simple to bind the
>> securitymanager to the currently executing thread, see
>>
>> https://github.com/tynamo/tapestry-security/blob/master/src/main/java/org/tynamo/security/services/impl/SecurityConfiguration.java
>> .
>> That said, I'm not sure what would be the best invocation point to make it
>> happen with atmosphere/tapestry-offline.
>>
>> Kalle
>>
>
>

Re: Tynamo-Conversations + Tapestry-Atmosphere

Posted by Lance Java <la...@googlemail.com>.
I'm not familiar with tynamo security but Kalle has pointed out it uses a
HttpServletFilter to initialise some per thread values.

tapestry-atmosphere uses tapestry-offline to render component events.
Unlike a normal request / response this doesn't go through the
HttpServletRequestFilters etc.

Take a look at the request processing diagram at the bottom of this page
http://tapestry.apache.org/request-processing.html

tapestry-offline invokes the
org.apache.tapestry5.services.ComponentRequestHandler directly.

Looking at the diagram, it looks like you have an opportunity to initialize
the thread by contributing a ComponentEventFilter or a
ComponentEventRequest filter.
If you want to test for an offline request, you can check
OfflineCookieGlobals.isCookiesStored()

https://github.com/uklance/tapestry-offline/blob/master/src/main/java/org/lazan/t5/offline/services/OfflineCookieGlobals.java
https://github.com/uklance/tapestry-offline/blob/master/src/main/java/org/lazan/t5/offline/services/internal/OfflineComponentRendererImpl.java


On 5 September 2014 18:39, Kalle Korhonen <ka...@gmail.com>
wrote:

> On Fri, Sep 5, 2014 at 10:21 AM, Semen Vishniakov <vi...@gmail.com>
> wrote:
>
> > Seems that SecurityManager is not accessible because of component
> > "offline" rendering. Are there any solutions to fix it?
> >
>
> I haven't paid close attention to this thread but the securitymanager
> certainly isn't accessible. It's perhaps quite understandable that the
> security library requires certain request (thread) attributes to exist to
> uniquely identify the user, just the same way a persistence framework
> requires a session/entitymanager. It's relatively simple to bind the
> securitymanager to the currently executing thread, see
>
> https://github.com/tynamo/tapestry-security/blob/master/src/main/java/org/tynamo/security/services/impl/SecurityConfiguration.java
> .
> That said, I'm not sure what would be the best invocation point to make it
> happen with atmosphere/tapestry-offline.
>
> Kalle
>

Re: Tynamo-Conversations + Tapestry-Atmosphere

Posted by Kalle Korhonen <ka...@gmail.com>.
On Fri, Sep 5, 2014 at 10:21 AM, Semen Vishniakov <vi...@gmail.com>
wrote:

> Seems that SecurityManager is not accessible because of component
> "offline" rendering. Are there any solutions to fix it?
>

I haven't paid close attention to this thread but the securitymanager
certainly isn't accessible. It's perhaps quite understandable that the
security library requires certain request (thread) attributes to exist to
uniquely identify the user, just the same way a persistence framework
requires a session/entitymanager. It's relatively simple to bind the
securitymanager to the currently executing thread, see
https://github.com/tynamo/tapestry-security/blob/master/src/main/java/org/tynamo/security/services/impl/SecurityConfiguration.java.
That said, I'm not sure what would be the best invocation point to make it
happen with atmosphere/tapestry-offline.

Kalle

Re: Tynamo-Conversations + Tapestry-Atmosphere

Posted by Semen Vishniakov <vi...@gmail.com>.
I'm sorry for the inconvenience, but there is another exception that I
cannot overcome:

when I turn https on and add secure=true to the container component,
the following exception is thrown:


[WARN] 2014-09-05 18:56:12,711 - TapestryModule.ComponentRequestHandler -
Unable to add 'PageGlobals' as a dependency of 'SecurityFilter', as
that forms a dependency cycle ('SecurityFilter' depends on itself via
'PageGlobals'). The dependency has been ignored.

[ERROR] 2014-09-05 18:57:41,225 - internal.PerRequestBroadcastFilterImpl -
Error rendering ComponentEventParameters[page=Home
component=Home:mainlayout.pushtarget event=notificationEvent]
java.util.concurrent.ExecutionException:
org.apache.shiro.UnavailableSecurityManagerException: No
SecurityManager accessible to the calling code, either bound to the
org.apache.shiro.util.ThreadContext or as a vm static singleton.  This
is an invalid application configuration.
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:188)
at org.lazan.t5.offline.services.internal.OfflineComponentRendererImpl$1.get(OfflineComponentRendererImpl.java:84)
at org.lazan.t5.offline.services.internal.OfflineComponentRendererImpl$1.get(OfflineComponentRendererImpl.java:79)
at org.lazan.t5.atmosphere.services.internal.PerRequestBroadcastFilterImpl.filter(PerRequestBroadcastFilterImpl.java:59)
at org.atmosphere.cpr.BroadcasterConfig.filter(BroadcasterConfig.java:483)
at org.atmosphere.cpr.DefaultBroadcaster.perRequestFilter(DefaultBroadcaster.java:850)
at org.atmosphere.cpr.DefaultBroadcaster.deliverPush(DefaultBroadcaster.java:740)
at org.atmosphere.cpr.DefaultBroadcaster.push(DefaultBroadcaster.java:646)
at org.atmosphere.cpr.DefaultBroadcaster$2.run(DefaultBroadcaster.java:504)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: org.apache.shiro.UnavailableSecurityManagerException: No
SecurityManager accessible to the calling code, either bound to the
org.apache.shiro.util.ThreadContext or as a vm static singleton.  This
is an invalid application configuration.
at org.apache.shiro.SecurityUtils.getSecurityManager(SecurityUtils.java:123)
at org.apache.shiro.subject.Subject$Builder.<init>(Subject.java:627)
at org.apache.shiro.SecurityUtils.getSubject(SecurityUtils.java:56)
at org.apache.shiro.aop.AnnotationHandler.getSubject(AnnotationHandler.java:57)
at org.apache.shiro.authz.aop.PermissionAnnotationHandler.assertAuthorized(PermissionAnnotationHandler.java:71)
at org.tynamo.shiro.extension.authz.aop.DefaultSecurityInterceptor.intercept(DefaultSecurityInterceptor.java:81)
at org.tynamo.security.SecurityComponentRequestFilter.checkInternal(SecurityComponentRequestFilter.java:67)
at org.tynamo.security.SecurityComponentRequestFilter.handleComponentEvent(SecurityComponentRequestFilter.java:40)
at $ComponentRequestFilter_17d6244c9e61.handleComponentEvent(Unknown Source)
at $ComponentRequestHandler_17d6244c9e65.handleComponentEvent(Unknown Source)
at $ComponentRequestHandler_17d6244c9e69.advised$handleComponentEvent_17d6244c9e6b(Unknown
Source)
at $ComponentRequestHandler_17d6244c9e69$Invocation_handleComponentEvent_17d6244c9e6a.proceedToAdvisedMethod(Unknown
Source)
at org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:84)
at org.apache.tapestry5.ioc.internal.util.InternalUtils$21$1.proceed(InternalUtils.java:1386)
at org.tynamo.conversations.services.RequestHandlerDecoratorImpl$1.advise(RequestHandlerDecoratorImpl.java:26)
at org.apache.tapestry5.ioc.internal.util.InternalUtils$21.advise(InternalUtils.java:1455)
at org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:86)
at $ComponentRequestHandler_17d6244c9e69.handleComponentEvent(Unknown Source)
at $ComponentRequestHandler_17d6244c9e2e.handleComponentEvent(Unknown Source)
at org.lazan.t5.offline.services.internal.OfflineComponentRendererImpl$2.invoke(OfflineComponentRendererImpl.java:126)
at org.apache.tapestry5.ioc.internal.services.ParallelExecutorImpl$1.call(ParallelExecutorImpl.java:58)
... 4 more


Seems that SecurityManager is not accessible because of component
"offline" rendering. Are there any solutions to fix it?

Thanks,
Sem

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


Re: Tynamo-Conversations + Tapestry-Atmosphere

Posted by Semen Vishniakov <vi...@gmail.com>.
Thanks for your help.

I just changed the port from 8080 to 8081 and it works now.

Sem

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


Re: Tynamo-Conversations + Tapestry-Atmosphere

Posted by Semen Vishniakov <vi...@gmail.com>.
>That said, I'm not sure what would be the best invocation point to make it
happen with atmosphere/tapestry-offline.

Thank you for the reply. Yes, that is the problem for me: I don't know
where to bind SecurityManager.

Sem

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


Re: Tynamo-Conversations + Tapestry-Atmosphere

Posted by Lance Java <la...@googlemail.com>.
> Now it works perfectly.

Great! I'll add an issue to copy the isSecure() flag from the async
request.

> how can I override your "tapesty-atmosphere.js"?

stick it in the right path under WEB-IBF/classes and your container's
classloader will give it precedence.

Re: Tynamo-Conversations + Tapestry-Atmosphere

Posted by Semen Vishniakov <vi...@gmail.com>.
Thank you, Lance!
Now it works perfectly.

And one more question: I would like to push custom javascript using
atmosphere. I've seen this
https://github.com/uklance/tapestry-atmosphere/issues/5 and my
question is, how can I override your "tapesty-atmosphere.js"?

Thanks,
Sem

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


Re: Tynamo-Conversations + Tapestry-Atmosphere

Posted by Lance Java <la...@googlemail.com>.
Hi Sem, it looks like RequestSecurityManagerImpl is trying to redirect the
async request. Obviously redirecting an async request doesn't make sense,
hence the UnsupportedOperationException.

I can only guess that you have the @Secure annotation on the page. Correct?

Ultimately, we want Request.isSecure() to return true so it doesn't attempt
the redirect. I can see two ways of doing this:

1. Override / decorate PerRequestBroadcastFilter. You could extend
PerRequestBroadcastFilterImpl and override
createOfflineRequestContext(AtmosphereResource resource) to call
DefaultOfflineRequestContext.setSecure(true). Luckily this method is
protected so is a couple of lines of code.

2. Override / decorate OfflineObjectFactory such that Request.isSecure()
returns true.

https://github.com/uklance/tapestry-atmosphere/blob/master/tapestry-atmosphere/src/main/java/org/lazan/t5/atmosphere/services/internal/PerRequestBroadcastFilterImpl.java

https://github.com/uklance/tapestry-offline/blob/master/src/main/java/org/lazan/t5/offline/services/internal/OfflineObjectFactoryImpl.java

Cheers,
Lance.

Re: Tynamo-Conversations + Tapestry-Atmosphere

Posted by Semen Vishniakov <vi...@gmail.com>.
Thanks, I just stored Subject in the session and retrieved in the
filter. Not ideal, but ok.

Much to my regret, there are another exceptions: first was with the
not defined tapestry-online symbols and after I defined them I have
another one:

[ERROR] 2014-09-09 17:18:39,077 - internal.PerRequestBroadcastFilterImpl -
Error rendering ComponentEventParameters[page=Home
component=Home:mainlayout.pushtarget event=notificationEvent]
java.util.concurrent.ExecutionException:
java.lang.UnsupportedOperationException: sendRedirect
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:188)
at org.lazan.t5.offline.services.internal.OfflineComponentRendererImpl$1.get(OfflineComponentRendererImpl.java:84)
at org.lazan.t5.offline.services.internal.OfflineComponentRendererImpl$1.get(OfflineComponentRendererImpl.java:79)
at org.lazan.t5.atmosphere.services.internal.PerRequestBroadcastFilterImpl.filter(PerRequestBroadcastFilterImpl.java:59)
at org.atmosphere.cpr.BroadcasterConfig.filter(BroadcasterConfig.java:483)
at org.atmosphere.cpr.DefaultBroadcaster.perRequestFilter(DefaultBroadcaster.java:850)
at org.atmosphere.cpr.DefaultBroadcaster.deliverPush(DefaultBroadcaster.java:740)
at org.atmosphere.cpr.DefaultBroadcaster.push(DefaultBroadcaster.java:646)
at org.atmosphere.cpr.DefaultBroadcaster$2.run(DefaultBroadcaster.java:504)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.UnsupportedOperationException: sendRedirect
at org.lazan.t5.offline.internal.OfflineResponse.sendRedirect(OfflineResponse.java:49)
at $Response_f3566ba200b.sendRedirect(Unknown Source)
at $Response_f3566ba1f6f.sendRedirect(Unknown Source)
at org.apache.tapestry5.internal.services.RequestSecurityManagerImpl.checkForInsecureComponentEventRequest(RequestSecurityManagerImpl.java:61)
at $RequestSecurityManager_f3566ba1fcb.checkForInsecureComponentEventRequest(Unknown
Source)
at org.apache.tapestry5.services.TapestryModule$41.handle(TapestryModule.java:2473)
at $ComponentEventRequestHandler_f3566ba208c.handle(Unknown Source)
at $ComponentEventRequestHandler_f3566ba1ff3.handle(Unknown Source)
at org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handleComponentEvent(ComponentRequestHandlerTerminator.java:43)
at org.tynamo.security.SecurityComponentRequestFilter.handleComponentEvent(SecurityComponentRequestFilter.java:41)
at $ComponentRequestHandler_f3566ba1ff5.handleComponentEvent(Unknown Source)
at org.apache.tapestry5.services.InitializeActivePageName.handleComponentEvent(InitializeActivePageName.java:39)
at $ComponentRequestHandler_f3566ba1ff5.handleComponentEvent(Unknown Source)
at de.betterbits.comp.services.OfflineRendererRequestFilter.handleComponentEvent(OfflineRendererRequestFilter.java:44)
at $ComponentRequestFilter_f3566ba1ff2.handleComponentEvent(Unknown Source)
at $ComponentRequestHandler_f3566ba1ff5.handleComponentEvent(Unknown Source)
at org.lazan.t5.atmosphere.services.internal.PageGlobalsComponentRequestFilter.handleComponentEvent(PageGlobalsComponentRequestFilter.java:22)
at $ComponentRequestHandler_f3566ba1ff5.handleComponentEvent(Unknown Source)
at $ComponentRequestHandler_f3566ba1ff9.advised$handleComponentEvent_f3566ba1ffb(Unknown
Source)
at $ComponentRequestHandler_f3566ba1ff9$Invocation_handleComponentEvent_f3566ba1ffa.proceedToAdvisedMethod(Unknown
Source)
at org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:84)
at org.apache.tapestry5.ioc.internal.util.InternalUtils$21$1.proceed(InternalUtils.java:1386)
at org.tynamo.conversations.services.RequestHandlerDecoratorImpl$1.advise(RequestHandlerDecoratorImpl.java:26)
at org.apache.tapestry5.ioc.internal.util.InternalUtils$21.advise(InternalUtils.java:1455)
at org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:86)
at $ComponentRequestHandler_f3566ba1ff9.handleComponentEvent(Unknown Source)
at $ComponentRequestHandler_f3566ba1fbd.handleComponentEvent(Unknown Source)
at org.lazan.t5.offline.services.internal.OfflineComponentRendererImpl$2.invoke(OfflineComponentRendererImpl.java:126)
at org.apache.tapestry5.ioc.internal.services.ParallelExecutorImpl$1.call(ParallelExecutorImpl.java:58)
... 4 more

[ERROR] 2014-09-09 17:20:03,134 - internal.PerRequestBroadcastFilterImpl -
Error rendering ComponentEventParameters[page=Home
component=Home:mainlayout.pushtarget event=notificationEvent]
java.util.concurrent.ExecutionException:
java.lang.UnsupportedOperationException: sendRedirect
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:188)
at org.lazan.t5.offline.services.internal.OfflineComponentRendererImpl$1.get(OfflineComponentRendererImpl.java:84)
at org.lazan.t5.offline.services.internal.OfflineComponentRendererImpl$1.get(OfflineComponentRendererImpl.java:79)
at org.lazan.t5.atmosphere.services.internal.PerRequestBroadcastFilterImpl.filter(PerRequestBroadcastFilterImpl.java:59)
at org.atmosphere.cpr.BroadcasterConfig.filter(BroadcasterConfig.java:483)
at org.atmosphere.cpr.DefaultBroadcaster.perRequestFilter(DefaultBroadcaster.java:850)
at org.atmosphere.cpr.DefaultBroadcaster.deliverPush(DefaultBroadcaster.java:740)
at org.atmosphere.cpr.DefaultBroadcaster.push(DefaultBroadcaster.java:646)
at org.atmosphere.cpr.DefaultBroadcaster$2.run(DefaultBroadcaster.java:504)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.UnsupportedOperationException: sendRedirect
at org.lazan.t5.offline.internal.OfflineResponse.sendRedirect(OfflineResponse.java:49)
at $Response_f3566ba200b.sendRedirect(Unknown Source)
at $Response_f3566ba1f6f.sendRedirect(Unknown Source)
at org.apache.tapestry5.internal.services.RequestSecurityManagerImpl.checkForInsecureComponentEventRequest(RequestSecurityManagerImpl.java:61)
at $RequestSecurityManager_f3566ba1fcb.checkForInsecureComponentEventRequest(Unknown
Source)
at org.apache.tapestry5.services.TapestryModule$41.handle(TapestryModule.java:2473)
at $ComponentEventRequestHandler_f3566ba208c.handle(Unknown Source)
at $ComponentEventRequestHandler_f3566ba1ff3.handle(Unknown Source)
at org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handleComponentEvent(ComponentRequestHandlerTerminator.java:43)
at org.tynamo.security.SecurityComponentRequestFilter.handleComponentEvent(SecurityComponentRequestFilter.java:41)
at $ComponentRequestHandler_f3566ba1ff5.handleComponentEvent(Unknown Source)
at org.apache.tapestry5.services.InitializeActivePageName.handleComponentEvent(InitializeActivePageName.java:39)
at $ComponentRequestHandler_f3566ba1ff5.handleComponentEvent(Unknown Source)
at de.betterbits.comp.services.OfflineRendererRequestFilter.handleComponentEvent(OfflineRendererRequestFilter.java:44)
at $ComponentRequestFilter_f3566ba1ff2.handleComponentEvent(Unknown Source)
at $ComponentRequestHandler_f3566ba1ff5.handleComponentEvent(Unknown Source)
at org.lazan.t5.atmosphere.services.internal.PageGlobalsComponentRequestFilter.handleComponentEvent(PageGlobalsComponentRequestFilter.java:22)
at $ComponentRequestHandler_f3566ba1ff5.handleComponentEvent(Unknown Source)
at $ComponentRequestHandler_f3566ba1ff9.advised$handleComponentEvent_f3566ba1ffb(Unknown
Source)
at $ComponentRequestHandler_f3566ba1ff9$Invocation_handleComponentEvent_f3566ba1ffa.proceedToAdvisedMethod(Unknown
Source)
at org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:84)
at org.apache.tapestry5.ioc.internal.util.InternalUtils$21$1.proceed(InternalUtils.java:1386)
at org.tynamo.conversations.services.RequestHandlerDecoratorImpl$1.advise(RequestHandlerDecoratorImpl.java:26)
at org.apache.tapestry5.ioc.internal.util.InternalUtils$21.advise(InternalUtils.java:1455)
at org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:86)
at $ComponentRequestHandler_f3566ba1ff9.handleComponentEvent(Unknown Source)
at $ComponentRequestHandler_f3566ba1fbd.handleComponentEvent(Unknown Source)
at org.lazan.t5.offline.services.internal.OfflineComponentRendererImpl$2.invoke(OfflineComponentRendererImpl.java:126)
at org.apache.tapestry5.ioc.internal.services.ParallelExecutorImpl$1.call(ParallelExecutorImpl.java:58)
... 4 more

Seems it fails at
org.apache.tapestry5.internal.services.checkForInsecureComponentEventRequest
because the request is not secured, but the page is and tapestry tries
to redirect using OfflineResponse.sendRedirect which throws this
exception

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


Re: Tynamo-Conversations + Tapestry-Atmosphere

Posted by Lance Java <la...@googlemail.com>.
Youre correct, the HttpServletRequest and HttpServletResponse are not
available. This was a design decision made by tapestry-offline. I guess I
could make this pluggable.

But the Request and Response tapestry wrappers ARE available. Also, the
ApplicationStateManager is available. I felt that these are adequate and
tapestry users should never need the raw http objects.

Can you make do with the Request and Response tapestry wrappers? Do you
actually need the raw http objects? Or just properties from it? If not you
could always create a proxy (not ideal I know).
On 9 Sep 2014 12:31, "Semen Vishniakov" <vi...@gmail.com> wrote:

> >So it sounds like you'll need to contribute a ComponentRequestFilter.
> Make sure you order it "before:" the tynamo filter.
>
> Yes, this is the right place, but I don't have HttpServletRequest and
> HttpServletResponse and I can't initialize security subject like here:
>
> https://github.com/tynamo/tapestry-security/blob/master/src/main/java/org/tynamo/security/services/impl/SecurityConfiguration.java#L51
>
> I've tried to make something like this:
>
> ThreadContext.bind(securityManager);
> Subject subject = SecurityUtils.getSubject();
> subject.login(new UsernamePasswordToken("default", "default", true));
> //this user exists
> handler.handleComponentEvent(parameters);
>
> But it causes another exception:
>
> java.util.concurrent.ExecutionException:
> org.apache.shiro.authz.UnauthenticatedException: This subject is
> anonymous - it does not have any identifying principals and
> authorization operations require an identity to check against.  A
> Subject instance will acquire these identifying principals
> automatically after a successful login is performed be executing
> org.apache.shiro.subject.Subject.login(AuthenticationToken) or when
> 'Remember Me' functionality is enabled by the SecurityManager.  This
> exception can also occur when a previously logged-in Subject has
> logged out which makes it anonymous again.  Because an identity is
> currently not known due to any of these conditions, authorization is
> denied.
> at java.util.concurrent.FutureTask.report(FutureTask.java:122)
> at java.util.concurrent.FutureTask.get(FutureTask.java:188)
> at
> org.lazan.t5.offline.services.internal.OfflineComponentRendererImpl$1.get(OfflineComponentRendererImpl.java:84)
> at
> org.lazan.t5.offline.services.internal.OfflineComponentRendererImpl$1.get(OfflineComponentRendererImpl.java:79)
> at
> org.lazan.t5.atmosphere.services.internal.PerRequestBroadcastFilterImpl.filter(PerRequestBroadcastFilterImpl.java:59)
> at org.atmosphere.cpr.BroadcasterConfig.filter(BroadcasterConfig.java:483)
> at
> org.atmosphere.cpr.DefaultBroadcaster.perRequestFilter(DefaultBroadcaster.java:850)
> at
> org.atmosphere.cpr.DefaultBroadcaster.deliverPush(DefaultBroadcaster.java:740)
> at org.atmosphere.cpr.DefaultBroadcaster.push(DefaultBroadcaster.java:646)
> at org.atmosphere.cpr.DefaultBroadcaster$2.run(DefaultBroadcaster.java:504)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:744)
> Caused by: org.apache.shiro.authz.UnauthenticatedException: This
> subject is anonymous - it does not have any identifying principals and
> authorization operations require an identity to check against.  A
> Subject instance will acquire these identifying principals
> automatically after a successful login is performed be executing
> org.apache.shiro.subject.Subject.login(AuthenticationToken) or when
> 'Remember Me' functionality is enabled by the SecurityManager.  This
> exception can also occur when a previously logged-in Subject has
> logged out which makes it anonymous again.  Because an identity is
> currently not known due to any of these conditions, authorization is
> denied.
> at
> org.apache.shiro.subject.support.DelegatingSubject.assertAuthzCheckPossible(DelegatingSubject.java:200)
> at
> org.apache.shiro.subject.support.DelegatingSubject.checkPermission(DelegatingSubject.java:205)
> at
> org.apache.shiro.authz.aop.PermissionAnnotationHandler.assertAuthorized(PermissionAnnotationHandler.java:74)
> at
> org.tynamo.shiro.extension.authz.aop.DefaultSecurityInterceptor.intercept(DefaultSecurityInterceptor.java:81)
> at
> org.tynamo.security.SecurityComponentRequestFilter.checkInternal(SecurityComponentRequestFilter.java:67)
> at
> org.tynamo.security.SecurityComponentRequestFilter.handleComponentEvent(SecurityComponentRequestFilter.java:40)
> at $ComponentRequestHandler_13b5b7fdc25.handleComponentEvent(Unknown
> Source)
> at
> org.apache.tapestry5.services.InitializeActivePageName.handleComponentEvent(InitializeActivePageName.java:39)
> at $ComponentRequestHandler_13b5b7fdc25.handleComponentEvent(Unknown
> Source)
> at
> org.lazan.t5.atmosphere.services.internal.PageGlobalsComponentRequestFilter.handleComponentEvent(PageGlobalsComponentRequestFilter.java:22)
> at $ComponentRequestHandler_13b5b7fdc25.handleComponentEvent(Unknown
> Source)
> at
> de.betterbits.comp.services.OfflineRendererRequestFilter.handleComponentEvent(OfflineRendererRequestFilter.java:45)
> at $ComponentRequestFilter_13b5b7fdc20.handleComponentEvent(Unknown Source)
> at $ComponentRequestHandler_13b5b7fdc25.handleComponentEvent(Unknown
> Source)
> at
> $ComponentRequestHandler_13b5b7fdc29.advised$handleComponentEvent_13b5b7fdc2b(Unknown
> Source)
> at
> $ComponentRequestHandler_13b5b7fdc29$Invocation_handleComponentEvent_13b5b7fdc2a.proceedToAdvisedMethod(Unknown
> Source)
> at
> org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:84)
> at
> org.apache.tapestry5.ioc.internal.util.InternalUtils$21$1.proceed(InternalUtils.java:1386)
> at
> org.tynamo.conversations.services.RequestHandlerDecoratorImpl$1.advise(RequestHandlerDecoratorImpl.java:26)
> at
> org.apache.tapestry5.ioc.internal.util.InternalUtils$21.advise(InternalUtils.java:1455)
> at
> org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:86)
> at $ComponentRequestHandler_13b5b7fdc29.handleComponentEvent(Unknown
> Source)
> at $ComponentRequestHandler_13b5b7fdbed.handleComponentEvent(Unknown
> Source)
> at
> org.lazan.t5.offline.services.internal.OfflineComponentRendererImpl$2.invoke(OfflineComponentRendererImpl.java:126)
> at
> org.apache.tapestry5.ioc.internal.services.ParallelExecutorImpl$1.call(ParallelExecutorImpl.java:58)
> ... 4 more
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: Tynamo-Conversations + Tapestry-Atmosphere

Posted by Semen Vishniakov <vi...@gmail.com>.
>So it sounds like you'll need to contribute a ComponentRequestFilter. Make sure you order it "before:" the tynamo filter.

Yes, this is the right place, but I don't have HttpServletRequest and
HttpServletResponse and I can't initialize security subject like here:
https://github.com/tynamo/tapestry-security/blob/master/src/main/java/org/tynamo/security/services/impl/SecurityConfiguration.java#L51

I've tried to make something like this:

ThreadContext.bind(securityManager);
Subject subject = SecurityUtils.getSubject();
subject.login(new UsernamePasswordToken("default", "default", true));
//this user exists
handler.handleComponentEvent(parameters);

But it causes another exception:

java.util.concurrent.ExecutionException:
org.apache.shiro.authz.UnauthenticatedException: This subject is
anonymous - it does not have any identifying principals and
authorization operations require an identity to check against.  A
Subject instance will acquire these identifying principals
automatically after a successful login is performed be executing
org.apache.shiro.subject.Subject.login(AuthenticationToken) or when
'Remember Me' functionality is enabled by the SecurityManager.  This
exception can also occur when a previously logged-in Subject has
logged out which makes it anonymous again.  Because an identity is
currently not known due to any of these conditions, authorization is
denied.
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:188)
at org.lazan.t5.offline.services.internal.OfflineComponentRendererImpl$1.get(OfflineComponentRendererImpl.java:84)
at org.lazan.t5.offline.services.internal.OfflineComponentRendererImpl$1.get(OfflineComponentRendererImpl.java:79)
at org.lazan.t5.atmosphere.services.internal.PerRequestBroadcastFilterImpl.filter(PerRequestBroadcastFilterImpl.java:59)
at org.atmosphere.cpr.BroadcasterConfig.filter(BroadcasterConfig.java:483)
at org.atmosphere.cpr.DefaultBroadcaster.perRequestFilter(DefaultBroadcaster.java:850)
at org.atmosphere.cpr.DefaultBroadcaster.deliverPush(DefaultBroadcaster.java:740)
at org.atmosphere.cpr.DefaultBroadcaster.push(DefaultBroadcaster.java:646)
at org.atmosphere.cpr.DefaultBroadcaster$2.run(DefaultBroadcaster.java:504)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: org.apache.shiro.authz.UnauthenticatedException: This
subject is anonymous - it does not have any identifying principals and
authorization operations require an identity to check against.  A
Subject instance will acquire these identifying principals
automatically after a successful login is performed be executing
org.apache.shiro.subject.Subject.login(AuthenticationToken) or when
'Remember Me' functionality is enabled by the SecurityManager.  This
exception can also occur when a previously logged-in Subject has
logged out which makes it anonymous again.  Because an identity is
currently not known due to any of these conditions, authorization is
denied.
at org.apache.shiro.subject.support.DelegatingSubject.assertAuthzCheckPossible(DelegatingSubject.java:200)
at org.apache.shiro.subject.support.DelegatingSubject.checkPermission(DelegatingSubject.java:205)
at org.apache.shiro.authz.aop.PermissionAnnotationHandler.assertAuthorized(PermissionAnnotationHandler.java:74)
at org.tynamo.shiro.extension.authz.aop.DefaultSecurityInterceptor.intercept(DefaultSecurityInterceptor.java:81)
at org.tynamo.security.SecurityComponentRequestFilter.checkInternal(SecurityComponentRequestFilter.java:67)
at org.tynamo.security.SecurityComponentRequestFilter.handleComponentEvent(SecurityComponentRequestFilter.java:40)
at $ComponentRequestHandler_13b5b7fdc25.handleComponentEvent(Unknown Source)
at org.apache.tapestry5.services.InitializeActivePageName.handleComponentEvent(InitializeActivePageName.java:39)
at $ComponentRequestHandler_13b5b7fdc25.handleComponentEvent(Unknown Source)
at org.lazan.t5.atmosphere.services.internal.PageGlobalsComponentRequestFilter.handleComponentEvent(PageGlobalsComponentRequestFilter.java:22)
at $ComponentRequestHandler_13b5b7fdc25.handleComponentEvent(Unknown Source)
at de.betterbits.comp.services.OfflineRendererRequestFilter.handleComponentEvent(OfflineRendererRequestFilter.java:45)
at $ComponentRequestFilter_13b5b7fdc20.handleComponentEvent(Unknown Source)
at $ComponentRequestHandler_13b5b7fdc25.handleComponentEvent(Unknown Source)
at $ComponentRequestHandler_13b5b7fdc29.advised$handleComponentEvent_13b5b7fdc2b(Unknown
Source)
at $ComponentRequestHandler_13b5b7fdc29$Invocation_handleComponentEvent_13b5b7fdc2a.proceedToAdvisedMethod(Unknown
Source)
at org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:84)
at org.apache.tapestry5.ioc.internal.util.InternalUtils$21$1.proceed(InternalUtils.java:1386)
at org.tynamo.conversations.services.RequestHandlerDecoratorImpl$1.advise(RequestHandlerDecoratorImpl.java:26)
at org.apache.tapestry5.ioc.internal.util.InternalUtils$21.advise(InternalUtils.java:1455)
at org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:86)
at $ComponentRequestHandler_13b5b7fdc29.handleComponentEvent(Unknown Source)
at $ComponentRequestHandler_13b5b7fdbed.handleComponentEvent(Unknown Source)
at org.lazan.t5.offline.services.internal.OfflineComponentRendererImpl$2.invoke(OfflineComponentRendererImpl.java:126)
at org.apache.tapestry5.ioc.internal.services.ParallelExecutorImpl$1.call(ParallelExecutorImpl.java:58)
... 4 more

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


Re: Tynamo-Conversations + Tapestry-Atmosphere

Posted by Lance Java <la...@googlemail.com>.
> Lance, I'm also starting to use your work in my application.

Cool!

 > your code on github works with atmosphere-runtime-native 2.1.0-RC2.
Later versions of Atmosphere fails.

Pull requests accepted!

> Since we're not using build profiles like in your example, I've had to
manually include atmosphere-runtime-native

Atmosphere is a bit of a strange dependency unfortunately. Different
containers and different container versions require different jars. The
table here shows the complexity

https://github.com/Atmosphere/atmosphere/wiki/Installing-AtmosphereServlet-with-or-without-native-support#quick-dependency-reference

So I chose to have a "provided" dependency and let the client decide.

Re: Tynamo-Conversations + Tapestry-Atmosphere

Posted by Daniel Jue <te...@gmail.com>.
Lance, I'm also starting to use your work in my application.  I think it's
important to note that your code on github works with
atmosphere-runtime-native 2.1.0-RC2 from Dec 2013.  Later versions of
Atmosphere seem to need different dependencies included, and also the
contribute method fails because some method signature in Atmosphere changed
after the version above.

Since we're not using build profiles like in your example, I've had to
manually include

<dependency>
<groupId>org.atmosphere</groupId>
<artifactId>atmosphere-runtime-native</artifactId>
<version>2.1.0-RC2</version>
</dependency>

in addition to

org.lanzan
tapestry-atmosphere

in my POM.



On Tue, Sep 2, 2014 at 2:33 PM, Lance Java <la...@googlemail.com>
wrote:

> Wrong link, make sure your dependencies match the table here
>
> https://github.com/Atmosphere/atmosphere/wiki/Installing-AtmosphereServlet-with-or-without-native-support#quick-dependency-reference
>  On 2 Sep 2014 19:31, "Lance Java" <la...@googlemail.com> wrote:
>
> > Run "mvn:dependency tree" from the command line and make sure your
> > dependencies match the table here
> > http://tapestry-atmosphere.uklance.cloudbees.net/. You might need to
> > <exclude> a dependency? Not sure.
> >
> > I had troubles with tomcat and apache on cloudbees and had to upgrade to
> > http 1.1. Does it work on jetty (runjettyrun plugin?).
> >
> > Possibly best to ask further questions on atmosphere users list if it's
> > more relevant there.
> >
>

Re: Tynamo-Conversations + Tapestry-Atmosphere

Posted by Lance Java <la...@googlemail.com>.
Wrong link, make sure your dependencies match the table here
https://github.com/Atmosphere/atmosphere/wiki/Installing-AtmosphereServlet-with-or-without-native-support#quick-dependency-reference
 On 2 Sep 2014 19:31, "Lance Java" <la...@googlemail.com> wrote:

> Run "mvn:dependency tree" from the command line and make sure your
> dependencies match the table here
> http://tapestry-atmosphere.uklance.cloudbees.net/. You might need to
> <exclude> a dependency? Not sure.
>
> I had troubles with tomcat and apache on cloudbees and had to upgrade to
> http 1.1. Does it work on jetty (runjettyrun plugin?).
>
> Possibly best to ask further questions on atmosphere users list if it's
> more relevant there.
>

Re: Tynamo-Conversations + Tapestry-Atmosphere

Posted by Lance Java <la...@googlemail.com>.
Run "mvn:dependency tree" from the command line and make sure your
dependencies match the table here
http://tapestry-atmosphere.uklance.cloudbees.net/. You might need to
<exclude> a dependency? Not sure.

I had troubles with tomcat and apache on cloudbees and had to upgrade to
http 1.1. Does it work on jetty (runjettyrun plugin?).

Possibly best to ask further questions on atmosphere users list if it's
more relevant there.

Re: Tynamo-Conversations + Tapestry-Atmosphere

Posted by Semen Vishniakov <vi...@gmail.com>.
Yes, the exception is gone now, thank you!

But I have another question now:

The demo and my project work perfectly with cometd long-polling
connection. But when I try to change it to WebSocket, the event is not
triggered. There is no errors or exceptions, in browser console I have
"Websocket successfully opened". I assume that the cause could be
tomcat configuration. I use the 7th version and I've added
atmosphere-runtime-native, atmosphere-compat-jbossweb and
atmosphere-compat-tomcat dependencies.
Any ideas?

Thanks in advance!
Sem.

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


Re: Tynamo-Conversations + Tapestry-Atmosphere

Posted by Semen Vishniakov <vi...@gmail.com>.
Wow, thank you for your work Lance!

I can't test it this week, but I will try it next week and write here
how it works for me.

Sem

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


Re: Tynamo-Conversations + Tapestry-Atmosphere

Posted by Lance Java <la...@googlemail.com>.
I've just fixed the issue in tapestry-atmosphere 0.0.4 (tapestry-offline
0.0.2)

Please try with the latest version of tapestry-atmosphere.

Cheers,
Lance

Re: Tynamo-Conversations + Tapestry-Atmosphere

Posted by Lance Java <la...@googlemail.com>.
Hi Sem,

Taking a look into this, I was surprised to see that tapestry's request
does not have a getCookies() method
http://tapestry.apache.org/5.3/apidocs/org/apache/tapestry5/services/Request.html

Instead, the CookieSource has to go directly to the HttpServletRequest
https://github.com/apache/tapestry5/blob/a197470fc1e698ca713741150114543a3f30d25b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/InternalModule.java#L205

Under the hood, tapestry-atmosphere uses tapestry-offline to which fools
tapestry into rendering templates by spoofing a Request and a Response. I
took the design decision NOT to mock HttpServletRequest and
HttpServletResponse but it seems that's now causing an error in Tynamo

I feel that we should add a getCookies() method to
org.apache.tapestry5.services.Request (this would be a breaking change).
If CookieSource could then invoke this it would fix your error.

I'm guessing that Howard has a reason for leaving this off the Request
object?

Another option is for tapestry-offline to override the CookieSource service
but this gets a bit messy.

Cheers,
Lance.


On 22 August 2014 16:44, Semen Vishniakov <vi...@gmail.com> wrote:

> Hi all,
>
> I'm trying to intrgrate tapestry-atmosphere library in my project,
> where we already have tynamo conversation and tynamo security.
>
> The following exception is thrown, when I try to broadcast message:
>
> internal.PerRequestBroadcastFilterImpl -
> Error rendering ComponentEventParameters[page=Home
> component=Home:mainlayout.pushtarget event=notificationEvent]
> java.lang.RuntimeException: java.util.concurrent.ExecutionException:
> java.lang.NullPointerException
> at
> org.lazan.t5.offline.services.internal.OfflineComponentRendererImpl.doRender(OfflineComponentRendererImpl.java:124)
> at
> org.lazan.t5.offline.services.internal.OfflineComponentRendererImpl.renderComponent(OfflineComponentRendererImpl.java:83)
> at $OfflineComponentRenderer_e08b8b016e7.renderComponent(Unknown Source)
> at
> org.lazan.t5.atmosphere.services.internal.PerRequestBroadcastFilterImpl.filter(PerRequestBroadcastFilterImpl.java:56)
> at org.atmosphere.cpr.BroadcasterConfig.filter(BroadcasterConfig.java:483)
> at
> org.atmosphere.cpr.DefaultBroadcaster.perRequestFilter(DefaultBroadcaster.java:850)
> at
> org.atmosphere.cpr.DefaultBroadcaster.deliverPush(DefaultBroadcaster.java:740)
> at org.atmosphere.cpr.DefaultBroadcaster.push(DefaultBroadcaster.java:646)
> at
> org.atmosphere.cpr.DefaultBroadcaster.perRequestFilter(DefaultBroadcaster.java:850)
> at
> org.atmosphere.cpr.DefaultBroadcaster.deliverPush(DefaultBroadcaster.java:740)
> at org.atmosphere.cpr.DefaultBroadcaster.push(DefaultBroadcaster.java:646)
> at java.lang.Thread.run(Thread.java:744)
> Caused by: java.util.concurrent.ExecutionException:
> java.lang.NullPointerException
> at java.util.concurrent.FutureTask.report(FutureTask.java:122)
> at
> org.lazan.t5.offline.services.internal.OfflineComponentRendererImpl.doRender(OfflineComponentRendererImpl.java:122)
> ... 13 more
> Caused by: java.lang.NullPointerException
> at
> org.apache.tapestry5.internal.services.InternalModule$1.getCookies(InternalModule.java:163)
> at $CookieSource_e08b8b0171a.getCookies(Unknown Source)
> at
> org.apache.tapestry5.internal.services.CookiesImpl.readCookieValue(CookiesImpl.java:61)
> at $Cookies_e08b8b01719.readCookieValue(Unknown Source)
> at
> org.tynamo.conversations.services.ConversationManagerImpl.activateConversation(ConversationManagerImpl.java:73)
> at $ConversationManager_e08b8b01756.activateConversation(Unknown Source)
> at
> org.tynamo.conversations.services.RequestHandlerDecoratorImpl$1.advise(RequestHandlerDecoratorImpl.java:25)
> at
> org.apache.tapestry5.ioc.internal.util.InternalUtils$21.advise(InternalUtils.java:1455)
> at
> org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:86)
> at $ComponentRequestHandler_e08b8b01757.handleComponentEvent(Unknown
> Source)
> at $ComponentRequestHandler_e08b8b0171d.handleComponentEvent(Unknown
> Source)
> at
> org.lazan.t5.offline.services.internal.OfflineComponentRendererImpl$1.invoke(OfflineComponentRendererImpl.java:112)
> at
> org.lazan.t5.offline.services.internal.OfflineComponentRendererImpl$1.invoke(OfflineComponentRendererImpl.java:100)
> at
> org.apache.tapestry5.ioc.internal.services.ParallelExecutorImpl$1.call(ParallelExecutorImpl.java:58)
> ... 4 more
>
>
> I checked cookies in this request and they are not empty. What could
> be the cause of this problem?
>
> Thanks,
> Sem
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>