Use this tag for version 2.5 only, use grails tag for general question about grails Web application framework
Questions tagged [grails-2.5]
85 questions
16
votes
6 answers
Differences between the Grails @Transactional vs. the Spring @Transactional annotations
Well there was a point in the Grails Declarative Transactions. It said:
The grails.transaction.Transactional annotation was first introduced in Grails 2.3. Prior to 2.3, Spring's @Transactional annotation was used.
But I can't seem to find out…

haedes
- 612
- 2
- 10
- 23
5
votes
3 answers
How to mock springSecurityService in an unit test
I am unit testing a Grails controller method that internally creates an user instance. User domain class uses the springSecurityService of the Spring Security plugin to encode the password before inserting it into the database.
Is there a way to…

saw303
- 8,051
- 7
- 50
- 90
4
votes
1 answer
Grails 2.5: Complex “findOrCreate” and synchronisation between threads (HTTP sessions)
In a Grails application we have an interface that accepts a path-like 3-level structure to be created from parameters in a single request like
level1/level2/document
Object level2 references level1 and document references level2.
Multiple objects…

matejk
- 798
- 1
- 14
- 27
3
votes
0 answers
Undefined config values in grails application
We are successfully using externalized configuration in grails to retrieve all needed values from a configuration file. Lately it "randomly" happens to us that values from the config are not defined in the application after restart. Although the…

dennisnurbesser
- 91
- 6
3
votes
1 answer
Grails 2.5.1 application sporadically loses context root
We have a handful of applications deploying to the same tomcat server (currently working on upgrading to grails 3, so this may be OBE in the next few months, but it's been plaguing us for quite some time now) and two of the applications will…

Trebla
- 1,164
- 1
- 13
- 28
3
votes
0 answers
grails @BindUsing command Object
I am using grails 2.5.5 and the problem is when I'm using a command Object, I want to change the format of the data I get with the @BindUsing annotation.
@Validatable
class FooCommand extends BarCommand{
@BindUsing({obj, source -> return…

miThom
- 373
- 2
- 11
3
votes
0 answers
Log4j2 Grails RollingFileAppender
I'm trying to implement log4j2 with grails 2.5.3 and I'm having problems with the configuration properties.
I my older projects with log4j 1.x I used to have in the config.groovy file something like this:
import…

Rodrigo
- 173
- 1
- 1
- 11
3
votes
2 answers
How to solve BeanCreationException ploblem while upgrading grails version from 2.4.5 to 2.5.0?
I'm upgrading grails version to 2.5.0 from 2.4.5. The problem that occurred while running my project is -
Error initializing the application: Error creating bean with name 'com.athena.mis.application.model.ListSupplierActionServiceModelValidator':…

rumana
- 41
- 2
3
votes
3 answers
ERROR springsecurity.ReflectionUtils - Your security configuration settings use the old prefix 'grails.plugins.springsecurity'
I have migrated to grails 2.5.0 from 2.3.7
and i have the dependency on
compile ":spring-security-core:2.0-RC5"
i replaced all the occurrences of grails.plugins.springsecurity with 'grails.plugin.springsecurity but i am still getting an error as…

n92
- 7,424
- 27
- 93
- 129
2
votes
0 answers
Could I override the grails.env during runtime
Grails seems to build the artefacts per env.
with the command "grails -Dgrails.env=test war
Is it possible for me to override the running environment programmatically?
The issue here is that we produce the war file using production env config. But…

ryang
- 151
- 5
2
votes
1 answer
Criteria with Left-Join does not load all has-many associations
We have a grails 2.5.5 application with hibernate4:4.3.8.1 plugin.
When we query a domain, that has a has-many relation, with criteria-api and left-join, gorm does not load all has-many associations.
Example:
class Role {
String name
}
class…

gregorr
- 373
- 4
- 13
2
votes
1 answer
Grails: how to set a parameter for the whole group in UrlMappings
Our Grails 2.5 web application has REST API.
We need to start a new version of the API so a group was created in UrlMappings.groovy like this:
group ("/v2") {
"/documents"(resources: 'document') {
"/meta"(resource: 'documentInfo', includes:…

matejk
- 798
- 1
- 14
- 27
2
votes
1 answer
getting grails 2.5.4 asset pipeline excludes to work
I am unable to get either the sass asset pipeline or the less asset pipeline plugin to work, if I am using sass or less imports.
If I only have one sass or less file, grail war works fine.
In my scenario however, file1.scss imports file2.scss, and…

jbelis
- 575
- 2
- 6
- 16
2
votes
0 answers
Grails: Domain class property name conflicts with embedded class property name
class Person {
String name
Country bornInCountry
static embedded = ['bornInCountry']
}
class Country {
String name
}
How can I filter Person by name?
When I use name in query (eg. Person.countByNameIsNotNull()), Person is filtered…

dev7532
- 101
- 1
- 1
- 4
2
votes
0 answers
Timeout for async Actions
How do I configure the default timeout for a all async actions?
Can it be done on a controller base?
Right now, my code is something like:
def severalSecondsLongAction() {
def ctx = startAsync()
ctx.timeout = 100000
ctx.start {
…

Fernando
- 2,131
- 3
- 27
- 46