$.ajax({
        type: "GET",
        url: "getResult",
        data: "e1=" + e1,
        success: function(data) {
...
}

controller method

def getResult() {

        if (validationFailedMessage()) {
                render(template: '../exception')
    }
}

When control goes inside if loop, instead of rendering the template, it again calls getResult method. This continues for some time & then I get stackoverflow. Is rendering like this valid in ajax call or should the call go to the ajax success/error function ? I couldn't find why this is happening so I posted this exception snippet as well.

Caused by: org.codehaus.groovy.grails.web.servlet.mvc.exceptions.ControllerExecutionException: Runtime error executing action
    ... 97 more
Caused by: java.lang.reflect.InvocationTargetException
    ... 97 more
Caused by: org.codehaus.groovy.grails.web.taglib.exceptions.GrailsTagException: Error executing tag <sitemesh:wrapTitleTag>: java.lang.StackOverflowError
    at grails_app_views_AssignmentModular__exception_gsp$_run_closure1.doCall(_exception.gsp:3)
    at grails_app_views_AssignmentModular__exception_gsp.run(_exception.gsp:8)
    at BaseController$$EOnevZsu.exceptioncondition(BaseController.groovy:20)
    at grails.plugin.cache.web.filter.PageFragmentCachingFilter.doFilter(PageFragmentCachingFilter.java:200)
    at grails.plugin.cache.web.filter.AbstractFilter.doFilter(AbstractFilter.java:63)
    at student.AssignmentController$$EOneuzHF.getResult(AssignmentController.groovy:972)
    at org.apache.commons.beanutils.BeanMap.get(BeanMap.java:390)
    at org.apache.commons.beanutils.BeanMap$12.next(BeanMap.java:565)
    at org.apache.commons.collections.iterators.UnmodifiableIterator.next(UnmodifiableIterator.java:72)
    at owsoo.BaseController$$EOnevZsu.exceptioncondition(BaseController.groovy:20)
    at grails.plugin.cache.web.filter.PageFragmentCachingFilter.doFilter(PageFragmentCachingFilter.java:200)
    at grails.plugin.cache.web.filter.AbstractFilter.doFilter(AbstractFilter.java:63)
    at AssignmentController$$EOneuzHF.getResult(AssignmentController.groovy:972)
    at org.apache.commons.beanutils.BeanMap.get(BeanMap.java:390)
    at org.apache.commons.beanutils.BeanMap$12.next(BeanMap.java:565)
    at org.apache.commons.collections.iterators.UnmodifiableIterator.next(UnmodifiableIterator.java:72)
    at owsoo.BaseAssignmentController$$EOnevZsu.exceptioncondition(BaseController.groovy:20)
    at grails.plugin.cache.web.filter.PageFragmentCachingFilter.doFilter(PageFragmentCachingFilter.java:200)

Related posts

Recent Viewed