[ 
https://issues.apache.org/jira/browse/BEAM-13526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17464424#comment-17464424
 ] 

Arkadiusz Gasinski commented on BEAM-13526:
-------------------------------------------

So I built a version of the Java Kafka IO SDK where I added a public modifier 
to the DeserializerProvider interface and it worked like a charm, that is no 
IllegalAccessError and I was able to deserialize incoming messages by means of 
the ConfluentSchemaRegistryDeserialzerProvider class.

Shall I raise a PR with the public modifier added to the interface definition, 
or there's more to the story that I'm not aware of?

> Unable to use the KafkaIO.Read.withValueDeserializer(DeserializerProvider) 
> method
> ---------------------------------------------------------------------------------
>
>                 Key: BEAM-13526
>                 URL: https://issues.apache.org/jira/browse/BEAM-13526
>             Project: Beam
>          Issue Type: Bug
>          Components: io-java-kafka
>    Affects Versions: 2.34.0
>            Reporter: Arkadiusz Gasinski
>            Priority: P2
>
> I'm trying to configure my pipeline to read AVRO-encoded messages from Kafka 
> with deserialization delegated to the 
> ConfluentSchemaRegistryDeserialzerProvider, and I'm getting the following 
> error:
> Exception in thread "main" java.lang.IllegalAccessError: failed to access 
> class org.apache.beam.sdk.io.kafka.DeserializerProvider from class MyClass 
> (both are in unnamed module of loader 'app')
> The way I configure the KafkaIO.Read is like:
> {code:java}
> KafkaIO.read<String, GenericRecord>()
>     .withBootstrapServers(...)
>     .withKeyDeserializer(StringDeserializer::class.java)
>     
> .withValueDeserializer(ConfluentSchemaRegistryDeserializerProvider.of<GenericRecord>(...)
>     .withTopic(...)
>     ...{code}
> I checked the DeserializerProvider interface and it's package private - it's 
> not even listed in the official java docs for Beam 
> (https://beam.apache.org/releases/javadoc/2.34.0/org/apache/beam/sdk/io/kafka/package-summary.html);
>  the ConfluentSchemaRegistryDeserialzerProvider is public.
> Am I the only one trying to use this API, or am I doing sth terribly wrong?
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to