I created a sample application that should help reproducing the error. https://github.com/lalo-mx/struts-json-example/
The error happened opening the app (localhost/struts-json-example) in 4 different browsers / sessions. >> By the way, Eduardo, you can also workaround this issue for now by >> synchronizing access to custom.action via using java synchronized keyword >> inside your action method. I do not think that would be a good workaround because of the number of custom actions that has the app and the bottleneck that could potentially cause. On 2019/01/29 11:04:21, Yasser Zamani <yasserzam...@apache.org> wrote: > >From: Lukasz Lenart <lukaszlen...@apache.org> > >Sent: Tuesday, January 29, 2019 2:18 PM > >To: Struts Users Mailing List <user@struts.apache.org> > >Subject: Re: EmptyStackException after upgrading Struts 2.3 to 2.5 > > > >wt., 29 sty 2019 o 11:30 Yasser Zamani <yasserzam...@apache.org> napisaĆ(a): > >> Yes you both are right. It looks like a race condition between stack.clear > >> and > >stack.write [1]. But somehow it's odd. I was aware about this and defined > >them > >as prototype [2] so I except new instance on each request. I also can recall > >I > >tested them heavily on high concurrent load [3]. > > > >but this is used in an interceptor and interceptors are created once per > >package, > >so the same instance will be used for the same requests > > Yes I recently learnt it but I always logically had this assumption: When > bean A needs bean B to be injected and B's type is `prototype`, then Struts > internal injection cycle always re-inject a new instance of B into A > regardless if A's type is `singleton` or `prototype`. So I missed this case > :( and Ach, you're right, I now can retain my high concurrent test was on > JSONResult not JSONInterceptor :( > > Regards. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org