Skip to content

Commit 2346c0e

Browse files
authored
KAFKA-19495: update native image config for native images (#20150)
We failed the native image build and test workflow [here](https://github.com/apache/kafka/actions/runs/16211393417/job/45772104969). The failed messages are: ``` Exception in thread "main" java.lang.ExceptionInInitializerError at org.apache.kafka.server.config.AbstractKafkaConfig.<clinit>(AbstractKafkaConfig.java:56) at [email protected]/java.lang.Class.ensureInitialized(DynamicHub.java:601) at kafka.tools.StorageTool$.$anonfun$execute$1(StorageTool.scala:79) at scala.Option.flatMap(Option.scala:283) at kafka.tools.StorageTool$.execute(StorageTool.scala:79) at kafka.tools.StorageTool$.main(StorageTool.scala:46) at kafka.docker.KafkaDockerWrapper$.main(KafkaDockerWrapper.scala:57) at kafka.docker.KafkaDockerWrapper.main(KafkaDockerWrapper.scala) at [email protected]/java.lang.invoke.LambdaForm$DMH/sa346b79c.invokeStaticInit(LambdaForm$DMH) Caused by: org.apache.kafka.common.config.ConfigException: Invalid value org.apache.kafka.common.security.oauthbearer.DefaultJwtRetriever for configuration sasl.oauthbearer.jwt.retriever.class: Class org.apache.kafka.common.security.oauthbearer.DefaultJwtRetriever could not be found. at org.apache.kafka.common.config.ConfigDef.parseType(ConfigDef.java:778) at org.apache.kafka.common.config.ConfigDef$ConfigKey.<init>(ConfigDef.java:1271) at org.apache.kafka.common.config.ConfigDef.define(ConfigDef.java:155) at org.apache.kafka.common.config.ConfigDef.define(ConfigDef.java:198) at org.apache.kafka.common.config.ConfigDef.define(ConfigDef.java:237) at org.apache.kafka.common.config.ConfigDef.define(ConfigDef.java:399) at org.apache.kafka.common.config.ConfigDef.define(ConfigDef.java:412) at org.apache.kafka.common.config.internals.BrokerSecurityConfigs.<clinit>(BrokerSecurityConfigs.java:197) ... 9 more ``` After investigation, I found we have to update the native image configs to support the new code change as described [here](https://github.com/apache/kafka/blob/trunk/docker/native/README.md#native-image-reachability-metadata). This PR fixes this issue and verified that the same workflow for native image passed [here](https://github.com/apache/kafka/actions/runs/16215454627/job/45783738496). The PR for v4.1.0 is #20151 . Reviewers: TengYao Chi <[email protected]>
1 parent 2738397 commit 2346c0e

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

docker/native/native-image-configs/reflect-config.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,6 +1023,12 @@
10231023
"name":"org.apache.kafka.common.security.kerberos.KerberosLogin",
10241024
"methods":[{"name":"<init>","parameterTypes":[] }]
10251025
},
1026+
{
1027+
"name":"org.apache.kafka.common.security.oauthbearer.DefaultJwtRetriever"
1028+
},
1029+
{
1030+
"name":"org.apache.kafka.common.security.oauthbearer.DefaultJwtValidator"
1031+
},
10261032
{
10271033
"name":"org.apache.kafka.common.security.plain.PlainLoginModule",
10281034
"methods":[{"name":"<init>","parameterTypes":[] }]
@@ -1067,6 +1073,18 @@
10671073
"name":"org.apache.kafka.metadata.authorizer.StandardAuthorizer",
10681074
"methods":[{"name":"<init>","parameterTypes":[] }]
10691075
},
1076+
{
1077+
"name":"org.apache.kafka.server.logger.LoggingController",
1078+
"queryAllPublicConstructors":true
1079+
},
1080+
{
1081+
"name":"org.apache.kafka.server.logger.LoggingControllerMBean",
1082+
"queryAllPublicMethods":true
1083+
},
1084+
{
1085+
"name":"org.apache.kafka.server.share.persister.DefaultStatePersister",
1086+
"methods":[{"name":"<init>","parameterTypes":["org.apache.kafka.server.share.persister.PersisterStateManager"] }]
1087+
},
10701088
{
10711089
"name":"org.apache.kafka.storage.internals.checkpoint.CleanShutdownFileHandler$Content",
10721090
"allDeclaredFields":true,

0 commit comments

Comments
 (0)