29,809 questions
0 votes
0 answers
31 views
Call GORM's .list() in trait with generic type
In my Grails 6 project, I'd like to add an additional feature to select domain classes, so I defined a custom trait. trait MyDomainClassTrait<D> implements GormEntity<D> {} // domain ...
2 votes
1 answer
41 views
External config.yml file not working in Grails 7
I have a Grails 6 application that uses an external config.yml file to configure things such as the credentials for the datasources. I'm working on upgrading to Grails 7 and I'm running into the same ...
Advice
0 votes
0 replies
19 views
In grails, how to domain collection sort on multiple attributes?
In grails domain objects you can have a default sort order: class Airport { … static hasMany = [flights: Flight] static mapping = { flights sort: 'number', order: 'desc' } }...
0 votes
1 answer
66 views
Grails 7 Interceptor properties not working
I'm upgrading a Grails 6 project to Grails 7 (v7.0.0). The project has a few interceptors. Interceptor properties such as matchAll, request/response and HIGHEST_PRECEDENCE cannot be resolved for ...
0 votes
1 answer
53 views
Why did json views syntax change between Grails 4 and Grails 5?
While upgrading a Grails 4 application to Grails 5, I encountered a failure in one of the json views (.gson file) when specifying a field having an empty map. In Grails 4, this worked fine, but in ...
2 votes
0 answers
54 views
Intercept session timeout
I have an application written in Grails 6.x. I use spring-security-core and spring-security-ldap plugins to authenticate against an Active Directory server. I have set a timeout of 5 minutes, and once ...
0 votes
1 answer
43 views
Grails 2.5.6 - "Method on class was used outside of a Grails application" error
I’m using Grails 2.5.6 and I created a simple Person domain and a PersonController. When I try to call POST /person/add, I get the following error: Method on class [com.demo.Person] was used outside ...
0 votes
0 answers
45 views
Groovy/Grails Ambiguous mapping error with springdoc swagger
This is my controller package example.infra.adapters.input.api.v1.endpoints import example.aplication.services.authentication.LoginAuthenticator import example.aplication.dtos.authentication....
0 votes
1 answer
105 views
Grails app + Tomcat + Spring Boot - Memory usage is increasing while the application is idle
I started to test Docker to run my application and I had noticed my memory consume when using "docker stats". I see the memory used from the container increasing like, every f5 on my page or ...
2 votes
1 answer
119 views
AWS Elastic Beanstalk and Tomcat 9 throws FileCountLimitExceededException on Spring Boot App
I have a Grails 3.1 application that uses Spring Boot version 1.3.7.RELEASE. It's deployed on AWS Elastic Beanstalk using the platform "Tomcat 9 with Corretto 8 running on 64bit Amazon Linux 2/4....
0 votes
0 answers
56 views
How to avoid HttpClientResponseException in grails micronaut declarative client Recovery interceptor
I'm using Micronaut declarative client with Grails. When I make request with status forbidden - it raises HttpClientResponseException. I want to just catch it, but RecoveryInterceptor write to Error ...
0 votes
1 answer
60 views
findBy when there could be more than one
I'm using a findBy query in a grails/gorm project, where there is usually only one result (and I only ever want one result). However, there could occasionally be two (or even three theoretically, ...
2 votes
1 answer
79 views
Apache Grails 7.0.0-M4 dependency on Groovy 4.0.27 and why Groovy 4.0.26 is shown in my dependencies tree
I'm moving my team's project from Grails 7.0.0-M1 to 7.0.0-M4 and it kinda works, but I'm new to Grails/Groovy/Gradle/... and curious so I run ./gradlew dependencies | less and notices a block like ...
0 votes
1 answer
66 views
Handle request with .gsp in URL [closed]
In Grails 6.2.3, I have to handle request with .gsp extension like http://localhost:8080/report/view.gsp?a=b I can't map this URL to controller, action. It will always return error 404. The default ...
2 votes
0 answers
66 views
Why Grails Spring Security validation and logout filter always applies?
I'm using Grails 6.2.0 with the Spring Security Core 6.1.2 and Spring Security Rest 5.0.0 plugins. I configured the filters as recommended in the documentation (or at least how I understood it): ...