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

    jdaugherty

    09/03/2025, 8:08 PM
    so the gsps are compiled into the war / jar
  • r

    rss

    09/04/2025, 6:34 PM
    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.CredencialsDTO import example.aplication.dtos.authentication.AuthenticationTokenDTO import example.aplication.exceptions.authentication.AuthenticationErrorException import org.springframework.web.bind.annotation.* import org.springframework.http.ResponseEntity import...
  • a

    Arjang

    09/07/2025, 2:03 PM
    Not terribly important, I don’t know how to suppress java 24 warnings
    Copy code
    WARNING: A restricted method in java.lang.System has been called
    WARNING: java.lang.System::loadLibrary has been called by org.fusesource.hawtjni.runtime.Library in an unnamed module (file:/.../.sdkman/candidates/grails/7.0.0-RC1/lib/grails-cli-7.0.0-RC1-all.jar)
    Should i suppress it? I am not sure what is correct action is.
    j
    • 2
    • 1
  • m

    matt.aguirre

    09/08/2025, 7:43 PM
    Does anyone here use spotbugs and if so, how do you configure it to run and analyze a grails project? I am attempting to do so w/ a grails 6.2.3 project.
    j
    s
    m
    • 4
    • 8
  • u

    user

    09/12/2025, 8:55 AM
    Hi. I have some problems with RC2 release. I have dasboard.gsp like this
    Copy code
    <!doctype html>
    <html>
    <head>
        <meta name="layout" content="logged"/>
    </head>
    <body>
    <sec:access expression="!hasRole('ROLE_ESERCENTE')">
        <g:include controller="domanda" action="index"/>
    </sec:access>
    <sec:access expression="hasRole('ROLE_ESERCENTE')">
        <g:include controller="domanda" action="index"/>
    </sec:access>
    </body>
    </html>
    and logged.gsp like this
    Copy code
    <!doctype html>
    <html>
        <head>
            <meta charset="utf-8">
            <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
            <meta name="description" content="">
            <title><g:layoutTitle default="Taxcredit"/></title>
            <script nonce="${request.getAttribute('cspNonce')}">window.__PUBLIC_PATH__ = '${createLink(uri: '/')}' + 'assets/fonts'</script>
            <asset:stylesheet src="application.css"/>
            <script src="<https://cdn.jsdelivr.net/npm/autonumeric@4.1.0>"></script>
            <asset:javascript src="application.js"/>
    
            <link href="<https://cdn.datatables.net/v/dt/dt-2.3.4/r-3.0.6/sc-2.4.3/datatables.min.css>" rel="stylesheet" crossorigin="anonymous">
    %{--        <script type="text/javascript" src="<https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/pdfmake.min.js>"></script>--}%
    %{--        <script type="text/javascript" src="<https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/vfs_fonts.js>"></script>--}%
            <script src="<https://cdn.datatables.net/v/dt/dt-2.3.4/r-3.0.6/sc-2.4.3/datatables.min.js>" crossorigin="anonymous"></script>
    
            <asset:link rel="shortcut icon" href="favicon_32_mibact.png" type="image/x-icon"/>
            <g:layoutHead/>
        </head>
        <body class="logged">
    .......
    but the result html is
    Copy code
    <!doctype html>
    <html>
    <grailsLayout:captureHead>
        <grailsLayout:captureMeta gsp_sm_xmlClosingForEmptyTag="/" name="layout" content="logged"/>
    </grailsLayout:captureHead>
    <grailsLayout:captureBody>
    
        <html>
        <grailsLayout:captureHead>
            
            <grailsLayout:wrapTitleTag><grailsLayout:captureTitle>Domanda Elenco</grailsLayout:captureTitle></grailsLayout:wrapTitleTag>
            <grailsLayout:captureMeta gsp_sm_xmlClosingForEmptyTag="/" name="layout" content="logged"/>
        </grailsLayout:captureHead>
    
    <grailsLayout:captureBody>
    It doesn’t seem to loading javascript and css from head… With M5 release it works.
  • u

    user

    09/12/2025, 9:12 AM
    Why there is <grailsLayout:captureHead> instead of <head>?
    j
    u
    • 3
    • 7
  • s

    Stephen Lynch

    09/12/2025, 10:29 AM
    After the RC2 release, I'm not seeing grails-i18n RC2 artifact in maven central or repo.grails.org ?
    t
    j
    • 3
    • 3
  • a

    Arjang

    09/13/2025, 1:44 PM
    I am getting errors with command stop-app. Is this the same issue as https://github.com/apache/grails-core/issues/13695 or should i create a new ticket?
    Copy code
    grails> stop-app --stacktrace
    | Shutting down application...
    | Error Application not running. (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
    java.io.FileNotFoundException: <http://localhost:8080/actuator/shutdown>
    	at stop-app.run(stop-app.groovy:87)
    	at org.grails.cli.profile.commands.script.GroovyScriptCommand.handle(GroovyScriptCommand.groovy:156)
    	at org.grails.cli.profile.AbstractProfile.handleCommand(AbstractProfile.groovy:478)
    	at org.grails.cli.GrailsCli.handleCommand(GrailsCli.groovy:364)
    	at org.grails.cli.GrailsCli$_handleCommandWithCancellationSupport_closure6.doCall(GrailsCli.groovy:455)
    	<===========--> 90% EXECUTING [6m 13s]
    | Error Application not running.
    grails>
    j
    • 2
    • 1
  • a

    Arjang

    09/14/2025, 12:34 AM
    Which grails-spring-security should i use? There are 2 MVN repos A) https://mvnrepository.com/artifact/org.apache.grails/grails-spring-security runtimeOnly ‘org.apache.grailsgrails spring security7.0.0-RC2’ B) https://mvnrepository.com/artifact/org.springframework.security/spring-security-core implementation ‘org.springframework.securityspring security core7.0.0-M2’
  • j

    James Fredley

    09/14/2025, 12:45 AM
    A
  • l

    lraynal

    09/17/2025, 2:15 PM
    Hi all, I have a RC2 question : In a Service, I have an @Autowired micronaut http declarative @Client The ServiceUnitTest is giving me
    Copy code
    expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
  • l

    lraynal

    09/17/2025, 2:21 PM
    Something changed from v6 ?
    j
    j
    • 3
    • 4
  • b

    billgonemad

    09/17/2025, 8:07 PM
    Was there a change with GORM setting the default mapping (upgrading to 7.0.0-RC2 currently)? We had a runtime.groovy file like this
    Copy code
    grails.gorm.default.mapping = {
        autowire true
    }
    but it doesn't appear to be getting picked up and the beans are not being injected into the domain class. Adding to the mapping block on the domain appears to work however.
    j
    g
    s
    • 4
    • 6
  • j

    James Fredley

    09/17/2025, 9:50 PM
    set the channel topic: Grails questions. Please ask them on https://lists.apache.org/list.html?users@grails.apache.org and paste the SO link here. That way history is retained and it is searchable. Slack is NOT!
  • j

    James Fredley

    09/17/2025, 10:35 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. That way history is retained and it is searchable. Slack is archived on https://www.linen.dev/s/grails/c/general
  • j

    James Fredley

    09/17/2025, 10:35 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. That way history is retained and it is searchable. Slack is archived on https://www.linen.dev/s/grails/c/questions
  • u

    user

    09/18/2025, 9:53 AM
    I've a general question: how do the Grails project addresses security vulnerabilities in its dependencies:? For example, CVE-2025-41248 was solved in spring-core 6.2.11 but Grails 7.0.0-SNAPSHOT still depends on 6.2.10.
    j
    u
    u
    • 4
    • 5
  • u

    user

    09/18/2025, 10:01 AM
    and a less general question: based on your experience, how much can we be confident of updating minor versions of what it looks to be I a base dependency of Grails?
  • u

    user

    09/18/2025, 10:03 AM
    Our project is currently using M3 and a colleague of mine had created an experimental branch using RC2 using workarounds to we are not pushing to any external environment, yet.
    j
    j
    +5
    • 8
    • 12
  • m

    Marc Fishman

    09/18/2025, 4:00 PM
    Hi all! We are using Grails 5, and we use namedQueries pretty extensively. Specifically, we're using them a lot to chain lots of small criteria together to make for really flexible, fluid, and reusable query logic. We've been trying to move away from them and toward more
    where
    queries, as namedQueries are deprecated and not supported in Grails 6+ (from my understanding), but we're finding the lack of ability to chain them together really limiting. I'm curious if others have any similar experience or alternative suggestions. I've gone through lengthy discussions with ChatGPT and was kind of disappointed with the results. Any thoughts, ideas, or best practices welcome!
    j
    • 2
    • 1
  • s

    Stephen Lynch

    09/18/2025, 8:16 PM
    @James Fredley Your fix for https://github.com/apache/grails-core/issues/15078 just reminded me to check one of my apps to see if I had the same issue in RC2. I noticed something else whether this is intentional or not. Adding the migration plugin adds an extra 49 jars to the war file (tested on your example project attached the the above issue). It seems the migration plugin is pulling in the grails-shell-cli which in turn is pulling in a lot of dependencies. Is the grails-shell-cli required at runtime?
    j
    • 2
    • 5
  • u

    user

    09/21/2025, 6:34 PM
    Grails-7 questions. currently when I run my app as executable war file I have to do this in my build.gradle:
    Copy code
    bootWar {
        from('grails-app/views') {
            into 'WEB-INF/grails-app/views'
        }
    Copy code
    }
    u
    j
    +9
    • 12
    • 43
  • u

    user

    09/21/2025, 6:39 PM
    Or the gsp view can not be resolved. Also with war mode, i18n messages can not be loaded correctly. The whole setting(application.yml) and build.gradle works correct with grails 6.
  • u

    user

    09/22/2025, 2:16 PM
    I have an internal grails plugin that has some tests that require domain entities. These domain entities are only required to test the plugin code and are not useful to the main project. Is there a way to configure either (a) move test-domain entities out of grails-app/domain and later promote them to domain object when under test environment - or (b) suppress these from being dragged into the main project somehow? Thx
    j
    u
    +4
    • 7
    • 21
  • b

    billgonemad

    09/22/2025, 2:58 PM
    Working on upgrading to Grails 7 and seems the app will not auto generate the SSL cert like previous versions when running in development mode. I have worked around this by generating a cert myself and including the proper config in my application-development.yml file. By am wondering, is there a way to get the app to generate this like previous versions?
    Copy code
    |Generating SSL certificate
    Warning |
    Unable to automatically generate SSL certificate, manual configuration required. Set 'server.ssl.key-store' in application.yml
    j
    j
    p
    • 4
    • 6
  • p

    Paul Trudel

    09/24/2025, 6:52 PM
    I am working on upgrading my Grails app to Grails 7 RC 2. I am running into this error when building my project
    Cannot resolve reloading agent JAR: Failed to resolve imported Maven boms: Could not find org.grails:grails-bom:7.0.0-RC2
    These repos only have BOM versions up to 7.0.0-M3 https://repo.grails.org/ui/native/core/org/grails/grails-bom/ https://repo.maven.apache.org/maven2/org/grails/grails-bom/ Is there another repo that I need to add to my
    build.gradle
    that contains these artifacts?
    j
    • 2
    • 2
  • r

    rss

    09/24/2025, 9:04 PM
    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 of a Grails application. If running in the context of a test using the mocking API or bootstrap Grails correctly. My code: grails-app/domain/com/demo/Person.groovy package com.demo class Person { String name } grails-app/controllers/com/demo/PersonController.groovy package com.demo import...
  • m

    muser

    09/25/2025, 8:25 PM
    Hello is grails website down?
    j
    • 2
    • 2
  • j

    James Fredley

    09/25/2025, 9:34 PM
    https://grails.apache.org/ is back
    partygrails 4
  • p

    pablo.pazos

    09/27/2025, 6:07 AM
    Hi all, quick question, I've noticed that Date is mapped to datetime in MySQL which doesn't store the fractional seconds (SS.sss), thought the type has a length that allows to store up to 6 digits e.g. datetime(3) stores 3 fractional seconds. Is there a DSL to set the length of the datetime? Thanks!