Aaron, Nikolaos, Thanks for your responses. I have learnt a lot from Aaron's request to reproduce the error in a simple, self contained example, and have found out that using a view helper in my page (A concept i learnt from Freddy's book) is causing the problem that i have.
When stripes is handling the view helper, a RequestComplete lifecycle stage event is triggered once the view helper has been handled. However, the jsp is not fully handled at that stage yet: in my jsp, i'm still doing more stuff after the inclusion of this view helper. This "early" RequestComplete causes Stripersist to clean up, but i still need to fetch stuff from the database. This is demonstrated in the example i have made, which can be downloaded at: http://wikisend.com/download/598940/example.zip It uses gradle. The gradle wrapper is included in case you don't have gradle. Useful commands (run from project root folder) gradlew eclipse - generates eclipse files, for easy import. gradlew jettyRun - deploys the project in an embedded jetty server. Point browser to localhost:8080 :) Removing the view helper, or pasting the view helper below the results table in the jsp "fixes" the problem. I am not sure if it's intended for Stripes to fire a RequestComplete event when it's still processing the jsp. If this is indeed intended behaviour, then either i have to just remove my view helper, or the Stripersist interceptor has to somehow track if it can expect more RequestComplete events this thread, so it can keep around the entitymanager(s) a bit longer. Note that in stripes 1.5.3, the Lifecycle from the view helper seems to wait with the RequestComplete event until the jsp is done processing. I currently have resorted to removing my view helper, which results in my pages having a single RequestInit and -Complete cycle again :) I hope the included example makes things a bit more clear. Greets Rolf -----Oorspronkelijk bericht----- Van: Nikolaos Giannopoulos [mailto:nikol...@brightminds.org] Verzonden: maandag 22 november 2010 22:13 Aan: Stripes Users List Onderwerp: Re: [Stripes-users] Stripes 1.5.4 and stripersist 1.0 Rolf, Stripersist is also working for us with 1.5.4. We are using it directly and in unit tests and no issues. One thing that helped me solve issues I thought were related to Stripersist was debugging with the Stripersist source code and stepping through the code. Here is what I would suggest: - Setup IDE breakpoints on requestInit(), requestComplete(), init() and on the method with the error message you noted (its there in a block of text) - Run the code with 1.5.4 and stepping through Stripersist go until it blows up... - Run the code with 1.5.3 and step through the same areas and see why that doesn't blow up... Doing this helped me learn a lot about Stripersist in the process and figure out how to solve our problem. BTW Stripersist is a well written encapsulated piece of code that helps bridge Stripes and (raw) JPA... I wouldn't expect updates... unless higher level functionality was built on top of it... and even then its compact size and simplicity makes it much better this way IMHO. The other option is trying to provide people with pieces of your code until someone can reproduce what you are seeing but that might be a much longer road to travel unless you can pack up a small reproducible test case. HTH, --Nikolaos Aaron Porter wrote: > Hi Rolf, > Stripersist hasn't been updated in a while because it's been working > fine for me. ;-) > > I'll be happy to help you get it working. I'm running with Stripes 1.5.4 > and Stripersist just fine. I'm not sure what exactly you're doing when > you say you're building a page from multiple resolutions. Can you create > a minimal example that demonstrates the problem? > > Thanks! > Aaron > > > > On 11/22/2010 11:56 AM, Rolf Suurd wrote: > >> Hey, >> >> I am not sure if this the apropriate mailing list for this particular problem i >> am having. If not, my apologies. >> >> I have an application which i am trying to upgrade from 1.5.3 to 1.5.4. This >> application uses stripersist for it's persistence layer. >> >> I have a page which gets built using multiple resolutions, all of them return >> jsp fragments. One fragment returns the table of search results. And this is >> where things go wrong. I turned on trace logging for stripersist and this was >> the output for stripes 1.5.4: >> >> TRACE net.sourceforge.stripes.util.Log - RequestInit >> TRACE net.sourceforge.stripes.util.Log - RequestInit >> TRACE net.sourceforge.stripes.util.Log - RequestComplete >> TRACE net.sourceforge.stripes.util.Log - Cleaning up EntityManagers >> ERROR net.sourceforge.stripes.util.Log - >> net.sourceforge.stripes.exception.StripesRuntimeException: It looks like >> Stripersist isn't configured as an Interceptor or you're calling Stripersist >> from a thread outside of the StripesFilter. If you want use Stripersist from >> outside of Stripes you should call Stripersist.initRequest() inside of a try >> block before requesting an EntityManager and call Stripersist.requestComplete() >> in a finally block so Stripersist can clean everything up for you. >> at org.stripesstuff.stripersist.Stripersist.getEntityManager(Stripersist.java:4 31) >> at org.stripesstuff.stripersist.Stripersist.getEntityManager(Stripersist.java:4 84) >> at aristo.dao.stripersist.BaseDaoImpl.list(BaseDaoImpl.java:36) >> >> When switching back to stripes 1.5.3, the trace output is as expected: >> >> TRACE net.sourceforge.stripes.util.Log - RequestInit >> INFO org.displaytag.export.ExportViewFactory - Initializing ExportViewFactory >> with type={csv,excel,xml,pdf} >> INFO org.displaytag.properties.TableProperties - No LocaleResolver configured. >> INFO org.displaytag.properties.TableProperties - I18nResourceProvider >> initialized to org.displaytag.localization.I18nJstlAdapter. >> DEBUG net.sourceforge.stripes.util.Log - Retrieving primary key to return as >> format string for instance of aristo.model.battle.User >> >> --- lots more primary key operations for all search results >> >> TRACE net.sourceforge.stripes.util.Log - RequestInit >> TRACE net.sourceforge.stripes.util.Log - RequestComplete >> TRACE net.sourceforge.stripes.util.Log - Cleaning up EntityManagers >> TRACE net.sourceforge.stripes.util.Log - RequestComplete >> >> Stripersist hasn't been updated for a while, can anyone help me out fixing the >> stripersist interceptor to work with 1.5.4? >> >> Thanks! >> >> Rolf >> >> >> ---------------------------------------------------------------------------- -- >> Increase Visibility of Your 3D Game App& Earn a Chance To Win $500! >> Tap into the largest installed PC base& get more eyes on your game by >> optimizing for Intel(R) Graphics Technology. Get started today with the >> Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. >> http://p.sf.net/sfu/intelisp-dev2dev >> _______________________________________________ >> Stripes-users mailing list >> Stripes-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/stripes-users >> >> > > > ---------------------------------------------------------------------------- -- > Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! > Tap into the largest installed PC base & get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with the > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. > http://p.sf.net/sfu/intelisp-dev2dev > _______________________________________________ > Stripes-users mailing list > Stripes-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/stripes-users > > -- Nikolaos Giannopoulos Director of Information Technology BrightMinds Software Inc. e. nikol...@brightminds.org w. www.brightminds.org t. 1.613.822.1700 c. 1.613.797.0036 f. 1.613.822.1915 ---------------------------------------------------------------------------- -- Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev _______________________________________________ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users Geen virus gevonden in het binnenkomende-bericht. Gecontroleerd door AVG - www.avg.com Versie: 9.0.869 / Virusdatabase: 271.1.1/3271 - datum van uitgifte: 11/21/10 20:35:00 ------------------------------------------------------------------------------ Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev _______________________________________________ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users