Questions tagged [grails]

Grails is an Open Source, full stack, web application framework that uses the Groovy programming language (which is in turn based on the Java virtual machine (JVM) and Java). The framework is oriented around high-productivity application development by following the "coding by convention", and uses common Java technologies such as Hibernate and Spring.

Grails is a coding-by-convention framework that leverages well-established frameworks (, , ) to allow programmers to quickly develop web applications.

It touts features such as a zero-XML configuration and a typical web-application architecture.

Grails applications are mainly written in , a dynamic language with strong interoperability with Java and features similar to other languages , , and

Along with its core, Grails has a plugin architecture and library that can provide developers with common web application features like and dynamic UI tools.

Version History:

Latest stable version

Related tags:

  • - Grails object relational mapping implementation, backed by
  • - Groovy Server Pages, the Grails template mechanism
  • - The programming language Grails uses

Online resources:

29868 questions
996
votes
11 answers

Posting a File and Associated Data to a RESTful WebService preferably as JSON

In an application I am developing RESTful API and we want the client to send data as JSON. Part of this application requires the client to upload a file (usually an image) as well as information about the image. I'm having a hard time tracking down…
Gregg
  • 34,973
  • 19
  • 109
  • 214
518
votes
16 answers

What in the world are Spring beans?

I am yet to find a high-level definition of Spring beans that I can understand. I see them referenced often in Grails documentation and books, but I think that understanding what they are would be beneficial. So what are Spring beans? How can they…
grantmcconnaughey
  • 10,130
  • 10
  • 37
  • 66
314
votes
2 answers

How to increase the maximum number of opened editors in IntelliJ?

I am building a grails-app with IntelliJ 9.0 and I am a huge fan of the CTR+TAB shortcut that switches between active editors. However, by default, IntelliJ keeps ONLY 10 active editors opened at the same time. It is clearly not enough for me. Do…
fabien7474
  • 16,300
  • 22
  • 96
  • 124
138
votes
3 answers

Checking if a collection is null or empty in Groovy

I need to perform a null or empty check on a collection; I think that !members?.empty is incorrect. Is there a groovier way to write the following? if (members && !members.empty) { // Some Work }
Jay Bose
  • 1,511
  • 2
  • 11
  • 14
121
votes
13 answers

Why do I get a "Null value was assigned to a property of primitive type setter of" error message when using HibernateCriteriaBuilder in Grails

I get the following error when using a primitive attribute in my grails domain object: Null value was assigned to a property of primitive type setter of MyDomain.myAttribute org.hibernate.PropertyAccessException: Null value was assigned to a…
Peter
  • 5,793
  • 4
  • 27
  • 31
103
votes
1 answer

Clojure 1.2.1/1.3/1.4 'proxy generated in Grails 2.0.0 runtime fails. 1.2.0 is fine

I'm working on extending the Grails Clojure plugin in Grails 2.0.0 (and 2.1.0-SNAPSHOT) and I wanted to update it to Clojure 1.3.0 and add clojure.tools.logging. Clojure throws an exception during compilation of a proxy of a ByteArrayOutputStream…
John Courtland
  • 1,055
  • 1
  • 7
  • 10
103
votes
4 answers

What are "Groovy" and "Grails" and what kinds of applications are built using them?

Nowadays I hear a lot about "Groovy on Grails" and I want to know more about it: What is Groovy? What is Grails? What kind of applications are built using Groovy on Grails?
Rachel
  • 100,387
  • 116
  • 269
  • 365
98
votes
13 answers

How to change grails localhost port?

I'm using grails 2.0.4. And I want to use port:8090 instead of 8080 for localhost. So need help to change the port to 8090 permanently.
Mamun Sardar
  • 2,679
  • 4
  • 36
  • 44
97
votes
8 answers

How to pass parameters to a modal?

I want to pass the userName from a list of userNames a logged in user clicks on to twitter bootstrap modal. I am using grails with angularjs, where data is rendered via angularjs. Configuration My grails view page encouragement.gsp is
prayagupa
  • 30,204
  • 14
  • 155
  • 192
96
votes
15 answers

What is the correct target for the JAVA_HOME environment variable for a Linux OpenJDK Debian-based distribution?

In Windows, JAVA_HOME must point to the JDK installation folder (so that JAVA_HOME/bin contains all executables and JAVA_HOME/libs contains all default jar libraries). If I download Sun's JDK bundle and installs it in Linux, it is the same…
Luis Soeiro
  • 4,262
  • 6
  • 35
  • 45
91
votes
11 answers

How to log SQL statements in Grails

I want to log in the console or in a file, all the queries that Grails does, to check performance. I had configured this without success. Any idea would help.
user2427
  • 7,842
  • 19
  • 61
  • 71
88
votes
15 answers

Is Grails worth it?

This is half rant, half question. Is it worth using Grails? I'm trying to develop a relatively simple database-driven web application. My expertise is in Java, so naturally Grails seemed like a good choice. At first I thought of using Spring, JPA…
Steve Kuo
  • 61,876
  • 75
  • 195
  • 257
86
votes
10 answers

Copy entire directory contents to another directory?

Method to copy entire directory contents to another directory in java or groovy?
Sanal MS
  • 2,424
  • 4
  • 24
  • 31
86
votes
5 answers

Connect to H2 database using IntelliJ database client

My Grails app uses a h2 database in dev mode (the default behaviour for Grails apps). The DB connection settings in DataSource.groovy are dataSource { pooled = true jmxExport = true driverClassName = "org.h2.Driver" username = "sa" …
Dónal
  • 185,044
  • 174
  • 569
  • 824
83
votes
15 answers

Found shared references to a collection org.hibernate.HibernateException

I got this error message: error: Found shared references to a collection: Person.relatedPersons When I tried to execute…
nightingale2k1
  • 10,095
  • 15
  • 70
  • 96
1
2 3
99 100