rss
07/21/2025, 4:44 PMJohn Moore
07/21/2025, 6:45 PMimplementation '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)?John Moore
07/22/2025, 12:02 PMrss
07/23/2025, 3:24 AMcjchalmers
07/23/2025, 2:54 PMJohn Moore
07/23/2025, 6:20 PMcjchalmers
07/24/2025, 2:24 PMRunwolf
07/24/2025, 2:34 PMJohn Moore
07/24/2025, 3:58 PMJohn Moore
07/24/2025, 5:37 PMJohn Moore
07/24/2025, 5:45 PMDylan Kolson
07/24/2025, 6:01 PMJohn Moore
07/25/2025, 9:51 AMrss
07/25/2025, 9:14 PMuser
07/29/2025, 7:28 PM<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
<%@ 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.3Dylan Kolson
07/31/2025, 5:08 PMDescription:
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
Robert B. Davis
07/31/2025, 10:49 PMuser
08/04/2025, 4:44 PMgrails dev war
) without any front-end files that I don’t need.
• First, I tried excluding them in Config.groovy
using:
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:
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?Felipe
08/04/2025, 6:12 PM| 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?ngraff
08/05/2025, 5:09 PMgaolei
08/07/2025, 2:42 AMgradle build.
It failed with this error:
> 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
./gradlw build
It failed with this error:
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?Onats Ong
08/08/2025, 12:39 AMSlackbot
08/08/2025, 12:39 AMAllison Martin
08/08/2025, 9:06 PMplugin:
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
lraynal
08/12/2025, 11:52 AMrss
08/12/2025, 6:34 PMuser
08/13/2025, 1:05 PMgrails dev war
For some builds, I’d like to exclude asset files. I tried using the following command:
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?ilPittiz
08/13/2025, 2:31 PMbuild.gradle
is this
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
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
> 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!user
08/14/2025, 12:08 AMngraff
08/15/2025, 9:18 PMCaused 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)