quarkus: Qute extension conflict Redis-cache extension cause Deployment build time failed

Describe the bug

Mailer extension include Qute extension library that raise Build step failed

Unable to determine the value type for 'qute-cache' Redis cache. An appropriate configuration value for 'quarkus.cache.redis.qute-cache.value-type' needs to be set

pom.xml

<dependency>
	<groupId>io.quarkus</groupId>
	<artifactId>quarkus-mailer</artifactId>
</dependency>

<dependency>
	<groupId>io.quarkus</groupId>
	<artifactId>quarkus-redis-cache</artifactId>
</dependency>
  • Error StackTrace
2023-09-01 17:28:47,798 ERROR [io.qua.dep.dev.IsolatedDevModeMain] (main) Failed to start quarkus: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
	[error]: Build step io.quarkus.cache.redis.deployment.RedisCacheProcessor#determineValueTypes threw an exception: jakarta.enterprise.inject.spi.DeploymentException: Unable to determine the value type for 'qute-cache' Redis cache. An appropriate configuration value for 'quarkus.cache.redis.qute-cache.value-type' needs to be set
	at io.quarkus.cache.redis.deployment.RedisCacheProcessor.determineValueTypes(RedisCacheProcessor.java:97)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:864)
	at io.quarkus.builder.BuildContext.run(BuildContext.java:282)
	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
	at java.base/java.lang.Thread.run(Thread.java:833)
	at org.jboss.threads.JBossThread.run(JBossThread.java:501)

	at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:336)
	at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:253)
	at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:60)
	at io.quarkus.deployment.dev.IsolatedDevModeMain.firstStart(IsolatedDevModeMain.java:82)
	at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:423)
	at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:55)
	at io.quarkus.bootstrap.app.CuratedApplication.runInCl(CuratedApplication.java:138)
	at io.quarkus.bootstrap.app.CuratedApplication.runInAugmentClassLoader(CuratedApplication.java:93)
	at io.quarkus.deployment.dev.DevModeMain.start(DevModeMain.java:131)
	at io.quarkus.deployment.dev.DevModeMain.main(DevModeMain.java:62)
Caused by: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
	[error]: Build step io.quarkus.cache.redis.deployment.RedisCacheProcessor#determineValueTypes threw an exception: jakarta.enterprise.inject.spi.DeploymentException: Unable to determine the value type for 'qute-cache' Redis cache. An appropriate configuration value for 'quarkus.cache.redis.qute-cache.value-type' needs to be set
	at io.quarkus.cache.redis.deployment.RedisCacheProcessor.determineValueTypes(RedisCacheProcessor.java:97)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:864)
	at io.quarkus.builder.BuildContext.run(BuildContext.java:282)
	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
	at java.base/java.lang.Thread.run(Thread.java:833)
	at org.jboss.threads.JBossThread.run(JBossThread.java:501)

	at io.quarkus.builder.Execution.run(Execution.java:123)
	at io.quarkus.builder.BuildExecutionBuilder.execute(BuildExecutionBuilder.java:79)
	at io.quarkus.deployment.QuarkusAugmentor.run(QuarkusAugmentor.java:160)
	at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:332)
	... 9 more
Caused by: jakarta.enterprise.inject.spi.DeploymentException: Unable to determine the value type for 'qute-cache' Redis cache. An appropriate configuration value for 'quarkus.cache.redis.qute-cache.value-type' needs to be set
	at io.quarkus.cache.redis.deployment.RedisCacheProcessor.determineValueTypes(RedisCacheProcessor.java:97)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:864)
	at io.quarkus.builder.BuildContext.run(BuildContext.java:282)
	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
	at java.base/java.lang.Thread.run(Thread.java:833)
	at org.jboss.threads.JBossThread.run(JBossThread.java:501)

Expected behavior

How set set the value or RedisCacheProcessor automatically skip it ?

‘quarkus.cache.redis.qute-cache.value-type’

quarkus:
  cache:
    #caffeine:
    # qute-cache:
    #    value-type: xxx

    redis:
      qute-cache:
        value-type: ???

Actual behavior

https://quarkus.io/guides/qute-reference#cached-section

howt to resolve it ?

  1. specify cache Implementation ?
  2. disable template cache ?
  3. mailer execlude qute ?
  4. or …

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

JDK 17.0.4.1

GraalVM version (if different from Java)

No response

Quarkus version or git rev

3.2.4.Final

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

“qute-cache” from io.quarkus.qute.cache.QuteCache.java

package io.quarkus.qute.cache;

public final class QuteCache {

    /**
     * The name of the cache used to cache parts of templates
     */
    public static final String NAME = "qute-cache";

}

About this issue

  • Original URL
  • State: closed
  • Created 10 months ago
  • Comments: 18 (15 by maintainers)

Commits related to this issue

Most upvoted comments

But i am not sure Qute is working…

I don’t think it is.

…and it shouldn’t choose redis cache if both caffeine and redis exist.

But only one cache implementation can be present, right? We need to enhance the SPI so that it’s possible to detect the cache impl…