Questions tagged [grails-2.5]

Use this tag for version 2.5 only, use grails tag for general question about grails Web application framework

85 questions
0
votes
1 answer

Populate database in grails cmd script

I have a folder with many json files. I need to process these files and store them in a mysql database. In order to do that, I am trying to create a grails cmd script (since the project is using Grails 2.5.6). So, first thing I did was: grails…
0
votes
0 answers

Does Grails support Hibernate Optimistic Lock Type ALL?

Grails domain class annotated with: @OptimisticLocking(type = OptimisticLockType.ALL) @DynamicUpdate class T... When calling save on the domain object, the generated SQL update statement only includes id columns in the where clause, not all…
0
votes
0 answers

Integration test with clause 'in' in sql cause error when run individuallly

I have an integration (h2, spock, grails-2.5.5) tests that running inside a sql (gorm) consult. This test works fine when running all tests together "grails test-app", but when i'm running individually the test broken and show me the following…
Mister B
  • 123
  • 2
  • 15
0
votes
0 answers

Grails 2.5.6 strange filters behavior

I have Grails 2.5.6 application using Spring Security Grails plugin and there is a filter in the application to check something if exists continue normally if not must go to the controller Country, action countryAndCity , the URL before accessing…
SShehab
  • 1,039
  • 3
  • 17
  • 31
0
votes
1 answer

Can't override onAuthenticationSuccess method of AuthenticationSuccessHandler

Following some other posts, I tried to override the authentication success method of the spring-security handler, but it's never being called. My code looks like: src/groovy/mypackage/MyAuthenticationSuccessHandler.groovy: package mypackage import…
jambox
  • 584
  • 4
  • 15
0
votes
1 answer

Domain to Domain inheritance

I cant add property to constraints nor mapping to a domain that has been extended my newly created domain. class Person1 { String name static constraints = { name nullable : true } static mapping = { table 'PERSON' …
0
votes
1 answer

Using Grails to store image but could not store outside CATALINA_HOME in production

I'm using Grails 2.5.6 to store uploaded images to folder on a server. The following are my code to store the image mpr.multiFileMap.file.each{fileData-> CommonsMultipartFile file = fileData File convFile = new…
0
votes
1 answer

Groovy/Grails - Modify dynamic array based on content

I have an array, which I get from a web service so it's always different but looks like this: def originalArray = [ [startDate:7 October 2017, endDate:14 October 2017, type:A], [startDate:7 October 2017, endDate:9 October 2017,…
SeriousLee
  • 1,301
  • 4
  • 20
  • 42
0
votes
2 answers

Grails - execute check on every request

I’m looking for a neat way to execute a check to see if there are any messages in an inbox (realtime) in a Grails 2.x application. I’ve moved away from polling via ajax to websockets, which is great at the point where someone actually sends you the…
dre
  • 1,027
  • 1
  • 11
  • 31
0
votes
1 answer

Can't install Perf4J Integration Plugin on Grails 2.5.1

I'm trying to install Perf4J Integration Plugin for Grails. I've added compile ":perf4j:0.1.1" on my BuildConfig.groovy but when I try to refresh my dependencies I get: Fatal error during compilation…
ylima
  • 410
  • 5
  • 17
0
votes
1 answer

handshake_failure from grails app

When I use curl query to logz.io works as charm: curl -XPOST 'https://api.logz.io/v1/query' --header "X-USER-TOKEN : VALID_TOKEN" --header "Content-Type: application/json" -d '{"queryString" : "query","timestamp" : {"gte":1482157546000}}' However…
Michal_Szulc
  • 4,097
  • 6
  • 32
  • 59
0
votes
1 answer

Import class from an inplacePlugin to another inplacePlugin Grails

I need use a domain class define in one inplacePlugin to a controller class in another inplacePlugin inside my app, but when I try to define the class IDE "cannot resolve the symbol". AutorDef domain class I define public in my app. What i need to…
Ale
  • 226
  • 1
  • 9
  • 17
0
votes
3 answers

grails 2.5.1 removeFrom one-to-many giving strange behavior (not removing)

I'm pretty much certain I'm doing something wrong since this obviously works. Simplified classes: class Person { String name static hasMany = [cats:Cat] } class Cat { String name Person person static belongsTo = Person static…
Trebla
  • 1,164
  • 1
  • 13
  • 28
0
votes
1 answer

java8 dates in grails 2.5.5 unit testing

I am using grails 2.5.5 with java 8. To get this working with the new dates, I defined a mapping between the java 8 dates (ZonedDateTime) and the database/hibernate dates. This works fine, no problem at all here's where the problem starts: Unit…
miThom
  • 373
  • 2
  • 11
0
votes
1 answer

Grails 2.5.1 (hibernate 3) criteria multiple joins to same table

I've found similar questions, but no answers. class SomeDomain { static hasMany= [productData:ProductData] } ProductData is simple type/value pair I'm trying to find all SomeDomains that have multiple products of certain type (in a loop). …
Trebla
  • 1,164
  • 1
  • 13
  • 28