Issues with @Validateable in a SpringMCV (Spring Boot) app

56 views
Skip to first unread message

Domingo Suárez Torres

unread,
Oct 30, 2014, 2:52:52 PM10/30/14
to grails-de...@googlegroups.com
Hello,

Is anyone using @Validateable on command objects in a Spring MVC (Spring Boot) web application.

I'm trying, but I'm getting weird exceptions related with a missing ApplicationContext:

servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.IllegalStateException: Could not find ApplicationContext, configure Grails correctly first] with root cause

java.lang.IllegalStateException: Could not find ApplicationContext, configure Grails correctly first
at grails.util.Holders.getApplicationContext(Holders.java:97)

Any idea?

Cheers

Burt Beckwith

unread,
Oct 30, 2014, 2:56:03 PM10/30/14
to grails-de...@googlegroups.com
Is your code calling Holders, or is that called internally by the validation code?

Burt

Domingo Suárez Torres

unread,
Oct 30, 2014, 3:07:57 PM10/30/14
to grails-de...@googlegroups.com
The validation is defined by the constraint closure, as usual in Grails Command objects. The calling to Holders is internally, look the stacktrace here: http://pastebin.com/Dytw4C8Y



--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grails-dev-disc...@googlegroups.com.
To post to this group, send email to grails-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/a47b9b1d-2932-4b3d-9586-ad846865bf99%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages