Issues building custom Java connector

Summary

When trying to build a newly created Java destination connector, the buildConnectorImage task fails with an error related to the connector name. User also had to modify the generated code due to compilation errors.


Question

Hello there :wave:. I juste started to use airbyte, and I need to build a custom Java connector, but I have some issues with that task. Thanks for your help !

When i’m trying to build a newly created Java destination connector (as described https://docs.airbyte.com/connector-development/tutorials/building-a-java-destination#step-2-build-the-newly-generated-destination|here), the buildConnectorImage task fails with the following error: Error: Invalid value for '--name': 'destination-batch' is not one of 'source-recharge', 'source-square', [...]. The failing command is: /Users/alex/Library/Caches/pypoetry/virtualenvs/pipelines-W9gxt-Nu-py3.10/bin/airbyte-ci connectors --name=destination-batch --disable-report-auto-open build --use-host-gradle-dist-tar.

I’m not sure what I might have done wrong. Also, I had to modify a couple things in the generated code because it would not compile (wrong import and wrong parameter count in a method).



This topic has been created from a Slack thread to give it more visibility.
It will be on Read-Only mode here. Click here if you want to access the original thread.

Join the conversation on Slack

["custom-java-connector", "build-connector-image", "error", "compilation", "connector-development"]

Based on the information provided in the extracts, it seems like you’re encountering an issue with building your custom Java connector. Here are a few steps you can follow to troubleshoot: 1. Check your Docker setup: Some users have reported issues with Docker when building connectors. Make sure Docker is running properly on your machine. If you’re using a Mac, check this discussion for potential issues with Apple Silicon (M1) chips. 2. Check your Java version: Make sure you’re using a compatible Java version. The command java -version can help you verify this. 3. Check your connector’s dependencies: Airbyte uses Gradle to manage Java dependencies. Make sure all dependencies for your connector are correctly managed in the build.gradle file inside your connector’s directory. 4. Check your connector’s Dockerfile: Some connectors have custom Dockerfiles for the installation of system dependencies. Make sure your Dockerfile is correctly set up. 5. Try building the connector locally: You can try to build your connector locally with docker build . -t airbyte/your-connector:dev. This will also build airbyte/integration-base-java:dev. If this succeeds, there might be something incompatible with your environment in the Gradle tasks. If you’re still encountering issues, it would be helpful to have more specific details about the error messages you’re seeing. You can also refer to the Airbyte documentation or ask for help in the Airbyte community forum.