Author Archive

A very small but I’m sure useful snippet here for anyone banging their head against a wall trying to figure out why they cannot validate command objects.. Or even why submitting a form they get this rather misleading exception message from Grails.

Method on class [com.tucanoo.SomeCommandObject] was used outside of a Grails application. If running in the context of a test using the mocking API or bootstrap Grails correctly.

This happens when you are using CommandObjects behind your forms, rather than binding directly to Domain objects. Don’t be tempted to avoid Command Objects, they are worth it and help keep your application more secure and maintainable.

I don’t know why a Grails IllegalStateException exception is thrown, but it happens when you are validating (maybe not even explicitly) a command object that is not explicitly marked as Validateable.

Simply mark your class with the annotation @Validateable and you should find the problem goes away.

It’s very easy to forget NOT to mark command objects @Validateable, perhaps they should be by default as certainly for me, I like to supply a whole bunch of constraints with my command objects and ensure they validate before I let the data contained within go near my domain layer.

We are very happy to announce we have been commissioned to develop a very exciting project that’s causing a lot of buzz here at Tucanoo Towers. Without going into detail all I can say is we’ll be utilising Grails to develop a scalable back end service to complement a mobile app with social and business functionality.

I’d love to be able to give more juicy details away at this stage as what we’re working on has the potential to be HUGE… think FourSquare scale, then think bigger… but at this stage everything is under wraps and will be till close to product launch so watch this space…

Get in touch

Please use the contact form on the left to contact us. Alternatively, you can use the following methods below.

Our Address

Tucanoo Solutions Ltd

16 West Park
Wakefield, West Yorkshire, WF8 3HY