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

    pablo.pazos

    06/08/2025, 8:06 PM
    Good Sunday gents! as usual on my Sundays I'm building some WARs in Grails, and in one of my Grails 5 apps just got an error that says explicitly: REPORT, something to do with the compilation of the assets (recently I have updated one of my js libraries but not sure how that broke the compilation) at com.google.common.base.Preconditions.checkState(Preconditions.java:492) at com.google.javascript.jscomp.InlineFunctions$CallVisitor.visit(InlineFunctions.java:425) at com.google.javascript.jscomp.InlineFunctions$FindCandidatesReferences.visit(InlineFunctions.java:494) at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:909) at com.google.javascript.jscomp.NodeTraversal.traverseChildren(NodeTraversal.java:1037) at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:905) at com.google.javascript.jscomp.NodeTraversal.traverseChildren(NodeTraversal.java:1037) at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:905) at com.google.javascript.jscomp.NodeTraversal.traverseChildren(NodeTraversal.java:1037) at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:902) at com.google.javascript.jscomp.NodeTraversal.traverseFunction(NodeTraversal.java:948) at com.google.javascript.jscomp.NodeTraversal.handleFunction(NodeTraversal.java:854) at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:880) at com.google.javascript.jscomp.NodeTraversal.traverseChildren(NodeTraversal.java:1037) at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:905) at com.google.javascript.jscomp.NodeTraversal.traverseChildren(NodeTraversal.java:1037) at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:905) at com.google.javascript.jscomp.NodeTraversal.traverseChildren(NodeTraversal.java:1037) at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:905) at com.google.javascript.jscomp.NodeTraversal.traverseChildren(NodeTraversal.java:1037) at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:902) at com.google.javascript.jscomp.NodeTraversal.traverseFunction(NodeTraversal.java:948) at com.google.javascript.jscomp.NodeTraversal.handleFunction(NodeTraversal.java:854) at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:880) at com.google.javascript.jscomp.NodeTraversal.traverseChildren(NodeTraversal.java:1037) at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:905) at com.google.javascript.jscomp.NodeTraversal.handleClassMembers(NodeTraversal.java:1023) at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:889) at com.google.javascript.jscomp.NodeTraversal.handleClass(NodeTraversal.java:998) at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:886) at com.google.javascript.jscomp.NodeTraversal.traverseChildren(NodeTraversal.java:1037) at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:902) at com.google.javascript.jscomp.NodeTraversal.traverseFunction(NodeTraversal.java:948) at com.google.javascript.jscomp.NodeTraversal.handleFunction(NodeTraversal.java:854) at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:880) at com.google.javascript.jscomp.NodeTraversal.traverseChildren(NodeTraversal.java:1037) at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:905) at com.google.javascript.jscomp.NodeTraversal.traverseChildren(NodeTraversal.java:1037) at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:905) at com.google.javascript.jscomp.NodeTraversal.traverseChildren(NodeTraversal.java:1037) at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:902) at com.google.javascript.jscomp.NodeTraversal.traverseFunction(NodeTraversal.java:948) at com.google.javascript.jscomp.NodeTraversal.handleFunction(NodeTraversal.java:854) at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:880) at com.google.javascript.jscomp.NodeTraversal.traverseChildren(NodeTraversal.java:1037) at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:905) at com.google.javascript.jscomp.NodeTraversal.traverseChildren(NodeTraversal.java:1037) at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:905) at com.google.javascript.jscomp.NodeTraversal.traverseChildren(NodeTraversal.java:1037) at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:905) at com.google.javascript.jscomp.NodeTraversal.traverseChildren(NodeTraversal.java:1037) at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:905) at com.google.javascript.jscomp.NodeTraversal.traverseChildren(NodeTraversal.java:1037) at com.google.javascript.jscomp.NodeTraversal.handleScript(NodeTraversal.java:842) at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:877) at com.google.javascript.jscomp.NodeTraversal.traverseChildren(NodeTraversal.java:1037) at com.google.javascript.jscomp.NodeTraversal.traverseBranch(NodeTraversal.java:905) at com.google.javascript.jscomp.NodeTraversal.traverse(NodeTraversal.java:415) at com.google.javascript.jscomp.NodeTraversal.traverse(NodeTraversal.java:425) at com.google.javascript.jscomp.InlineFunctions.process(InlineFunctions.java:124) at com.google.javascript.jscomp.PhaseOptimizer$NamedPass.process(PhaseOptimizer.java:317) at com.google.javascript.jscomp.PhaseOptimizer$Loop.process(PhaseOptimizer.java:462) at com.google.javascript.jscomp.PhaseOptimizer.process(PhaseOptimizer.java:232) at com.google.javascript.jscomp.Compiler.performOptimizations(Compiler.java:2438) at com.google.javascript.jscomp.Compiler.lambda$stage2Passes$1(Compiler.java:808) at com.google.javascript.jscomp.CompilerExecutor.lambda$runInCompilerThread$0(CompilerExecutor.java:101) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829) Caused by: java.lang.IllegalStateException ... 70 more FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':assetCompile'.
    java.util.concurrent.ExecutionException: java.lang.RuntimeException: INTERNAL COMPILER ERROR.
    Please report this problem. null Node(OPTCHAIN_CALL): highcharts.unminified.js34095 - ${i}: ${e}`,r&&(a+=encodeURI(i)+"="+encodeURI(e))}),a+=t}U(w,"displayError"
  • p

    pablo.pazos

    06/08/2025, 8:06 PM
    the last line actually outputs a whole lot of minimized JS
  • p

    pablo.pazos

    06/08/2025, 8:39 PM
    This is the file where it fails, it's a pretty popular charting library
    highcharts.js
  • p

    pablo.pazos

    06/08/2025, 8:50 PM
    Checking the non-monified JS it seems the error is on this specific line callback?.call(label, e); IF might be due to the optional chaining operator (
    ?.
    ) not being supported by the JavaScript minifier, does anybody knows something about that? I have no clue about how the JS gets minified in Grails
  • p

    pablo.pazos

    06/08/2025, 9:08 PM
    It doesn't seem to support JS classes neither
    j
    • 2
    • 10
  • u

    user

    06/10/2025, 12:44 PM
    Hi I am new to grails and was wondering how does grails handle the DB connectivity? We are using GORM and was wondering if GORM/Grails does retries or connection retries when a read operation fails due to lost connection to DB
    j
    • 2
    • 1
  • t

    Thomas Rasmussen

    06/11/2025, 10:23 AM
    I have reported an issue with the org.grails.pluginsviews markup4.0.0-M3 plugin and it should have been fixed and merged: https://github.com/apache/grails-gradle-plugin/issues/428 Grails 7.0.0-M4 was released yesterday but I don't think a new version of the views-markup plugin was released?
    p
    s
    +2
    • 5
    • 23
  • a

    Arjang

    06/12/2025, 6:11 PM
    Hi, I don’t know if this should be reported. I just upgraded from “sdk grails 7.0.0-M3” to “sdk grails 7.0.0-M4" on intel Mac. The first run returned lots of different Errors, but consequent runs are working fine.
    j
    j
    • 3
    • 3
  • u

    user

    06/13/2025, 9:49 AM
    I am new to grails and need some input on the pattern. I have a domain model which slightly varies from the input request I receive. So I am using the
    Command
    object to validate the incoming request, and later bind and transform the actual domain model. I have also recently came across
    gorm listener
    so now my question is what is the right place to validate the changes? Is it
    Command
    or the
    Gorm Listener
    s
    u
    • 3
    • 4
  • a

    Arjang

    06/14/2025, 2:07 PM
    M4 is not in dropdown
  • j

    jdaugherty

    06/14/2025, 2:08 PM
    It’s known issue
  • a

    Arjang

    06/14/2025, 2:08 PM
    found it https://docs.grails.org/7.0.0-M4/
  • j

    jdaugherty

    06/14/2025, 4:42 PM
    It's available at docs.grails.org/latest
  • j

    jdaugherty

    06/14/2025, 4:42 PM
    https://github.com/apache/grails-core/issues/14798 is the ticket to address this by the next release
  • g

    giangio

    06/16/2025, 8:06 AM
    Hi folks, I've forged a 7.0.0-M4 app but it does not build. Here is the exception, am I missing something?
    Copy code
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':configureGroovyCompilerGrailsCore'.
    > Could not resolve all files for configuration ':runtimeClasspath'.
       > Could not resolve com.bertramlabs.plugins:asset-pipeline-grails:5.0.9.
         Required by:
             root project :
          > Could not resolve com.bertramlabs.plugins:asset-pipeline-grails:5.0.9.
             > Could not parse POM <https://repo.maven.apache.org/maven2/com/bertramlabs/plugins/asset-pipeline-grails/5.0.9/asset-pipeline-grails-5.0.9.pom>
                > Could not find org.apache.grails:grails-bom:7.0.0-SNAPSHOT.
                  Searched in the following locations:
                    - <https://repo.maven.apache.org/maven2/org/apache/grails/grails-bom/7.0.0-SNAPSHOT/maven-metadata.xml>
                    - <https://repo.maven.apache.org/maven2/org/apache/grails/grails-bom/7.0.0-SNAPSHOT/grails-bom-7.0.0-SNAPSHOT.pom>
                    - <https://repo.grails.org/grails/restricted/org/apache/grails/grails-bom/7.0.0-SNAPSHOT/maven-metadata.xml>
                    - <https://repo.grails.org/grails/restricted/org/apache/grails/grails-bom/7.0.0-SNAPSHOT/grails-bom-7.0.0-SNAPSHOT.pom>
    > There are 3 more failures with identical causes.
    
    * Try:
    > Run with --stacktrace option to get the stack trace.
    > Run with --info or --debug option to get more log output.
    > Run with --scan to get full insights.
    > Get more help at <https://help.gradle.org>.
    
    BUILD FAILED in 1s
    j
    j
    • 3
    • 16
  • p

    pablo.pazos

    06/16/2025, 7:05 PM
    Good afternoon! I was reading a little bit about how to monitor database connections and stumbled upon HikariCP, that seems to be an alternative to Tomcat JDBC Pool, which seems to be the default in Grails. Does using HikariCP provide any advantage above the default for Grails? What I read is basically: HikariCP consumes less memory, it can be monitored easier, and has more options for configuration. Does someone here actually use it? Noticed any difference?
    j
    • 2
    • 12
  • t

    Thomas Rasmussen

    06/19/2025, 8:12 AM
    I am upgrading to Grails 7 M4 and I can't figure out what the new coordinates for this plugin is? apply plugin: 'org.grails.grails-plugin'
    j
    • 2
    • 9
  • d

    Dave

    06/19/2025, 2:52 PM
    Hi all, has anyone used PGVector with Grails (6) to store vector embeddings in a Postgres DB?. It doesn't seem to play nicely out of the box and looks like I have to roll my own Usertype. Just curious if others have had the same experience or whether I'm missing something from my field mapping.
    s
    • 2
    • 2
  • b

    Brandon Ray

    06/19/2025, 4:44 PM
    Hi everyone, I’m working on upgrading from 7 M3 to M4, but a lot of the plugins we rely on still only have M3 versions. Is there a plan to upgrade all of these in the near-term? e.g. https://repo.grails.org/ui/native/core/org/grails/plugins/spring-security-core/
    j
    • 2
    • 3
  • t

    Thomas Rasmussen

    06/23/2025, 6:55 AM
    build-test-data plugin Does anyone know the maintainer of the build-test-data plugin? The 6.0.0-M1 version released in january fails with the Grails 7.0.0-M4 release. I have opened a pull request https://github.com/longwa/build-test-data/pull/123
    j
    j
    • 3
    • 10
  • u

    user

    06/24/2025, 9:24 AM
    I felt that this is a nit in the document and added a fix, can someone kindly review and confirm if this is a nit please? https://github.com/apache/grails-spring-security/pull/1136
    👍 1
  • u

    user

    06/24/2025, 3:29 PM
    Hi all, we are using a token issued by an IdP with which we are not directly integrated using Oauth and we would like to validate the incoming JWT token and then add the user from the JWT a security-context so that our usual authorization flow could kick in. Is there a way we can use the spring-security-rest to do the token validation for us even though we are not generating any token? https://github.com/apache/grails-spring-security/blob/7.0.x/plugin-rest/docs/src/docs/tokenValidation.adoc
    j
    u
    • 3
    • 6
  • i

    IndianerJones

    06/25/2025, 6:33 AM
    Hi everyone, I’m running into an issue with Maven repository authentication in Grails after a change on our GitLab instance. We are running Grails 2.5.6 in a legacy project and now we have issues with our Repo. Previously, I used the following configuration in my BuildConfig.groovy and it worked fine until GitLab switched to requiring preemptive authentication:
    Copy code
    repositories {
        inherits true
        grailsCentral()
        mavenCentral()
        mavenRepo("<https://gitlab.company.net/api/v4/groups/dev/-/packages/maven>") {
            auth([
                username: "oauth",
                password: props.get("gitlabMavenPassword") as String ?: System.getenv("CI_JOB_TOKEN")
            ])
        }
    }
    Since the change, Grails only sends the authentication header after receiving a 401 response, but GitLab now expects the authentication header on the very first request (preemptive authentication). I tried something like this (hoping to force preemptive authentication):
    Copy code
    repositories {
        inherits true
        grailsCentral()
        mavenCentral()
        mavenRepo("<https://gitlab.company.net/api/v4/groups/dev/-/packages/maven>") {
            auth([
                username: "oauth",
                password: props.get("gitlabMavenPassword") as String ?: System.getenv("CI_JOB_TOKEN"),
                type    : "basic"
            ])
        }
    }
    But it doesn’t seem to help—Grails still only sends the header after the 401 response. Question: Is there a way to configure Grails (in BuildConfig.groovy or elsewhere) to force sending the authentication header on the first request (i.e., enable preemptive HTTP Basic Auth for Maven repositories)? Or is there another workaround for this situation? Thanks in advance for your help!
    s
    • 2
    • 4
  • u

    user

    06/26/2025, 11:44 AM
    I'm curious about dependencies and I've just posted a question on Stackoverflow (https://stackoverflow.com/questions/79680430/apache-grails-7-0-0-m4-dependency-on-groovy-4-0-27-and-why-groovy-4-0-26-is-show)
    j
    • 2
    • 1
  • r

    rss

    06/26/2025, 12:04 PM
    Apache Grails 7.0.0-M4 dependency on Groovy 4.0.27 and why Groovy 4.0.26 is shown in my dependecies 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 blockk like this: 17 │ compileClasspath - Compile classpath for source set 'main'. 18 │ +--- org.apache.grailsgrails bom7.0.0-M4 19 │ | +--- org.springframework.bootspring boot dependencies3.5.0 ... 211 │ | +--- org.apache.grails.commongrails common7.0.0-M4 212 │ | | +---...
  • u

    user

    06/26/2025, 1:58 PM
    Hi All, I have a custom built Filter by extending
    OncePerRequestFilter
    which I use to do some authentication. How do I make them work or skip based on path pattern by using
    grails.plugin.springsecurity.filterChain.chainMap
    ? Now no matter what I specify in the chainMap it gets invoked for every request that lands in our app.
    u
    • 2
    • 1
  • u

    user

    06/26/2025, 2:34 PM
    I have an API called
    /process/object
    which works fine without any auth, and by default my filterChain in
    application.groovy
    looks like this
    Copy code
    grails.plugin.springsecurity.filterChain.chainMap = [
        [pattern: '/**', filters: 'JOINED_FILTERS']
        ]
    Now, I have defined a new filter called
    tokenAuthenticationFilter
    by extending
    OncePerRequestFilter
    and I am registering this filter under application.groovy like
    Copy code
    grails.plugin.springsecurity.filterChain.filterNames = ['tokenAuthenticationFilter']
    grails.plugin.springsecurity.filterChain.chainMap = [
        [pattern: '/**', filters: 'JOINED_FILTERS,-tokenAuthenticationFilter']
        ]
    As soon as I do this, I get the below chain of exceptions,
    Copy code
    2025-06-26 15:32:54.366 [http-nio-8080-exec-1] ERROR o.a.c.c.C.[.[.[.[dispatcherServletRegistration] - Servlet.service() for servlet [dispatcherServletRegistration] in context with path [] threw exception  
    org.springframework.security.authentication.AuthenticationCredentialsNotFoundException: An Authentication object was not found in the SecurityContext
    	at org.springframework.security.access.intercept.AbstractSecurityInterceptor.credentialsNotFound(AbstractSecurityInterceptor.java:350)
    	at org.springframework.security.access.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:214)
    	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)
    How can I explicity disable Auth for this? All I have done is introduce a new filter
    j
    u
    • 3
    • 2
  • u

    user

    06/26/2025, 2:50 PM
    Can I use
    anonymousAuthenticationFilter
    to pass through this?
  • l

    lmatuszewski

    06/30/2025, 9:52 AM
    Hi all! I would like to ask what is the status of hot reloading in Grails 7? I think it was using SpringLoaded before M4 and in M4 spring-boot-devtools were added and now the app is being restarted after every controller change. Is this intentional?
    j
    • 2
    • 1
  • s

    Stephen Lynch

    06/30/2025, 12:19 PM
    Codecs such as Base64CodecExtensionMethods.groovy were moved out of grails-codecs into a new package called grails-codecs-core. How are these default groovy extensions loaded? Previously these would be loaded through the gsp plugin -> grails-codecs dependency. In latest Grails 7, these appear not to be loaded any more so calls to x.encodeAsBase64 / x.encodeAsMD5() no longer work. Is this a bug / or a breaking change that is not documented? grails-codecs-core is not published in maven either?
    j
    • 2
    • 2