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

    rss

    07/21/2025, 4:44 PM
    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, though it hasn't happened yet). How can I tell GORM which one to return, when there are more than one? I'm looking these up by an ID in an external system, which will eventually roll back around when it hits a max, so we can have two rows in our data base for the same external ID. I will always want...
    j
    • 2
    • 1
  • j

    John Moore

    07/21/2025, 6:45 PM
    Very basic question... Looking at the External Config plugin, it says in the release notes "Notice, that from Grails 7, this plugin is released at a part of Grails core!". Does that mean I don't need to use
    Copy code
    implementation 'dk.glasius:external-config:4.0.1'
    and can just use the grails.config.locations as if it is part of Grails (which it presumably is as of 7)?
    j
    • 2
    • 3
  • j

    John Moore

    07/22/2025, 12:02 PM
    I have been converting a simple Grails 6 app to Grails 7, and I'm getting there, but I keep getting a 'unable to resolve class org.apache.commons.lang.time.DateUtils' error, and others also from the commons.lang package. In Grails 6 and earlier one didn't need to declare a dependency for this, it was built in. It tried declaring a dependency with: implementation 'org.apache.commonscommons lang33.13.0' but that didn't help. Also are groovy-dateutil and groovy-datetime part of core now?
    t
    j
    p
    • 4
    • 7
  • r

    rss

    07/23/2025, 3:24 AM
    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 log full stack trace. How to avoid it? Just a telegram client @Client("https://api.telegram.org/bot\${bot_token}") interface TelegramClient { @Post("/sendMessage") Object sendMessage(Long chat_id, String text, String parse_mode) I have got a message...
  • c

    cjchalmers

    07/23/2025, 2:54 PM
    I have an API server based on Grails 6.2.3 running on JDK17. I should allow access to the API via a token and I would like to use it for an Angular FE app. Security is via a token and I allow users to login to access their data in Angular. I have used Spring Security in the past and want to leverage this again. Although a bit dated I am following the steps shown in this post - https://www.djamware.com/post/58a53b5180aca748640ce350/securing-rest-api-with-grails-3-and-spring-security-rest I have added the following two imports for security 1. implementation "org.grails.pluginsspring security core6.1.2" 2. implementation "org.grails.pluginsspring security rest6.0.0-M1" Unfortunately I go round in circles with dependencies and errors such as the following, Can anyone help me progress and solve this? Have others got Spring Security 6 working with Grails 6.X as I suggest above? Could not resolve all files for configuration ':runtimeClasspath'. > Could not resolve org.codehaus.groovygroovy bom3.0.13. Required by: project : > org.grailsgrails core6.2.3 > io.micronaut.springmicronaut spring context4.5.1 > io.micronautmicronaut bom3.10.4 project : > org.grailsgrails core6.2.3 > io.micronaut.springmicronaut spring context4.5.1 > io.micronautmicronaut bom3.10.4 > io.micronaut.groovymicronaut groovy bom3.4.0 > No matching variant of org.apache.groovygroovy bom4.0.24 was found. The consumer was configured to find a runtime of a library compatible with Java 17, packaged as a jar, preferably optimized for standard JVMs, and its dependencies declared externally but: - Variant 'apiElements' capability org.apache.groovygroovy bom4.0.24: - Incompatible because this component declares an API of a platform and the consumer needed a runtime of a library - Other compatible attributes: - Doesn't say anything about how its dependencies are found (required its dependencies declared externally) - Doesn't say anything about its target Java environment (preferred optimized for standard JVMs) - Doesn't say anything about its target Java version (required compatibility with Java 17) - Doesn't say anything about its elements (required them packaged as a jar)
    l
    • 2
    • 1
  • j

    John Moore

    07/23/2025, 6:20 PM
    I have to say I'm getting rather frustrated with my attempts to test out Grails 7.0.0-M5 with the conversion of a pretty simple Grails 6 app. I've got it to compile but I can't get it to run - I've run into error after error, which I'll post about in another message. I wondered whether my problems might be caused by using Application Forge - I generated the shell of the app (build.gradle, etc.) with that and then copied over the actual source code of my app and added dependencies to build.gradle. So I thought I'd try another approach, simply using 'grails create-app', and even this generates a bunch of errors (although the app does get created). Can anyone explain what's going on here? $ grails create-app newapp Resolving dependencies............... Error | [main] INFO org.eclipse.aether.internal.impl.DefaultArtifactResolver - Artifact org.fusesource.jansijansipom:1.18 is present in the local repository, but cached from a remote repository ID that is unavailable in current build context, verifying that is downloadable from [apacheRepository (https://repository.apache.org/content/groups/public, default, releases+snapshots), grailsRepo (https://repo.grails.org/grails/restricted, default, releases+snapshots), central (https://repo.maven.apache.org/maven2, default, releases)] Error | [main] INFO org.eclipse.aether.internal.impl.DefaultArtifactResolver - Artifact org.fusesource.jansijansipom:1.18 is present in the local repository, but cached from a remote repository ID that is unavailable in current build context, verifying that is downloadable from [apacheRepository (https://repository.apache.org/content/groups/public, default, releases+snapshots), grailsRepo (https://repo.grails.org/grails/restricted, default, releases+snapshots), central (https://repo.maven.apache.org/maven2, default, releases)] .maven.apache.org/maven2, default, releases)] ...and a bunch of similar messages
    👍 1
    j
    j
    • 3
    • 4
  • c

    cjchalmers

    07/24/2025, 2:24 PM
    hello, Im using Grails 6.2.3 and was looking for an Audit solution. I came across the "Grails Audit Logging Plugin" which should suit what I want. I see I probably have to use version 4 of this. https://grails-plugins.github.io/grails-audit-logging-plugin/6.0.x/#description Anyone else using this? Any known caveats and/or alternatives wrt working with Grails 6 I should be aware of?
    j
    l
    j
    • 4
    • 5
  • r

    Runwolf

    07/24/2025, 2:34 PM
    Anybody know if there was ever an accounting system build in Grails ?
    j
    • 2
    • 9
  • j

    John Moore

    07/24/2025, 3:58 PM
    Not a showstopper, more a curiosity, as it doesn't appear to cause any problems, but... At some point in attempting to build or run a Grails 7 app, converted from Grails 6, a new directory has been created called 'USER_HOME_IS_UNDEFINED'. It contains a '.grails' directory.
    g
    j
    • 3
    • 15
  • j

    John Moore

    07/24/2025, 5:37 PM
    Sorry, me again, peppering you with problems... So, as mentioned, I got my converted Grails 7 app to run fine with './gradlew bootRun'. So I thought I'd try deploying a .war to Tomcat and this is very odd! Basically nothing happens. The .war is correctly expanded, and it appears to go through the process of deployment: 24-Jul-2025 181357.851 INFO [main] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/opt/tomcat/webapps/socialsupermarket.war] 24-Jul-2025 181358.309 WARNING [main] org.apache.tomcat.util.descriptor.web.WebXml.setVersion Unknown version string [5.0]. Default version will be used. 24-Jul-2025 181358.357 WARNING [main] org.apache.tomcat.util.descriptor.web.WebXml.setVersion Unknown version string [6.0]. Default version will be used. 24-Jul-2025 181358.375 WARNING [main] org.apache.tomcat.util.descriptor.web.WebXml.setVersion Unknown version string [6.0]. Default version will be used. 24-Jul-2025 181402.506 INFO [main] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. 24-Jul-2025 181402.606 INFO [main] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/opt/tomcat/webapps/socialsupermarket.war] has finished in [4,754] ms But nothing is actually deployed. The web app is not running, and no errors are written to the log explaining why not. (There should be dozens of lines before the deployment has finished line). The configuration of the .war is unchanged from 6.2.3: bootWar { enabled = false } war { enabled = true archiveBaseName.set('socialsupermarket') archiveVersion.set('') archiveClassifier.set('') } Any ideas?
    j
    j
    • 3
    • 7
  • j

    John Moore

    07/24/2025, 5:45 PM
    Tomcat 9 is OK for Grails 7, is it not?
  • d

    Dylan Kolson

    07/24/2025, 6:01 PM
    any updates on https://github.com/apache/grails-spring-security/issues/1079
  • j

    John Moore

    07/25/2025, 9:51 AM
    Try as I might I cannot get my Grails 7.0.0-M5 app to start up with an embedded Undertow server - it always starts up with Tomcat. What am I overlooking? This is the relevant section from build.gradle: implementation "org.apache.grails:grails-core" //implementation "org.springframework.boot:spring-boot-starter-tomcat" implementation "org.springframework.boot:spring-boot-autoconfigure" implementation "org.springframework.boot:spring-boot-starter" implementation "org.springframework.boot:spring-boot-starter-actuator" implementation "org.springframework.boot:spring-boot-starter-logging" implementation "org.springframework.boot:spring-boot-starter-undertow" implementation "org.springframework.boot:spring-boot-starter-validation" I have commented out the Tomcat dependency and added Undertow, but still it uses Tomcat 10.
    s
    j
    g
    • 4
    • 14
  • r

    rss

    07/25/2025, 9:14 PM
    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.9.1". The application has several forms submitting data with multipart/form-data. Suddenly, without any changes in the application code or configuration, POST requests from these forms started to fail with the FileCountLimitExceededException. My question is: How can I properly configure or fix this...
    u
    • 2
    • 1
  • u

    user

    07/29/2025, 7:28 PM
    Hey everyone, I am doing a project in grails and just wondered if there is any way to conditionally render something depending on the user role using taglib, something like
    Copy code
    <sec:ifAnyGranted roles="ROLE_ADMIN">
        <button>Admin Action</button>
    </sec:ifAnyGranted>
    I have this import at the top of the page, however it doesn't seem to work
    Copy code
    <%@ taglib prefix="sec" uri="<http://grails.org/plugins/spring-security-core>" %>
    I do have spring security in the dependencies in build.gradle and refreshed the build I'd appreciate any help or guidance with that My grails version is 6.2.3
    j
    u
    • 3
    • 3
  • d

    Dylan Kolson

    07/31/2025, 5:08 PM
    anyone else having issues with org.grails.pluginsspring security core6.1.2
    Copy code
    Description:
    
    An attempt was made to call a method that does not exist. The attempt was made from the following location:
    
        grails.plugin.springsecurity.web.access.intercept.AnnotationFilterInvocationDefinition.findActions(AnnotationFilterInvocationDefinition.groovy:497)
    
    The following method did not exist:
    
        'java.util.List org.codehaus.groovy.runtime.DefaultGroovyMethods.findAll(java.lang.Object[], groovy.lang.Closure)'
    
    The calling method's class, grails.plugin.springsecurity.web.access.intercept.AnnotationFilterInvocationDefinition, was loaded from the following location:
    
        jar:file:/Users/dylankolson/.gradle/caches/modules-2/files-2.1/org.grails.plugins/spring-security-core/6.1.2/fe601e34c816de4946d257b8110156cb8bc5116a/spring-security-core-6.1.2.jar!/grails/plugin/springsecurity/web/access/intercept/AnnotationFilterInvocationDefinition.class
    
    The called method's class, org.codehaus.groovy.runtime.DefaultGroovyMethods, is available from the following locations:
    
        jar:file:/Users/dylankolson/.gradle/caches/modules-2/files-2.1/org.codehaus.groovy/groovy/3.0.11/b1759d82dcf4f57299c8555a76330532d2d77b47/groovy-3.0.11.jar!/org/codehaus/groovy/runtime/DefaultGroovyMethods.class
        jar:file:/Users/dylankolson/.gradle/caches/modules-2/files-2.1/org.codehaus.groovy/groovy-all/2.4.7/c5371aaa20bcdca1175d9477fc0811f4fd99b68a/groovy-all-2.4.7.jar!/org/codehaus/groovy/runtime/DefaultGroovyMethods.class
    👀 1
    j
    • 2
    • 1
  • r

    Robert B. Davis

    07/31/2025, 10:49 PM
    I upgraded my grails application from 5.2 to 6.2.3 and everything works great when I run it locally via bootRun in Intellij. When I deploy to a container and run the built jar my .gson views are not found. Has anyone else had a similar issue? (note that our deployment/run method has not changed with the upgrade..it seems like the gson views are either not present in the jar file and/or not compiled properly).
    j
    a
    g
    • 4
    • 13
  • u

    user

    08/04/2025, 4:44 PM
    I’m currently using Grails 2.5.6 and trying to build a WAR file (
    grails dev war
    ) without any front-end files that I don’t need. • First, I tried excluding them in
    Config.groovy
    using:
    Copy code
    grails.assets.excludes = [
        "**/*.gsp",
        "**/*.js",
        "**/*.css",
        "**/*.ts",
        "**/*.png",
        "**/*.jpg",
        "**/*.jpeg",
        "**/*.gif",
        "**/*.svg",
    ]
    However, the
    .gsp
    files were still included in the WAR. • Next, I tried excluding them in BuildConfig.groovy:
    Copy code
    grails.project.war.excludes = [
        '**/*.gsp',
        'WEB-INF/grails-app/views/**/*'
    ]
    
    grails.war.resources = { stagingDir ->
        delete(includeEmptyDirs: true) {
            fileset(dir: "${stagingDir}/WEB-INF/grails-app/views") {
                include(name: '**/*.gsp')
            }
        }
    
        def pluginsDir = new File("${stagingDir}/WEB-INF/plugins")
        if (pluginsDir.exists()) {
            delete(includeEmptyDirs: true) {
                fileset(dir: pluginsDir.absolutePath) {
                    include(name: '**/*.gsp')
                }
            }
        }
    
        delete(includeEmptyDirs: true) {
            fileset(dir: "${stagingDir}/WEB-INF/classes") {
                include(name: '**/*_gsp.class')
            }
        }
    }
    But the .gsp files are still being packaged. Question: How can I reliably remove all
    .gsp
    files from the WAR file in Grails 2.5.6?
  • f

    Felipe

    08/04/2025, 6:12 PM
    Good afternoon, everyone. How's it going? I'm working on a project using Grails 2.5.6. We're currently in the process of upgrading to Grails 4. However, when generating the WAR file for this project, I'm encountering the following error:
    Copy code
    | Error WAR packaging error: archive contains more than 65535 entries.
    From what I understand, this error is due to a limitation in the ZIP format. I saw some recommendations to use ZIP64, but it seems it's not supported in my current version. Does anyone know of any alternative solutions to resolve this issue?
    j
    • 2
    • 3
  • n

    ngraff

    08/05/2025, 5:09 PM
    Hello, Trying to upgrade to Grails 7 from Grails 6 using 7.0.0-M5. In one of my submodules/plugins under the plugins folder of the main app, I have a handful of gsps. On the main app bootRun I get this error that I don't see in Grails 6. I only put a very basic test.gsp in there as a test under a docs folder, see image. Any suggestions out there? Exception in thread "main" java.util.concurrent.ExecutionException: BUG! exception in phase 'semantic analysis' in source unit 'gsp_ic_docstest_gsp.groovy' Cannot invoke "String.equals(Object)" because "packageName" is null.
    j
    • 2
    • 6
  • g

    gaolei

    08/07/2025, 2:42 AM
    Hello, I am trying to use Grails 7.0.0-M5 to create a plugin. I just did a create-plugin, then I try to run
    Copy code
    gradle build.
    It failed with this error:
    Copy code
    > Configure project :
    Cannot resolve reloading agent JAR: Failed to resolve imported Maven boms: Cannot resolve external dependency org.springframework.boot:spring-boot-dependencies:3.5.3 because no repositories are defined.
    Required by:
        project :
    
    FAILURE: Build failed with an exception.
    
    * Where:
    Build file '/Users/xxxx/work/dc/tmp_2/build.gradle' line: 19
    
    * What went wrong:
    A problem occurred evaluating root project 'test-common'.
    > Failed to apply plugin 'org.apache.grails.gradle.grails-plugin'.
       > Could not create task ':findMainClass'.
          > Could not create task of type 'FindMainClassTask'.
             > 'org.gradle.api.file.ConfigurableFileCollection org.gradle.api.file.ConfigurableFileCollection.convention(java.lang.Object[])'
    
    * 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 372ms
    If I run
    Copy code
    ./gradlw build
    It failed with this error:
    Copy code
    tmp_2 % ./gradlew build
    
    > Task :compileGroovy FAILED
    startup failed:
    /Users/xxx/work/dc/tmp_2/grails-app/init/test/common/BootStrap.groovy: 3: unable to resolve class jakarta.servlet.ServletContext
     @ line 3, column 1.
       import jakarta.servlet.ServletContext
       ^
    
    1 error
    
    
    [Incubating] Problems report is available at: file:///Users/xxx/work/dc/tmp_2/build/reports/problems/problems-report.html
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':compileGroovy'.
    > Compilation failed; see the compiler error output for details.
    
    * Try:
    > Run with --scan to get full insights.
    
    Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
    
    You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
    
    For more on this, please refer to <https://docs.gradle.org/8.14/userguide/command_line_interface.html#sec:command_line_warnings> in the Gradle documentation.
    
    BUILD FAILED in 1s
    What could be wrong?
    t
    j
    • 3
    • 4
  • o

    Onats Ong

    08/08/2025, 12:39 AM
    hey team, I'm revisiting grails again and trying to setup my IDE. I remember IntelliJ had a grails context support but it doesn't seem to be working now. Is there a 3rd party one that supports grails quite well?
    j
    • 2
    • 3
  • s

    Slackbot

    08/08/2025, 12:39 AM
    May I suggest "team" or "everyone" or "folks"? Not everyone here is a guy.
  • a

    Allison Martin

    08/08/2025, 9:06 PM
    Hi Colin, Yes, we have a Grails 6 app using Spring Security with our Angular app using cookies at /app/ws and REST at /app/api. We struggled for a while getting the /app/api mapping to stop issuing cookies but finally figured out that it was a configuration issue in our Spring Auth Filters. The config is:
    Copy code
    plugin:
        springsecurity: # Spring Security Plugin Configuration
          rest:
            token:
              storage:
                jwt:
                  secret: "Some secret key to dev, hope this is long enough."
                  expiration: 14400 # default expiration to 4 hours
              validation:
                enableAnonymousAccess: true
          filterChain:
            chainMap:
              - pattern: '/api/appVersion'
                filters: 'anonymousAuthenticationFilter,restTokenValidationFilter,restExceptionTranslationFilter,filterInvocationInterceptor'
              - pattern: '/api/**'
                filters: 'JOINED_FILTERS,-anonymousAuthenticationFilter,-exceptionTranslationFilter,-authenticationProcessingFilter,-securityContextPersistenceFilter,-rememberMeAuthenticationFilter' # Stateless chain
              - pattern: '/**'
                filters: 'JOINED_FILTERS,-restTokenValidationFilter,-restExceptionTranslationFilter' # Traditional chain
  • l

    lraynal

    08/12/2025, 11:52 AM
    Hi team, is it possible to add Spring Security to a Grails 7 RC1 app yet ? Dependency seems wrong here https://apache.github.io/grails-spring-security/7.0.x/core-plugin/guide/index.html , I can't see it in https://start.grails.org/ features
    j
    j
    • 3
    • 6
  • r

    rss

    08/12/2025, 6:34 PM
    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 use "docker stats". I see the memory used from the container increasing like, every f5 on my page or when my application still running but with no one action beeing made on the page. To have a short test, i cleaned one controller and leave it the most clean possible, like: package test class exampleController { def dataSource; static allowedMethods = [save: "POST", update: "POST", delete:...
  • u

    user

    08/13/2025, 1:05 PM
    Hello everyone, hope you’re doing well. I’m currently working on a project using Grails 2.5.6, and we’re in the process of upgrading to Grails 4. For now, I need to generate the WAR file, which I usually do with the command:
    grails dev war
    For some builds, I’d like to exclude asset files. I tried using the following command:
    Copy code
    RUN ./grailsw -Dgrails.env=[env] -Dgrails.war.exploded=true -Dgrails.assets.excludes="**/*.js,**/*.css,**/*.ts,**/*.scss,**/*.sass" war
    However, this command does not actually exclude the assets. Is there another way to exclude assets through the command line?
    j
    • 2
    • 2
  • i

    ilPittiz

    08/13/2025, 2:31 PM
    Hi all, I’m trying to upgrade my Grails 6.2.3 app to Grails 7, and I generated a brand-new Grails 7 project from Grails Forge. I picked • Grails 7.0.0-RC1 • Gorm MongoDB • Spring Boot Starter Tomcat • a few additional features (Gradle buildSrc, Grails web console, ect) to make it similar to my app Then in IntelliJ IDEA 2025.2 (latest version of IDE and plugins) I made sure to use JDK 17 (aarch64 distribution, as I’m on Apple silicon). My
    build.gradle
    is this
    Copy code
    plugins {
        id "war"
        id "idea"
        id "eclipse"
    }
    
    // Not Published to Gradle Plugin Portal
    apply plugin: "org.apache.grails.gradle.grails-web"
    apply plugin: "org.apache.grails.gradle.grails-gsp"
    apply plugin: "org.apache.grails.gradle.grails-gson"
    
    group = "grails7"
    
    repositories {
        mavenCentral()
        maven {
           url = '<https://repo.grails.org/grails/restricted>'
        }
    }
    
    dependencies {
        profile "org.apache.grails.profiles:web"
        developmentOnly "org.springframework.boot:spring-boot-devtools" // Spring Boot DevTools may cause performance slowdowns or compatibility issues on larger applications
        testAndDevelopmentOnly "org.webjars.npm:bootstrap"
        testAndDevelopmentOnly "org.webjars.npm:bootstrap-icons"
        testAndDevelopmentOnly "org.webjars.npm:jquery"
        implementation platform("org.apache.grails:grails-bom:$grailsVersion")
        [...]
        implementation "org.springframework.boot:spring-boot-starter-validation"
        console "org.apache.grails:grails-console"
        runtimeOnly "org.fusesource.jansi:jansi"
        [...]
        testImplementation "org.testcontainers:testcontainers"
    }
    
    compileJava.options.release = 17
    
    tasks.withType(Test) {
        useJUnitPlatform()
    }
    When IntelliJ syncs the project I get the error
    Copy code
    A problem occurred evaluating root project 'grails7_grailsforge'.
    > Plugin with id 'org.apache.grails.gradle.grails-web' not found.
    The same occurs for the other 2
    apply plugin:
    statements. If I comment them, I get another error
    Copy code
    > Could not find method profile() for arguments [org.apache.grails.profiles:web] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
    and then the same
    Could not find method
    error occurs for
    developmentOnly
    ,
    testAndDevelopmentOnly
    and
    console
    methods. What am I missing here? Thanks in advance for any advice!
    j
    j
    • 3
    • 12
  • u

    user

    08/14/2025, 12:08 AM
    Hey everyone, I am using grails 6.2.2. I am facing an issue where the views in the plugin are not updated when I make changes to them. If I make changes to the view in a plugin the. I have to restart the whole app. However, the views in the main project are updated. Is there anyway I can fix this issue?
    j
    • 2
    • 1
  • n

    ngraff

    08/15/2025, 9:18 PM
    Hello, in the process of upgrading from Grails 6 to Grails 7.0.0-RC1. Running into this below exception from our SQL Server database with Grails 7, but not with Grails 6. We are using multiple data sources defined in application.groovy. For this specific [blah] data source, we are using 2 different schemas with a default_schema of dbo. Either schema being used is defined in its proper domain. For Grails 7, is there was some kind of update in gorm where we need to specifically define schema level multi tenancy where we did not have to in Grails 6?
    Copy code
    Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.grails.orm.hibernate.HibernateDatastore]: Constructor threw exception
    Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.grails.orm.hibernate.HibernateDatastore]: Constructor threw exception
    
    	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:223)
    	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:146)
    	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:318)
    	... 120 common frames omitted
    Caused by: org.grails.datastore.mapping.core.exceptions.ConfigurationException: DataSource not found for name [blah] in configuration. Please check your multiple data sources configuration and try again.
    Caused by: org.grails.datastore.mapping.core.exceptions.ConfigurationException: DataSource not found for name [blah] in configuration. Please check your multiple data sources configuration and try again.
    
    	at org.grails.orm.hibernate.HibernateDatastore.getDatastoreForConnection(HibernateDatastore.java:363)
    	at org.grails.orm.hibernate.HibernateGormEnhancer.getStaticApi(HibernateGormEnhancer.groovy:51)
    	at org.grails.datastore.gorm.GormEnhancer.registerEntity(GormEnhancer.groovy:141)
    	at org.grails.datastore.gorm.GormEnhancer.<init>(GormEnhancer.groovy:124)
    	at org.grails.orm.hibernate.HibernateGormEnhancer.<init>(HibernateGormEnhancer.groovy:45)
    	at org.grails.orm.hibernate.HibernateDatastore.initialize(HibernateDatastore.java:445)
    	at org.grails.orm.hibernate.HibernateDatastore.<init>(HibernateDatastore.java:180)
    	at org.grails.orm.hibernate.HibernateDatastore.<init>(HibernateDatastore.java:216)
    j
    • 2
    • 1