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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T09:11:05+00:00 2026-06-14T09:11:05+00:00

Grails works great with the mongodb plugin locally but I’m having issues on AppFog.

  • 0

Grails works great with the mongodb plugin locally but I’m having issues on AppFog.

The instructions for deploying Grails on AppFog are fairly clear for databases other than MongoDB. The documentation seem to allude to auto-config for MongoDB but if I have my configuration set to the following, it doesn’t work.

//DataSource.groovy

grails {
  mongo {
    host = "localhost"
    port = 27017
    databaseName = "dbname"
  }
}

Auto-config doesn’t seem to replace localhost with the proper hostname. It seems like I need to set the values from the VCAP_SERVICES.

  • 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-14T09:11:06+00:00Added an answer on June 14, 2026 at 9:11 am

    Do you have the CloudFoundry plugin installed in your Grails project? The plugin does the auto-reconfig for the MongoDB and other data sources in a Grails app.

    If for some reason you can’t, or don’t want to, use the Grails CloudFoundry plugin, another alternative to using the environment variables as you showed above is to use the cloudfoundry-runtime Java API. This API gives you access to the same info as is stored in the environment variables, but it is a little cleaner than parsing the environment variables directly.

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

Sidebar

Related Questions

I installed the Grails Spring Security Core plugin. As it works right now, a
In my Grails 2.0 the following GSP code works: <g:formatDate date=${merchantTrans.dateCreated} /> But the
I've installed Spring Security plugin to my Grails application, saw login which works fine,
I have a grails application using hibernate .Under grails 1.3.7 everything works properly, but
I have a groovy/grails application that needs to serve images It works fine on
I'm having a hard time trying to get hasMany to work in Grails 2.0.1
I'm trying to work with an app that's been built in Grails, but I'm
UrlMappings are a great feature for links, but do they also work for forms?
Environment Grails 1.2.2 Ubuntu 9.10 IntelliJ 9.0.3 Everything works fine in IntelliJ. When I
I have come to Grails without first being a Spring developer. This is great

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.