@@ -66,15 +66,14 @@ dependencies {
6666 exclude module : " logback-classic"
6767 }
6868
69- // 1.2.1 will be published soon, and then we'll switch to that
70- testImplementation ' com.marklogic:marklogic-junit5:1.2.1'
69+ testImplementation ' com.marklogic:marklogic-junit5:1.3.0'
7170
7271 testImplementation " org.apache.kafka:connect-api:${ kafkaVersion} "
7372 testImplementation " org.apache.kafka:connect-json:${ kafkaVersion} "
7473 testImplementation ' net.mguenther.kafka:kafka-junit:3.2.2'
7574
7675 // Forcing logback to be used for test logging
77- testImplementation " ch.qos.logback:logback-classic:1.2.11 "
76+ testImplementation " ch.qos.logback:logback-classic:1.3.5 "
7877 testImplementation " org.slf4j:jcl-over-slf4j:1.7.36"
7978
8079 documentation files(' LICENSE.txt' )
@@ -184,7 +183,17 @@ task connectorArchive_CopyDocumentationToBuildDirectory(type: Copy, group: confl
184183task connectorArchive_CopyDependenciesToBuildDirectory (type : Copy , group : confluentArchiveGroup, dependsOn : jar) {
185184 description = " Copy the dependency jars into the lib folder"
186185 from jar
187- from configurations. runtimeClasspath. findAll { it. name. endsWith(' jar' ) }
186+ // Confluent already includes the Jackson dependencies that this connector depends on. If the connector includes any
187+ // itself, and the DHF integration is used with the sink connector, then the following error will occur when DHF
188+ // tries to connect to the Manage API of MarkLogic:
189+ // java.lang.ClassCastException: com.fasterxml.jackson.datatype.jdk8.Jdk8Module cannot be cast to com.fasterxml.jackson.databind.Module
190+ // at org.springframework.http.converter.json.Jackson2ObjectMapperBuilder.registerWellKnownModulesIfAvailable(Jackson2ObjectMapperBuilder.java:849)
191+ // stackoverflow indicates this may be due to multiple copies of Jackson being on the classpath, as Jdk8Module
192+ // otherwise should be castable to Module.
193+ // Testing has verified that excluding all "jackson-" jars still results in the connector working properly with
194+ // Confluent 7.3.1. This has no impact on using the connector with plain Apache Kafka which does not rely on
195+ // constructing this connector archive.
196+ from configurations. runtimeClasspath. findAll { it. name. endsWith(' jar' ) && ! it. name. startsWith(" jackson-" )}
188197 into " ${ baseArchiveBuildDir} /${ baseArchiveName} /lib"
189198}
190199
0 commit comments