Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8094119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T20:41:37+00:00 2026-06-05T20:41:37+00:00

I was using grails 1.3.4 for my project and everything was working fine until

  • 0

I was using grails 1.3.4 for my project and everything was working fine until I decided to migrate my project to grails 2.0.3.

The render as JSON method was working fine for me for every AJAX call made by me through the gsp page via javascript. But now it is not working.
The code I am using for the call is :

Javascript in my GSP page:

var url = "${createLink(controller:'user',action:'someAction')}";
$.get(url,function(data){
   if (data.results != "") {
     alert(data.results);
   }
});

Code in my controller:

import grails.converters.JSON

....
....

def someAction = {
    def data = [results:"Ajax call working"]
    render data as JSON
}

the above code was working perfectly for me in grails 1.3.4 but now I am getting the following error

No signature of method: grails.converters.JSON.render() is applicable 
for argument types: (com.xxxx.yyy.UserController$_closure36) 
values: [com.xxxx.yyy.UserController$_closure36@168d2e7]
Possible solutions: render(java.io.Writer), 
render(javax.servlet.http.HttpServletResponse),
every(), find(), find(groovy.lang.Closure), 
every(groovy.lang.Closure).

I am really stuck and don’t know what to do. Is there anything I am missing.

Also I am using
Groovy Version: 1.8.6 and JVM: 1.6.0_26

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T20:41:39+00:00Added an answer on June 5, 2026 at 8:41 pm

    Try this pattern instead:

    def someAction = {
        def data = [results:"Ajax call working"]
    
        render(contentType:'text/json'){
           data
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently working on a project using netbeans 6.9 and grails 1.3. I'm trying
I've built a Maven Grails project which can be build fine using command mvn
I have been working with a project which is using grails / hibernate with
I'm working on a Grails project that is internationalized (using the .properties resource bundles),
I have been working on the project where application is using grails 1.2.2.... Now
I'm considering using Grails for my current project. I have a couple of requirements
I'm using IntelliJ 8.1.2 on Windows to develop a Grails 1.1 project that depends
I have a Grails 2.0.0 project that was created using grails create-app . In
For learning purposes I created a toy project using grails. In this project I
I am working on a grails project and I have put a .jar file

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.