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 7690919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T20:30:22+00:00 2026-05-31T20:30:22+00:00

I create a new grails app and do grails install-plugin rest . App builds.

  • 0

I create a new grails app and do grails install-plugin rest. App builds. Now I add exactly the example from the plugin page: http://grails.org/plugin/rest into the bootstrap and have:

import l2http.*
class BootStrap {

  def init = { servletContext ->
    withHttp(uri: "http://www.google.com") {
      def html = get(path : '/search', query : [q:'Groovy'])
      assert html.HEAD.size() == 1
      assert html.BODY.size() == 1
    }
  }
  def destroy = {
  }
}

This crashes with the following error:

| Loading Grails 2.0.0
| Configuring classpath.
| Environment set to development.....
| Packaging Grails application.....
| Compiling 1 source files.....
| Running Grails application
| Error 2012-03-26 11:41:07,823 [Thread-8] ERROR context.GrailsContextLoader  - Error executing bootstraps: groovy.lang.MissingMethodException: No signature of method: grails.util.Environment.withHttp() is applicable for argument types: (java.util.LinkedHashMap, BootStrap$_closure1_closure3) values: [[uri:http://www.google.com], BootStrap$_closure1_closure3@299cc074]
Message: groovy.lang.MissingMethodException: No signature of method: grails.util.Environment.withHttp() is applicable for argument types: (java.util.LinkedHashMap, BootStrap$_closure1_closure3) values: [[uri:http://www.google.com], BootStrap$_closure1_closure3@299cc074]
Line | Method
->>  290 | evaluateEnvironmentSpecificBlock in grails.util.Environment
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|    283 | executeForEnvironment            in     ''
|    259 | executeForCurrentEnvironment . . in     ''
|    334 | innerRun                         in java.util.concurrent.FutureTask$Sync
|    166 | run . . . . . . . . . . . . . .  in java.util.concurrent.FutureTask
|   1110 | runWorker                        in java.util.concurrent.ThreadPoolExecutor
|    603 | run . . . . . . . . . . . . . .  in java.util.concurrent.ThreadPoolExecutor$Worker
^    722 | run                              in java.lang.Thread
Caused by MissingMethodException: No signature of method: grails.util.Environment.withHttp() is applicable for argument types: (java.util.LinkedHashMap, BootStrap$_closure1_closure3) values: [[uri:http://www.google.com], BootStrap$_closure1_closure3@299cc074]
->>  345 | methodMissing                    in grails.util.Environment$EnvironmentBlockEvaluator
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|      4 | doCall                           in BootStrap$_closure1
|    290 | evaluateEnvironmentSpecificBlock in grails.util.Environment
|    283 | executeForEnvironment            in     ''
|    259 | executeForCurrentEnvironment . . in     ''
|    334 | innerRun                         in java.util.concurrent.FutureTask$Sync
|    166 | run . . . . . . . . . . . . . .  in java.util.concurrent.FutureTask
|   1110 | runWorker                        in java.util.concurrent.ThreadPoolExecutor
|    603 | run . . . . . . . . . . . . . .  in java.util.concurrent.ThreadPoolExecutor$Worker
^    722 | run                              in java.lang.Thread
  • 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-05-31T20:30:23+00:00Added an answer on May 31, 2026 at 8:30 pm

    The withHttp or any method added by the rest-plugin is injected to the Controllers and Services not to the BootStrap class. Please try it within Services or Controllers.
    Cheers.
    Bernardo

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create app with command grails new appp and it creates 2
I'm coming from a Spring MVC background on a new Grails app. I have
I have a Grails app running on 1.3.7 with the json-rest-api plugin version 1.0.8
i use grails-1.3.2 and gorm-hbase-0.2.4 plugin. Sometimes i need to change tables structure(add new
I tryed to create new components from one base Windows Form, also I found
I can create new Silverlight App with .NET RIA Services enabled. But when I
I'm trying to deploy my Grails-app (1.3.7) on Heroku. I downloaded the Heroku-plugin, added
I'm trying to follow the grails tutorial here . When I create a new
I'd like to create another resource bundle to organize my Grails app. Grails provides
In a Grails 1.1 plugin, I'm trying to load a class from the main

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.