Technipelago AB

Technipelago Blog Stuff that we learned...

In Grails 2.5.1 don't name a request parameter "namespace"

Publicerad den 7 sep 2015

Lessons learned the hard way...

When I upgraded a Grails 2.4.5 application to Grails 2.5.1 one group of events stopped working. No event listeners were found for the namespace and topic.

Reverting back to Grails 2.4.5 made the events work again.

I think the change that hit me was this commit. I had a request parameter called "namespace" that I used to dynamically set the namespace for the the events. But in Grails 2.5.1 "namespace" is a reserved parameter name for the controller namespace. So the value I sent in the request parameter was overwritten (actually it is removed) by Grails.

Renaming my request parameter from "namespace" to "ns" solved my problem. But I wonder if this is expected behaviour by Grails, removing "my" parameter like that?

Tags: grails 2.5.1 namespace upgrade problem

« Tillbaka