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

Samael Bate commented on FLINK-32237:
-------------------------------------

I was under the impression that users should make use of the shaded 
dependencies to make sure that things work smoothly. At least that has been 
recommended to me in the past. If this is not the case then that makes things 
much simpler. Thanks for confirming

> add jackson-module-kotlin to Jackson packages that get shaded
> -------------------------------------------------------------
>
>                 Key: FLINK-32237
>                 URL: https://issues.apache.org/jira/browse/FLINK-32237
>             Project: Flink
>          Issue Type: Improvement
>    Affects Versions: 1.17.1
>            Reporter: Samael Bate
>            Priority: Major
>
> Because of the shaded Jackson packages having their package names prefixed, 
> such as 
> {_}org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.json.JsonMapper{_},
>  when writing a Flink project in Kotlin I am unable to register the 
> _KotlinModule_ or use {_}jacksonObjectMapper(){_}.
>  
> It would be great if these classes were repackaged using the same using the 
> same _org.apache.flink.shaded.jackson2.*_ prefix:
> {code:java}
> import com.fasterxml.jackson.module.kotlin.KotlinModule
> import com.fasterxml.jackson.module.kotlin.jacksonMapperBuilder
> import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper {code}
>  
> Due to the mismatch in package names I can do neither of the following:
> {code:java}
> val jsonMapper = jacksonMapperBuilder()
>     .addModule(JavaTimeModule())
>     .build() {code}
> or
> {code:java}
> val jsonMapper = JsonMapper()
>     .registerModule(KotlinModule()) {code}
> the Kotlin module inherits from {{com.fasterxml.jackson.databind.Module}} and 
> the re-packaged ones are inheriting from 
> {{{}[org.apache.flink.shaded.jackson2.com|http://org.apache.flink.shaded.jackson2.com/]{}}}{{{}.fasterxml.jackson.databind.Module{}}}.
>  
> For now I can work around this with a wrapper class but it would be nice to 
> have this available out of the box.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to