https://grails.org/ logo
Join Slack
Powered by
# questions
  • p

    pablo.pazos

    10/26/2025, 1:24 AM
    I've been fixing small things on a project and sudendly I started to get this exception and I don't know what's the reason, the issue is there are no lines in the trace that actually lead to something in my code.
    u
    u
    +2
    • 5
    • 4
  • p

    pablo.pazos

    10/26/2025, 1:24 AM
    here is the exception
    Untitled
    u
    u
    u
    • 4
    • 6
  • a

    Arjang

    10/26/2025, 2:11 PM
    How should i report broken links in Docs? Should I open a ticket? For example in grails-spring-security-core link to CAS is broken.
    u
    u
    +2
    • 5
    • 5
  • m

    Mike Saubier

    10/27/2025, 8:14 PM
    I'm upgrading a Grails 6 project to Grails 7. The project has a few interceptors. Interceptor properties such as matchAll(), request/response and HIGHEST_PRECEDENCE cannot be resolved for some reason and compiling the project fails. I found a static import to fix HIGHEST_PRECEDENCE, but I haven't yet found a solution for other properties such as matchAll() and request/response. I'm using the latest stable version of IntelliJ Ultimate (2025.2.4) and the latest version of the Grails plugin available (252.23892.360). Any advice on upgrading the interceptors (and Grails in general) would be appreciated. I posted this question on Stackoverflow, but let me know if there is a more appropriate place to ask questions now that the project has moved to Apache. https://stackoverflow.com/questions/79802203/grails-7-interceptor-properties-not-working
    u
    u
    +2
    • 5
    • 5
  • r

    rss

    10/27/2025, 8:24 PM
    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 some reason. I found a static import to fix HIGHEST_PRECEDENCE, but I haven't yet found a solution for other properties such as matchAll and request/response. I'm using the latest stable version of IntelliJ Ultimate (2025.2.4) and the latest version of the Grails plugin available for that version...
  • u

    user

    10/29/2025, 12:45 PM
    Hi everyone! I’m currently working with Grails 5.3.5 and trying to use Spock together with Testcontainers, but I’m facing some difficulties. Has anyone had experience with this combination and could share some tips?
    u
    u
    +2
    • 5
    • 4
  • g

    gene

    10/29/2025, 2:43 PM
    Can Kapa a least be configured not to output this useless message every time? kapa.ai [<time>] Hi <user> I’m kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base.
    🙌 1
    u
    u
    u
    • 4
    • 4
  • j

    James Fredley

    10/29/2025, 10:41 PM
    set the channel topic: Grails questions. Please ask them on https://lists.apache.org/list.html?users@grails.apache.org and paste the link here. This channel is archived on https://www.linen.dev/s/grails/c/questions
  • j

    James Fredley

    10/29/2025, 10:41 PM
    set the channel description: Channel to ask Grails questions. Archive of the channel is here: https://www.linen.dev/s/grails/c/questions
  • u

    user

    10/29/2025, 10:44 PM
    @User has left the channel
  • u

    user

    10/29/2025, 10:45 PM
    @User has left the channel
  • j

    James Fredley

    10/29/2025, 10:45 PM
    #C07M0GTDE is back to humans only. The AI bots now live in #C09PXP4TULR
    🫶 4
    👍 7
    🫶🏼 1
  • s

    sbglasius

    10/31/2025, 7:39 AM
    For those looking for
    grails-datastore-rest-client
    that was removed from Grails, find it here https://central.sonatype.com/artifact/io.github.gpc/grails-datastore-rest-client-legacy - the only thing changed between
    org.grails:grails-datastore-rest-client:6.1.9.RELEASE
    and this is a few fixes and the move from
    javax.
    to
    jakarta.
    ❤️ 3
  • g

    giangio

    11/04/2025, 1:15 PM
    Posted on the wrong channel
    p
    • 2
    • 2
  • m

    matt.aguirre

    11/07/2025, 6:57 PM
    I am porting my app from 6.2.3 by creating a new project and copying over files so that I can pinpoint dependency issues. I've gotten pretty far (much better than the I've done before), but now I am copying over my controller files and gradlew has started throwing OOM issues. Is this common for anyone else? I can fit about 15 controllers and then it's just OOM. My system has 64 gigs and I've upped the -Xmx to 24g, but nothing is working. I've removed parallel build and set it to --no-daemon, but from what I can see when watching it it never uses more than about 1.6% of my system memory. Any ideas?
    • 1
    • 5
  • u

    user

    11/09/2025, 2:12 AM
    Does 7.0.1 require hibernate6?
    s
    u
    +5
    • 8
    • 8
  • u

    user

    11/09/2025, 7:53 PM
    Grails 7.0.1 app running as war file stopped working Steps to create: 1. Generate a Grails app from Grails forge. With sitemesh3 disabled. 2. Download the zip file and run it within the project folder and it runs fine. 3. Assemble the war with
    gradle clean assembe
    and run it outside the project folder. 4. The app will error out with the following exception:
    Copy code
    jakarta.servlet.ServletException: Could not resolve view with name '/index' in servlet with name 'dispatcherServletRegistration'
            at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1413)
            at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1168)
            at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1106)
            at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:979)
            at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014)
            at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:903)
            at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:564)
            at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885)
            at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:138)
            at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:162)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:138)
            at org.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:80)
            at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:162)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:138)
            at org.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:70)
            at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:162)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:138)
            at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
            at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:162)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:138)
            at org.springframework.web.filter.ServerHttpObservationFilter.doFilterInternal(ServerHttpObservationFilter.java:110)
            at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:162)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:138)
            at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)
            at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:162)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:138)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:165)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:88)
            at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:113)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:83)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:72)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
            at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)
            at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
            at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:903)
            at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1774)
            at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
            at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:973)
            at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:491)
            at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)
            at java.base/java.lang.Thread.run(Thread.java:1447)
    a
    m
    +2
    • 5
    • 6
  • m

    matt.aguirre

    11/10/2025, 5:16 PM
    I'm using the grails-spring-security-rest plugin, which has worked fine for me in 6.2.3. But now it's giving me exceptions about the jwt secret being null. But I have it set in an externally loaded (not application.yml) file. And even if I set it there, it is always null. I've tried stepping through the code and I can see my loaded config file with the expected values (and all other custom values) when it is loading the default SecurityConfig. Is is something with the 'addFirst' when adding it to the propertiesSources? I can't get my app to load w/ a modified version of the plugin at this time. I'm using the 7.0.0 version for the security.
    • 1
    • 1
  • g

    giangio

    11/10/2025, 9:41 PM
    I’ve opened a feature request — happy to provide more details if needed! https://github.com/wondrify/asset-pipeline/issues/408
  • m

    matt.aguirre

    11/10/2025, 10:06 PM
    One last question? when serving static resources using the src/webapp directory, is it possible to change the target directory to NOT be 'static'. I had done that before (possibly why my above issue w/ the OOM?) Or am I stuck with 'static' in the URI?
    m
    • 2
    • 1
  • s

    SavyX

    11/12/2025, 1:15 PM
    Hi, We recently migrated our application to Grails 6.2.3 and switched from Tomcat to Spring Boot (using bootWar instead of war when building the release). Since the migration, we’ve encountered issues with the Hibernate session cache not expiring, which eventually leads to the application running out of memory. Under Tomcat, the session was automatically cleaned up after about 30 minutes, which prevented the issue, but it now seems that we may also be using Hibernate incorrectly in some parts of the application. Specifically, we often pass domain class instances (retrieved via MyDomainClass.findBy... or through service methods) directly to GSP views. Within the GSP, we then access nested fields that belong to other domain classes, which triggers additional lazy-loading and keeps the Hibernate session open. This behavior appears to contribute to the memory leak. Additionally, some of our command objects (Validatable) contain GORM domain objects as fields, which likely adds to the problem. We’re looking for the correct approach to handle retrieved data. Ideally without a full refactor to normalize everything into DTOs, since in many cases the specific nested data required is only known dynamically in the GSP. Perhaps will grails 7 handle it better? Thank you in advance for any hints!
    j
    s
    • 3
    • 9
  • u

    user

    11/12/2025, 5:55 PM
    I remember I read somewhere that new versions of Grails will be released following spring framework release cadence but I now cannot find any reference of that. Can anyone help me? I would like to introduce some automatic minor version upgrade in our CI but I would like to document why it is a good idea
    j
    u
    +7
    • 10
    • 19
  • u

    user

    11/12/2025, 8:16 PM
    I am upgrading my apps to 7 and have also upgraded some caches to Ehcache 3. We currently deploy our apps as WAR files to tomcat (10, java 21). Everything is working as expected so far, but when tomcat shuts down, I am seeing an exception from Ehcache
    Copy code
    java.lang.IllegalStateException: Close not supported from UNINITIALIZED
    I am creating the cache beans like this
    Copy code
    @Configuration
    class EhcacheConfig {
        
        @Autowired
        CacheManager cacheManager
    
        @Bean
        CacheManager cacheManager() {
            log.info('cacheManager() called')
            return CacheManagerBuilder.newCacheManagerBuilder().withCache('cache1', ...).withCache('cache2', ...).build(true)
        }
    
        @Bean
        Cache<String, Integer> cache1() {
            return cacheManager.getCache('cache1', String, Integer)
        }
    
        @Bean
        Cache<String, Integer> cache2() {
            return cacheManager.getCache('cache2', String, Integer)
        }
    I am not seeing the same error happen when running locally with bootRun. Any ideas here?
    j
    u
    +3
    • 6
    • 9
  • r

    rss

    11/14/2025, 1:54 AM
    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' } } Is there any way to sort on more than one attribute using this method?
  • u

    user

    11/14/2025, 2:24 PM
    How safe is two update java to 21?
  • j

    jdaugherty

    11/14/2025, 2:24 PM
    the only real impact are date formatting differences
  • u

    user

    11/17/2025, 4:12 AM
    Hello community, With all my projects, as I have them pretty much the similar major dependencies, • spring security • spring security rest • db migration • spring data • spring session • redis • json view After upgrading to Grails 7, my GSP views just can not being loaded correctly with standalone war file. However the GSP views does work under development mode. Spending quite some time tracing the code, I found the
    precompiledGspMap
    was not being populated for groovyPageLocator bean, as fall back it tried to use
    resourceLoader
    to load the
    gsp
    and then render it. That's why it works in development mode(because it use
    resourceLoader
    anyway for development mode) I have to do the following work around to put the code in resource.groovy to make the whole project working with grails 7.0.2.
    Copy code
    // Force precompiledGspMap to be used in production
        // Override the groovyPageLocator bean from GroovyPagesGrailsPlugin
        // to force loading of precompiled GSPs even when Metadata thinks dev is available
        if (Environment.current == Environment.PRODUCTION && !Environment.isDevelopmentMode()) {
            groovyPageLocator(org.grails.web.gsp.io.CachingGrailsConventionGroovyPageLocator) { bean ->
                bean.lazyInit = true
    
                // Force loading of precompiled GSP map from gsp/views.properties in WEB-INF/classes
                precompiledGspMap = { org.springframework.beans.factory.config.PropertiesFactoryBean pfb ->
                    ignoreResourceNotFound = true
                    location = 'classpath:gsp/views.properties'
                }
    
                reloadEnabled = false
                cacheTimeout = -1  // Never expire cache
            }
    
            // Force messageSource to load from classpath in production
            // Override to ensure i18n message bundles are loaded from WEB-INF/classes
            messageSource(org.springframework.context.support.ReloadableResourceBundleMessageSource) {
                basename = 'classpath:messages'
                defaultEncoding = 'UTF-8'
                fallbackToSystemLocale = false
                useCodeAsDefaultMessage = false
                cacheSeconds = -1  // Cache forever in production
            }
        }
    After putting this at the bottom of the resource.groovy. Everything works. I still doing the testing. Question is why do I have to do this? What is wrong? Obviously with simpler projects generated by the grails forge, it works perfectly too.
    j
    u
    • 3
    • 2
  • f

    Fernando henrique

    11/17/2025, 12:20 PM
    For anyone needing the updated CodeNarc plugin, here's the repository. https://github.com/dobromyslov/codenarc-idea
    👍 2
  • l

    lraynal

    11/17/2025, 4:32 PM
    Hi, does https://github.com/apache/grails-core/pull/15187 mean that Grails 7 doesn't supporto depending on a micronaut lib based on netty http client ?
    t
    j
    • 3
    • 3
  • y

    ysb33r

    11/18/2025, 12:02 PM
    Looks like repo.grails.org is not accessible?
    ✅ 1
    m
    g
    a
    • 4
    • 6