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
6
votes
3 answers

Grails 2.4 Include jquery-ui

My grails application is using jquery-ui and twitter bootstrap plugin. I use the default application.js structure. Then I add the following line to include the jquery-ui and bootstrap.js : ... //= require jquery //= require jquery-ui //= require…
Julius Prayogo
  • 133
  • 3
  • 12
6
votes
1 answer

Grails maven plugin wants Groovy 2.4.2

I upgrade to Grails 2.4.2 because that supposedly fixes a bug with the maven plugin that caused it to generate a bad pom.xml file. Now, when I try to run the 2.4.2-generated pom with mvn clean install I get the following error message: [ERROR]…
Mike Thomsen
  • 36,828
  • 10
  • 60
  • 83
6
votes
3 answers

send an email using a template - grails

I want to send an email using a template. I want to have a GSP file where i could style it, and send the email. Currently the send mail function is as follows: def sendEmail(){ mailService.sendMail { to "email","**email**" from…
Illep
  • 16,375
  • 46
  • 171
  • 302
6
votes
1 answer

Stop Grails from opening a connection to the database in a Controller method

I have a service that is communicating to another machine. Since it's a simple Controller method Grails automatically grabs a DB connection from the pool while my controller is communicating with the other server. I'd like to prevent it from doing…
chubbsondubs
  • 37,646
  • 24
  • 106
  • 138
6
votes
1 answer

Tomcat/Grails memory leaks

I'm seeing the following in my catalina.out log everytime I undeploy by grails application: INFO: Closing Spring root WebApplicationContext Jun 18, 2014 5:23:48 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web…
Jim Sosa
  • 578
  • 3
  • 21
6
votes
1 answer

ClassNotFoundException: org.hibernate.event.spi.PreLoadEventListener

When I try to run my Grails 2.4.1 app, I get the following exception, which I don't really understand. | Running Grails application objc[15346]: Class JavaLaunchHelper is implemented in both…
Sebastien
  • 3,583
  • 4
  • 43
  • 82
6
votes
1 answer

Class 'myClassName' already exists in package 'myPackageName'

I suddenly started facing a strange issue while working on my Grails application using IntelliJ. I have different domain classes and some other classes under src/groovy. When I open a class file to make some changes, I get an error that this class…
Bilal Ahmed Yaseen
  • 2,506
  • 2
  • 23
  • 48
6
votes
1 answer

Grails-ElasticSearch Plugin: Conditional Indexing of domain instances

I am using Grails-ElasticSearch Plugin(0.0.2.5). I want to add a constraint to my domain instances before it is indexed in ElasticSearch. Example:- I have a domain class A with a field 'status', i want to add an abstraction between Database and…
6
votes
3 answers

Update to 2.3.9 - Error executing script RunApp: org/codehaus/groovy/runtime/typehandling/ShortTypeHandling

I am update grails from 2.3.7 to 2.3.9 and it has error Error executing script RunApp: org/codehaus/groovy/runtime/typehandling/ShortTypeHandling. Here is run-app --stacktrace --verbose : |Loading Grails 2.3.9 |Configuring…
Tuan Hoang Anh
  • 994
  • 12
  • 31
6
votes
2 answers

An integration test fails when running with other integration tests which have transactional enabled

I am having a problem with an integration test which tests several services. I had to disable transactional to get the test working without any transactional related runtime errors. The integration test works fine when running it on its own but when…
6
votes
3 answers

Grails Domain Class : hasOne, hasMany without belongsTo

I am new to Grails. Can I use "hasOne" or "hasMany" without using "belongsTo" to another domain-class? Thanks in advance.
6
votes
3 answers

Domain class constructors in Grails?

I have some code that I want to run when a domain class object is created; in Java, I would include this code on the constructor. How can I do it in Groovy/Grails? Thanks.
user2624442
  • 95
  • 2
  • 6
6
votes
2 answers

Grails create criteria not in list

how to get list A where not use in domain B? Domain A Class A{ String name String code } Domain B Class B{ A aaa String description } example data: **domain A** id+versioin+name +code+| 1 | 0 |Bobby |bob | 2 | 0 |anto |ant | 3 |…
user2809386
6
votes
3 answers

What is the correct way to configure grails maven authentication to Artifactory?

What is the correct way to configure authentication to Artifactory using the Maven resolver? Currently I'm using: grails.project.ivy.authentication = { repositories { mavenRepo "http://SERVER:8081/artifactory/remote-repos" } …
Greg Pagendam-Turner
  • 2,356
  • 5
  • 32
  • 49
6
votes
1 answer

Grails SEO friendly URLs

The standard way of creating URLs in grails is: ${news.title} which generates the url: /news/show/102 I want more SEO friendly URLs…
Langali
  • 3,189
  • 7
  • 38
  • 45