-
Hi everyone, I'm working on integrating PLC4X (version 0.13.0-SNAPSHOT) as a Kafka Connect source connector for industrial data collection. I’m running everything in Docker and have built a fat JAR that includes all drivers (S7, Modbus, etc.). However, I’m consistently hitting the following issues: Problems Encountered1. Connection String Format Errors
2. Driver Registration
3. Plugin Directory and Classloader
4. Version Consistency
What I’ve Tried
Background
Questions for the Community
Any help or suggestions would be greatly appreciated! If you need more logs, my config, or Docker setup details, I can provide them. Thanks in advance! Let me know if you want to add more technical details or logs, or if you want this tailored for a specific repository or issue tracker. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Are you basing your work on the existing, but old Kafka Connect adapter in the plc4x-extras repo, or is this a completely new approach? But I think you are using the existing one. With fat jars there always is a problem on how they are created. While you can simply merge the driver code without problems, as all drivers are located in separate packages, there usually are issues if you create a fat jar with multiple drivers when it comes to the resource files PLC4X uses to locate drivers. Here all jars have the same file "META-INF/services/org.apache.plc4x.java.api.PlcDriver" ... I think per default either the first file with that name is used and the others are dropped. This results in PLC4X only finding one driver. You should have a look at your fat jar and inspect this file and double check all drivers are listed. There is however an option to have the plugins merge the resource files, but you need to use plugins for the plugins for that. See here: Hope that helps. |
Beta Was this translation helpful? Give feedback.
Are you basing your work on the existing, but old Kafka Connect adapter in the plc4x-extras repo, or is this a completely new approach? But I think you are using the existing one.
With fat jars there always is a problem on how they are created. While you can simply merge the driver code without problems, as all drivers are located in separate packages, there usually are issues if you create a fat jar with multiple drivers when it comes to the resource files PLC4X uses to locate drivers. Here all jars have the same file "META-INF/services/org.apache.plc4x.java.api.PlcDriver" ... I think per default either the first file with that name is used and the others are dropped. This results in PLC…