You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2022/04/21 14:10:36 UTC

[GitHub] [camel-quarkus] sed108 commented on issue #2939: URL to the Kafka brokers must be configured with the brokers option after upgrade to Quarkus 2.1.0.Final

sed108 commented on issue #2939:
URL: https://github.com/apache/camel-quarkus/issues/2939#issuecomment-1105265927

   The workaround suggested above no longer seems to work with quarkus 2.8.0 and camel 3.16.0
   
   When using the suggested new line in `application.properties`:
   `camel.component.kafka.brokers=${kafka.bootstrap.servers:${brokers}}`
   
   The following error was received:
   ```
   [INFO] Running org.acme.kafka.KafkaTest
   2022-04-21 09:35:03,922 INFO  [org.jbo.threads] (main) JBoss Threads version 3.4.2.Final
   2022-04-21 09:35:05,728 INFO  [org.tes.doc.DockerClientProviderStrategy] (build-41) Loaded org.testcontainers.dockerclient.UnixSocketClientProviderStrategy from ~/.testcontainers.properties, will try it first
   2022-04-21 09:35:06,554 INFO  [org.tes.doc.DockerClientProviderStrategy] (build-41) Found Docker environment with local Unix socket (unix:///var/run/docker.sock)
   2022-04-21 09:35:06,556 INFO  [org.tes.DockerClientFactory] (build-41) Docker host IP address is localhost
   2022-04-21 09:35:06,686 INFO  [org.tes.DockerClientFactory] (build-41) Connected to docker: 
     Server Version: 20.10.13
     API Version: 1.41
     Operating System: Ubuntu 20.04.4 LTS
     Total Memory: 15967 MB
   2022-04-21 09:35:06,694 INFO  [org.tes.uti.ImageNameSubstitutor] (build-41) Image name substitution will be performed by: DefaultImageNameSubstitutor (composite of 'ConfigurationFileImageNameSubstitutor' and 'PrefixingImageNameSubstitutor')
   2022-04-21 09:35:07,823 INFO  [org.tes.DockerClientFactory] (build-41) Ryuk started - will monitor and terminate Testcontainers containers on JVM exit
   2022-04-21 09:35:07,824 INFO  [org.tes.DockerClientFactory] (build-41) Checking the system...
   2022-04-21 09:35:07,825 INFO  [org.tes.DockerClientFactory] (build-41) ✔︎ Docker server version should be at least 1.6.0
   2022-04-21 09:35:07,978 INFO  [org.tes.DockerClientFactory] (build-41) ✔︎ Docker environment should have more than 2GB free disk space
   2022-04-21 09:35:08,056 INFO  [🐳 .io/.11.3]] (build-41) Creating container for image: docker.io/vectorized/redpanda:v21.11.3
   2022-04-21 09:35:08,362 INFO  [🐳 .io/.11.3]] (build-41) Container docker.io/vectorized/redpanda:v21.11.3 is starting: 6df98a93ccb0ee4f70a54f4d6eb6b73b31e06976b3148eb3cda0e562b8025a20
   2022-04-21 09:35:10,156 INFO  [🐳 .io/.11.3]] (build-41) Container docker.io/vectorized/redpanda:v21.11.3 started in PT2.148818S
   2022-04-21 09:35:10,158 INFO  [io.qua.kaf.cli.dep.DevServicesKafkaProcessor] (build-41) Dev Services for Kafka started. Other Quarkus applications in dev mode will find the broker automatically. For Quarkus applications in production mode, you can connect to this by starting your application with -Dkafka.bootstrap.servers=OUTSIDE://localhost:50552
   [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 10.878 s <<< FAILURE! - in org.acme.kafka.KafkaTest
   [ERROR] testKafka  Time elapsed: 0.024 s  <<< ERROR!
   java.lang.RuntimeException: 
   java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
   	[error]: Build step org.apache.camel.quarkus.component.kafka.deployment.KafkaProcessor#configureKafkaComponentForDevServices threw an exception: java.util.NoSuchElementException: SRCFG00011: Could not expand value brokers in property camel.component.kafka.brokers
   	at io.smallrye.config.ExpressionConfigSourceInterceptor.lambda$getValue$0(ExpressionConfigSourceInterceptor.java:63)
   	at io.smallrye.common.expression.ExpressionNode.emit(ExpressionNode.java:22)
   	at io.smallrye.common.expression.CompositeNode.emit(CompositeNode.java:22)
   	at io.smallrye.common.expression.ResolveContext.emitToBuilder(ResolveContext.java:69)
   	at io.smallrye.common.expression.ResolveContext.expandDefault(ResolveContext.java:56)
   	at io.smallrye.common.expression.ResolveContext.expandDefault(ResolveContext.java:84)
   	at io.smallrye.config.ExpressionConfigSourceInterceptor.lambda$getValue$0(ExpressionConfigSourceInterceptor.java:61)
   	at io.smallrye.common.expression.ExpressionNode.emit(ExpressionNode.java:22)
   	at io.smallrye.common.expression.Expression.evaluateException(Expression.java:56)
   	at io.smallrye.common.expression.Expression.evaluate(Expression.java:70)
   	at io.smallrye.config.ExpressionConfigSourceInterceptor.getValue(ExpressionConfigSourceInterceptor.java:56)
   	at io.smallrye.config.ExpressionConfigSourceInterceptor.getValue(ExpressionConfigSourceInterceptor.java:36)
   	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
   	at io.smallrye.config.FallbackConfigSourceInterceptor.getValue(FallbackConfigSourceInterceptor.java:24)
   	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
   	at io.smallrye.config.PropertyNamesConfigSourceInterceptor.getValue(PropertyNamesConfigSourceInterceptor.java:61)
   	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
   	at io.smallrye.config.SmallRyeConfig.getConfigValue(SmallRyeConfig.java:305)
   	at io.smallrye.config.SmallRyeConfig.getValue(SmallRyeConfig.java:223)
   	at io.smallrye.config.SmallRyeConfig.getOptionalValue(SmallRyeConfig.java:322)
   	at org.apache.camel.quarkus.component.kafka.deployment.KafkaProcessor.configureKafkaComponentForDevServices(KafkaProcessor.java:73)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
   	at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:925)
   	at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
   	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
   	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
   	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
   	at java.base/java.lang.Thread.run(Thread.java:829)
   	at org.jboss.threads.JBossThread.run(JBossThread.java:501)
   
   Caused by: java.lang.RuntimeException: 
   io.quarkus.builder.BuildException: Build failure: Build failed due to errors
   	[error]: Build step org.apache.camel.quarkus.component.kafka.deployment.KafkaProcessor#configureKafkaComponentForDevServices threw an exception: java.util.NoSuchElementException: SRCFG00011: Could not expand value brokers in property camel.component.kafka.brokers
   	at io.smallrye.config.ExpressionConfigSourceInterceptor.lambda$getValue$0(ExpressionConfigSourceInterceptor.java:63)
   	at io.smallrye.common.expression.ExpressionNode.emit(ExpressionNode.java:22)
   	at io.smallrye.common.expression.CompositeNode.emit(CompositeNode.java:22)
   	at io.smallrye.common.expression.ResolveContext.emitToBuilder(ResolveContext.java:69)
   	at io.smallrye.common.expression.ResolveContext.expandDefault(ResolveContext.java:56)
   	at io.smallrye.common.expression.ResolveContext.expandDefault(ResolveContext.java:84)
   	at io.smallrye.config.ExpressionConfigSourceInterceptor.lambda$getValue$0(ExpressionConfigSourceInterceptor.java:61)
   	at io.smallrye.common.expression.ExpressionNode.emit(ExpressionNode.java:22)
   	at io.smallrye.common.expression.Expression.evaluateException(Expression.java:56)
   	at io.smallrye.common.expression.Expression.evaluate(Expression.java:70)
   	at io.smallrye.config.ExpressionConfigSourceInterceptor.getValue(ExpressionConfigSourceInterceptor.java:56)
   	at io.smallrye.config.ExpressionConfigSourceInterceptor.getValue(ExpressionConfigSourceInterceptor.java:36)
   	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
   	at io.smallrye.config.FallbackConfigSourceInterceptor.getValue(FallbackConfigSourceInterceptor.java:24)
   	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
   	at io.smallrye.config.PropertyNamesConfigSourceInterceptor.getValue(PropertyNamesConfigSourceInterceptor.java:61)
   	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
   	at io.smallrye.config.SmallRyeConfig.getConfigValue(SmallRyeConfig.java:305)
   	at io.smallrye.config.SmallRyeConfig.getValue(SmallRyeConfig.java:223)
   	at io.smallrye.config.SmallRyeConfig.getOptionalValue(SmallRyeConfig.java:322)
   	at org.apache.camel.quarkus.component.kafka.deployment.KafkaProcessor.configureKafkaComponentForDevServices(KafkaProcessor.java:73)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
   	at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:925)
   	at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
   	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
   	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
   	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
   	at java.base/java.lang.Thread.run(Thread.java:829)
   	at org.jboss.threads.JBossThread.run(JBossThread.java:501)
   
   Caused by: io.quarkus.builder.BuildException: 
   Build failure: Build failed due to errors
   	[error]: Build step org.apache.camel.quarkus.component.kafka.deployment.KafkaProcessor#configureKafkaComponentForDevServices threw an exception: java.util.NoSuchElementException: SRCFG00011: Could not expand value brokers in property camel.component.kafka.brokers
   	at io.smallrye.config.ExpressionConfigSourceInterceptor.lambda$getValue$0(ExpressionConfigSourceInterceptor.java:63)
   	at io.smallrye.common.expression.ExpressionNode.emit(ExpressionNode.java:22)
   	at io.smallrye.common.expression.CompositeNode.emit(CompositeNode.java:22)
   	at io.smallrye.common.expression.ResolveContext.emitToBuilder(ResolveContext.java:69)
   	at io.smallrye.common.expression.ResolveContext.expandDefault(ResolveContext.java:56)
   	at io.smallrye.common.expression.ResolveContext.expandDefault(ResolveContext.java:84)
   	at io.smallrye.config.ExpressionConfigSourceInterceptor.lambda$getValue$0(ExpressionConfigSourceInterceptor.java:61)
   	at io.smallrye.common.expression.ExpressionNode.emit(ExpressionNode.java:22)
   	at io.smallrye.common.expression.Expression.evaluateException(Expression.java:56)
   	at io.smallrye.common.expression.Expression.evaluate(Expression.java:70)
   	at io.smallrye.config.ExpressionConfigSourceInterceptor.getValue(ExpressionConfigSourceInterceptor.java:56)
   	at io.smallrye.config.ExpressionConfigSourceInterceptor.getValue(ExpressionConfigSourceInterceptor.java:36)
   	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
   	at io.smallrye.config.FallbackConfigSourceInterceptor.getValue(FallbackConfigSourceInterceptor.java:24)
   	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
   	at io.smallrye.config.PropertyNamesConfigSourceInterceptor.getValue(PropertyNamesConfigSourceInterceptor.java:61)
   	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
   	at io.smallrye.config.SmallRyeConfig.getConfigValue(SmallRyeConfig.java:305)
   	at io.smallrye.config.SmallRyeConfig.getValue(SmallRyeConfig.java:223)
   	at io.smallrye.config.SmallRyeConfig.getOptionalValue(SmallRyeConfig.java:322)
   	at org.apache.camel.quarkus.component.kafka.deployment.KafkaProcessor.configureKafkaComponentForDevServices(KafkaProcessor.java:73)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
   	at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:925)
   	at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
   	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
   	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
   	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
   	at java.base/java.lang.Thread.run(Thread.java:829)
   	at org.jboss.threads.JBossThread.run(JBossThread.java:501)
   
   Caused by: java.util.NoSuchElementException: SRCFG00011: Could not expand value brokers in property camel.component.kafka.brokers
   ```
   
   Similar errors for variations of the property:
   
   Property: `camel.component.kafka.brokers=${brokers:${kafka.bootstrap.servers}}`
   Error: `Caused by: java.util.NoSuchElementException: SRCFG00011: Could not expand value kafka.bootstrap.servers in property camel.component.kafka.brokers`
   
   Property: `camel.component.kafka.brokers=${kafka.bootstrap.servers}`
   Error: `Caused by: java.util.NoSuchElementException: SRCFG00011: Could not expand value kafka.bootstrap.servers in property camel.component.kafka.brokers`
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org