shibd commented on issue #21069:
URL: https://github.com/apache/pulsar/issues/21069#issuecomment-1696683423

   I see. The root cause is you used this lib to deserialize the config map:
   
   ```
           <dependency>
               <groupId>com.fasterxml.jackson.module</groupId>
               <artifactId>jackson-module-kotlin</artifactId>
               <version>${jackson.version}</version>
           </dependency>
   ```
   
   In pulsar io connector framework, we use 
[NarClassLoader](https://github.com/apache/pulsar/blob/82237d3684fe506bcb6426b3b23f413422e6e4fb/pulsar-common/src/main/java/org/apache/pulsar/common/nar/NarClassLoader.java#L127)
 to load classes in the `nar` package. We set it in the context of the thread. 
   
   Perhaps because `jackson-module-kotlin` uses other classLoaders internally.
   
   I updated my repo. You can refer to it:
   
https://github.com/shibd/kotlin-io-example/commit/46f4cf6325afa0ea9587ae8d6abe59d863048397
   
   BTW: It is recommended to use IOConfigUtils to deserialize the config map, 
which will be checked and applied config by `@FieldDoc `.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to