giangio
11/10/2025, 9:41 PMmatt.aguirre
11/10/2025, 10:06 PMSavyX
11/12/2025, 1:15 PMuser
11/12/2025, 5:55 PMuser
11/12/2025, 8:16 PMjava.lang.IllegalStateException: Close not supported from UNINITIALIZED
I am creating the cache beans like this
@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?rss
11/14/2025, 1:54 AMuser
11/14/2025, 2:24 PMjdaugherty
11/14/2025, 2:24 PMuser
11/17/2025, 4:12 AMprecompiledGspMap 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.
// 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.Fernando henrique
11/17/2025, 12:20 PMlraynal
11/17/2025, 4:32 PMysb33r
11/18/2025, 12:02 PMMike Saubier
11/24/2025, 3:30 PMmatt.aguirre
11/24/2025, 3:36 PMrss
11/24/2025, 3:44 PMuser
11/26/2025, 12:11 PMuser
11/26/2025, 1:50 PMuser
11/26/2025, 2:03 PMuser
11/26/2025, 2:05 PMuser
11/26/2025, 3:10 PMuser
11/26/2025, 4:20 PMprivate void printDataSourceConfiguration(String stage) {
<http://log.info|log.info>("Stage: ${stage}")
try {
// Unwrap if it's a TransactionAwareDataSourceProxy
DataSource actualDataSource = dataSource
actualDataSource = ((TransactionAwareDataSourceProxy) dataSource).getTargetDataSource()
def connection = actualDataSource.getConnection()
def metaData = connection.getMetaData()
<http://log.info|log.info>(" Database URL: ${metaData.getURL()}")
<http://log.info|log.info>(" Database Product: ${metaData.getDatabaseProductName()} ${metaData.getDatabaseProductVersion()}")
<http://log.info|log.info>(" Driver: ${metaData.getDriverName()} ${metaData.getDriverVersion()}")
connection.close()
} catch (Exception e) {
log.warn(" -> Could not extract connection metadata: ${e.message}")
}
}
what is the object I have to get data from?James Fredley
11/26/2025, 9:57 PMgiangio
11/27/2025, 10:14 AMincludes.js file:
// From Grails 7 included webjars
//= require webjars/dist/jquery.js
//= require webjars/dist/js/bootstrap.bundle.js
In the view:
<asset:javascript src="includes.js"/>
This is my build.radle :
assets {
minifyCss = true
minifyJs = true
minifyOptions = [
//SIMPLE (default) or ADVANCED or WHITESPACE_ONLY
optimizationLevel: "SIMPLE",
]
excludes = [
'webjars/jquery/**',
'webjars/bootstrap/**',
'webjars/bootstrap-icons/**',
]
includes = [
'webjars/jquery/*/dist/jquery.js',
'webjars/bootstrap/*/dist/js/bootstrap.bundle.js',
'webjars/bootstrap/*/dist/css/bootstrap.css',
]
}
They are not included. Building a jar shows:
11:06:33.369 [pool-1-thread-2] WARN asset.pipeline.DirectiveProcessor -- Unable to Locate Asset: /webjars/dist/jquery.js
11:06:33.372 [pool-1-thread-2] WARN asset.pipeline.DirectiveProcessor -- Unable to Locate Asset: /webjars/dist/js/bootstrap.bundle.js
11:06:36.139 [pool-1-thread-10] WARN asset.pipeline.DirectiveProcessor -- Unable to Locate Asset: /webjars/dist/jquery.js
11:06:36.140 [pool-1-thread-10] WARN asset.pipeline.DirectiveProcessor -- Unable to Locate Asset: /webjars/dist/js/bootstrap.bundle.js
11:06:36.567 [pool-1-thread-4] WARN asset.pipeline.DirectiveProcessor -- Unable to Locate Asset: /webjars/dist/css/bootstrap.css
11:06:39.512 [pool-1-thread-8] WARN asset.pipeline.DirectiveProcessor -- Unable to Locate Asset: /webjars/dist/css/bootstrap.css
What am I doing wrong?giangio
11/27/2025, 10:23 AMjar with the hash:rss
11/27/2025, 10:04 PMuser
11/28/2025, 1:05 PMConverterNotFoundException: No converter found capable of converting from type [org.hibernate.criterion.DetachedCriteria] to type [java.lang.Long]user
11/28/2025, 1:13 PMinList("property", mySubQuery) I'm given an error:
ConverterNotFoundException: No converter found capable of converting from type [org.hibernate.criterion.DetachedCriteria] to type [java.lang.Long]
This is usually when there is some nesting of associations, but I haven't been able to extract a simple reproducible case from our application.
The issue arises in AbstractHibernateCriterionAdapter as follows
protected void applySubCriteriaToJunction(PersistentEntity entity, AbstractHibernateQuery hibernateCriteria, List<Query.Criterion> existing,
Junction conjunction, String alias) {
for (Query.Criterion subCriterion : existing) {
if (subCriterion instanceof Query.PropertyCriterion) {
Query.PropertyCriterion pc = (Query.PropertyCriterion) subCriterion;
if (pc.getValue() instanceof QueryableCriteria) {
pc.setValue(toHibernateDetachedCriteria(hibernateCriteria, (QueryableCriteria<?>) pc.getValue()));
}
else {
AbstractHibernateQuery.doTypeConversionIfNeccessary(entity, pc);
}
}
Here, pc.getValue() is an already converted Hibernate DetatchedCriteria, not the original Gorm DetachedCriteria - it looks like the gorm original has been converted, but I've yet been unable to trace where and when.
the Hibernate converted DC is not instanceof QueryableCriterion and so the engine looks instead to convert to a list of scalars.
Does anyone have any initial thoughts on bug/limitation or feature here?Steve Osguthorpe
11/28/2025, 1:51 PMpc.setValue(toHibernateDetachedCriteria(hibernateCriteria, (QueryableCriteria<?>) pc.getValue())); mutates the original, any subsequent usage would cause the error you are seeing.
I don't think the "why" it was already converted is really important here though, if it CAN happen then this code should be changed to accommodate that and skip values already of the Hibernate Criteria types, I think you should file a bug.~user
11/28/2025, 1:53 PMilPittiz
11/28/2025, 5:14 PMprofile: web) and multiple plugins (profile: plugin).
I’m trying to better understand if a multi-project build would fit my needs: I’m thinking of having 2 separate web-apps, sharing a bunch of code that I’d organize in one or more plugins.
If this is doable, what would ./gradlew assemble include in the .war archive? Both web-apps + all my plugins? Would ./gradlew appName:assemble create a .war for a single web-app?