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
1
vote
0 answers
Grails 2.5.3 domain class with Collection of embedded objects
How can a Grails 2.5.3 domain class have a Collection property of embedded objects?
class Embedded {
String a
String b
}
@grails.persistence.Entity
class Domain {
List embeddedList
}

XDR
- 4,070
- 3
- 30
- 54
1
vote
2 answers
Grails : getting exception while using Jackson API
Getting exception below while using Jackson api.See attached image.
class BlogSwiftJSONUtil {
static String parseToJSON(Object object){
ObjectMapper objectMapper = new ObjectMapper()
return…

Vinay Prajapati
- 7,199
- 9
- 45
- 86
1
vote
1 answer
Quartz plugin for Grails
I'm testing quartz plugin with Grails 2.5.1. Below is the Job code:
class TestingJob {
static triggers = {
simple name: 'mySimpleTrigger', startDelay: 60000, repeatInterval: 1000l, repeatCount: 10
}
def execute() {
println…

Sherif
- 421
- 3
- 15
1
vote
2 answers
spring-security-core Grails plugin
Using spring-security-core:2.0-RC5 plugin , and added
@Secured('ROLE_USER')
to the Human controller , when i go to this URL
http://localhost:8080/MyApp/human/index
it suppose to forward me to the login page as this action is protected, but…

grails
- 67
- 1
- 4
1
vote
1 answer
Grails 2.5.0 - access classes in maven dependency
I need to access some features of Jedis that aren't available in the Redis Plugin. I added compile "redis.clients:jedis:2.8.0" to my dependencies in BuildConfig.groovy, but my IDE is showing that the Jedis classes are still unavailable. How do I…

Anonymous1
- 3,877
- 3
- 28
- 42
1
vote
1 answer
Call Grails 2 r:require module from a taglib
Having a taglib that uses an external js library to show user notification.
Since calling this taglib in many views, I'm wondering how to require the library js module directly from the tag, without doing it from each gsp view.
Currently I'm using…

lifeisfoo
- 15,478
- 6
- 74
- 115
1
vote
1 answer
GORM - Temporarily disable beforeInsert event
There is a way to temporarily disable the beforeInsert event of a specific Domain Class? I need to execute the following steps:
disable the execution of beforeInsert;
Execute a kind of saveAs routine in an object;
re-enable the execution of…

cantoni
- 2,912
- 2
- 17
- 24
1
vote
1 answer
NullPointerException for grails service properties in unit tests
With grails 2.5.1, I only created a service with a simple property initialized through a constructor (@PostConstruct also)
Any unit test that read this property through a service method get a NullPointerException
Here's how to reproduce:
grails>…

pinei
- 2,233
- 1
- 24
- 25
1
vote
0 answers
error appears when i add anything in my controller
i'm using Grails 2.5.1 on Windows 7 64 bit , After generating the controllers and the views using Grails command
generate-all "*"
When i add any new lines in my controllers i get the below error :
Compilation error: startup failed:
…

Sherif
- 421
- 3
- 15
1
vote
1 answer
Private methods not getting mocked in Grails 2.5.1
We recently upgraded from Grails 2.4.4 to 2.5.1 and also to JDK 8. Ever since that, the below test case has been failing.
In our service class, we have a private method defined to call an external service.
def retrieveResults() {
def…

raVan
- 296
- 2
- 15
1
vote
1 answer
Using static method in Grails / GORM findAll closure
I'm upgrading a Grails app from 2.2.4 to 2.5.0, and from Hibernate 3 to Hibernate 4.
There is an existing GORM findAll query that passes a java.util.Date property (named start) of the domain object to a call to a static method that returns a copy of…

XDR
- 4,070
- 3
- 30
- 54
1
vote
1 answer
Data not persisted after return from service
Let me preface this by saying my code was working yesterday. I rolled back my commits to the time when it was working.
The only thing that is different is that a migration was ran today to remove some columns from some tables. I can't see how this…

James Kleeh
- 12,094
- 5
- 34
- 61
1
vote
0 answers
Grails 2.5.0 UrlMappings with two consecutive slashes
I have inherited a Grails 2.2.4 UrlMappings (partially reproduced below) that I am trying to upgrade to 2.5.0.
Named mappings api0 & api2 work, but the two consecutive slashes in api1 (between $controller & $id) do not seem to be matched properly in…

XDR
- 4,070
- 3
- 30
- 54
1
vote
1 answer
How to add plugin project as a dependency to my main projects
My requirement is as below:
I will be having three projects.
Main project (Grails project)
Main project adaptor (Grails project)
Domains plugin project (Grails project)
Domains plugin project will be having all of the domain classes and its…

deadMan
- 35
- 1
- 7
0
votes
1 answer
error import org.codehaus.groovy.grails.commons.ApplicationHolder as AH
I update the grails from 2.3.11 to 2.5.6 with JDK 1.8.0_281.
It gives the following error:
import org.codehaus.groovy.grails.commons.ApplicationHolder as…

Shallow
- 55
- 5