Quarkus Kafka使用者无法在纯模式下工作

时间:2019-05-23 15:42:34

标签: apache-kafka graalvm quarkus

我有一个Quarkus Kafka使用者。在VM模式下,效果很好。

使用以下命令构建本机运行器后: ./mvnw软件包-Pnative

当我在纯模式下运行时,我有一个例外:

2019-05-23 17:17:42,340 ERROR [io.sma.rea.mes.imp.LegacyConfiguredStreamFactory] (main) Unable to create the publisher or subscriber during initialization: java.lang.IllegalArgumentException: java.lang.reflect.InvocationTargetException
        at io.smallrye.config.ImplicitConverters$StaticMethodConverter.convert(ImplicitConverters.java:99)
        at io.smallrye.config.SmallRyeConfig.convert(SmallRyeConfig.java:133)
        at io.smallrye.config.SmallRyeConfig.getValue(SmallRyeConfig.java:76)
        at io.smallrye.reactive.messaging.impl.ConnectorConfig.getValue(ConnectorConfig.java:57)
        at io.smallrye.reactive.messaging.spi.ConfigurationHelper.asJsonObject(ConfigurationHelper.java:51)
        at io.smallrye.reactive.messaging.kafka.KafkaSource.<init>(KafkaSource.java:35)
        at io.smallrye.reactive.messaging.kafka.KafkaMessagingProvider.getPublisherBuilder(KafkaMessagingProvider.java:40)
        at io.smallrye.reactive.messaging.kafka.KafkaMessagingProvider_ClientProxy.getPublisherBuilder(Unknown Source)
        at io.smallrye.reactive.messaging.impl.LegacyConfiguredStreamFactory.createPublisherBuilder(LegacyConfiguredStreamFactory.java:119)
        at io.smallrye.reactive.messaging.impl.LegacyConfiguredStreamFactory.lambda$initialize$2(LegacyConfiguredStreamFactory.java:100)
        at java.util.HashMap.forEach(HashMap.java:1289)
        at io.smallrye.reactive.messaging.impl.LegacyConfiguredStreamFactory.initialize(LegacyConfiguredStreamFactory.java:100)
        at io.smallrye.reactive.messaging.impl.LegacyConfiguredStreamFactory_ClientProxy.initialize(Unknown Source)
        at java.util.Iterator.forEachRemaining(Iterator.java:116)
        at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
        at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580)
        at io.smallrye.reactive.messaging.extension.MediatorManager.initializeAndRun(MediatorManager.java:103)
        at io.smallrye.reactive.messaging.extension.MediatorManager_ClientProxy.initializeAndRun(Unknown Source)
        at io.quarkus.smallrye.reactivemessaging.runtime.SmallRyeReactiveMessagingLifecycle.onApplicationStart(SmallRyeReactiveMessagingLifecycle.java:18)
        at io.quarkus.smallrye.reactivemessaging.runtime.SmallRyeReactiveMessagingLifecycle_Observer_onApplicationStart_4e8937813d9e8faff65c3c07f88fa96615b70e70.notify(Unknown Source)
        at io.quarkus.arc.EventImpl$Notifier.notify(EventImpl.java:244)
        at io.quarkus.arc.EventImpl.fire(EventImpl.java:85)
        at io.quarkus.arc.runtime.LifecycleEventRunner.fireStartupEvent(LifecycleEventRunner.java:39)
        at io.quarkus.arc.runtime.ArcDeploymentTemplate.handleLifecycleEvents(ArcDeploymentTemplate.java:115)
        at io.quarkus.deployment.steps.LifecycleEventsBuildStep$startupEvent20.deploy(Unknown Source)
        at io.quarkus.runner.ApplicationImpl1.doStart(Unknown Source)
        at io.quarkus.runtime.Application.start(Application.java:101)
        at io.quarkus.runtime.Application.run(Application.java:213)
        at io.quarkus.runner.GeneratedMain.main(Unknown Source)
Caused by: java.lang.reflect.InvocationTargetException
        at java.lang.reflect.Method.invoke(Method.java:498)
        at io.smallrye.config.ImplicitConverters$StaticMethodConverter.convert(ImplicitConverters.java:97)
        ... 28 more
Caused by: java.lang.NumberFormatException: For input string: "org.apache.kafka.common.serialization.StringDeserializer"
        at java.lang.Integer.parseInt(Integer.java:580)
        at java.lang.Integer.valueOf(Integer.java:766)
        ... 30 more

1 个答案:

答案 0 :(得分:1)

这是一个2221的错误PR,自版本0.16起已经修复。

尝试任何新的Quarkus版本进行修复。