chrisala commented on issue #15851:
URL: https://github.com/apache/grails-core/issues/15851#issuecomment-6404062203
This isn't related to Spring Security, but the "request object has been
recycled" error can be reproduced using the grails 8 async library.
When triggering data binding on a domain object (for example using the Map
constructor of the entity) in a grails async task, the GrailsWebDataBinder
attempts to reference the current HTTP request. This can result in the
"request object has been recycled" exception being thrown (and recorded as a
binding error on the domain object) if the task has outlived the HTTP request
that initiated it.
I encountered this doing audit logging via a GORM event listener and using
the Map constructor to create the entity.
[This](https://github.com/chrisala/gorm-mongodb-grails8) project reproduces the
error.
The WebDataBinder doesn't seem to actually need the HTTP request, if you
override the GrailsWebRequestTaskDecorator bean with one that does nothing it
all works correctly.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]