[KAFKA-256] errors when trying to run MongoDB Kafka Connector Docker Example Created: 21/Oct/21  Updated: 28/Oct/23  Resolved: 10/Nov/21

Status: Closed
Project: Kafka Connector
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Unknown
Reporter: Dror Mikdash (Inactive) Assignee: Ross Lawley
Resolution: Fixed Votes: 0
Labels: internal-user, kafka-connect
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Case:

 Description   

This issue is similar to KAFKA-233  ,  however installing JDK 11 didnt help

 

when following the instructions in   the MongoDB Kafka Connector Docker Example    on MacOS, as follows :    ./run.sh  

im getting these error messages  :

Building the MongoDB Kafka Connector
> Task :compileBuildConfig FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileBuildConfig'.
> java.lang.IllegalAccessError: class org.gradle.internal.compiler.java.ClassNameCollector (in unnamed module @0xe78eaa9) cannot access class com.sun.tools.javac.code.Symbol$TypeSymbol (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.code to unnamed module @0xe78eaa9
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 809ms
3 actionable tasks: 3 executed

 

 

I have JDK 11 on the mac, and gradle installed on the machine

Would appreciate any advice/assistance 

thanks, Dror



 Comments   
Comment by Ross Lawley [ 04/Nov/21 ]

Hi dror.mikdash,

Gradle (the Java build tool) has been updated on master and should now work with newer versions of Java. This was the underlying cause of the error with docker not working on the mac.

Please could you try again, using the latest master and confirm?

Many thanks,

Ross

Comment by Ross Lawley [ 01/Nov/21 ]

Hi dror.mikdash,

I think even though Java 11 is available it might not be set as the main JDK - so its picking up a later version (possibly Java 17) and this version is causing the build tool (gradle) to fail.

I've created a PR to update the build tool and that should fix the issue. While that is in review and not in the main repo, it can be tested by downloading the fork and seeing if that fixes the issue:

https://github.com/rozza/mongo-kafka/tree/KAFKA-256

All the best,

Ross

Comment by Ross Lawley [ 01/Nov/21 ]

PR: https://github.com/mongodb/mongo-kafka/pull/84

Generated at Thu Feb 08 09:05:57 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.