You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Sachin Mittal <sj...@gmail.com> on 2020/01/16 08:42:35 UTC
Kafka connect not loading classes from uber jar
Hi,
I am following the documentation under:
https://kafka.apache.org/documentation/#connect_user
https://docs.confluent.io/current/connect/userguide.html
For testing I am using standalone mode. And I am using kafka_2.12-2.3.1.
So I have defined:
plugin.path=/path/to/plugin/dir
In file: config/connect-standalone.properties
When I run the connect command using:
connect-standalone.bat config/connect-standalone.properties
/path/to/plugin-connect.properties
I get lot of errors like:
org.reflections.ReflectionsException: could not get type for name xxx
....
Caused by: java.lang.ClassNotFoundException:xxx
However in the logs I do see this entry:
INFO Loading plugin from:
/path/to/plugin/dir/kafka-connect-plugin-xxx-all.jar
(org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader)
INFO Reflections took 3801 ms to scan 1 urls, producing 6893 keys and 48017
values [using 8 cores] (org.reflections.Reflections)
So looks like plugin go loaded properly, but somehow its jar has not got
added to classpath.
If I check the plugin uber jar, it has all the classes the connect failed
to load. So any idea as I need to do something extra to get the jar also
path of classpath.
Thanks
Sachin
Re: Kafka connect not loading classes from uber jar
Posted by Sachin Mittal <sj...@gmail.com>.
There has been similar issue raised at confluent too:
https://github.com/confluentinc/cp-docker-images/issues/638
I am however not using docker, but it looks like same issue where kafka
connect startup throws lot of these warning messages before starting up.
Any idea how to avoid all these warning and what may be causing it.
Thanks
Sachin
On Thu, Jan 16, 2020 at 2:12 PM Sachin Mittal <sj...@gmail.com> wrote:
> Hi,
> I am following the documentation under:
> https://kafka.apache.org/documentation/#connect_user
> https://docs.confluent.io/current/connect/userguide.html
> For testing I am using standalone mode. And I am using kafka_2.12-2.3.1.
>
> So I have defined:
> plugin.path=/path/to/plugin/dir
> In file: config/connect-standalone.properties
>
> When I run the connect command using:
> connect-standalone.bat config/connect-standalone.properties
> /path/to/plugin-connect.properties
>
> I get lot of errors like:
> org.reflections.ReflectionsException: could not get type for name xxx
> ....
> Caused by: java.lang.ClassNotFoundException:xxx
>
> However in the logs I do see this entry:
> INFO Loading plugin from:
> /path/to/plugin/dir/kafka-connect-plugin-xxx-all.jar
> (org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader)
> INFO Reflections took 3801 ms to scan 1 urls, producing 6893 keys and
> 48017 values [using 8 cores] (org.reflections.Reflections)
>
> So looks like plugin go loaded properly, but somehow its jar has not got
> added to classpath.
> If I check the plugin uber jar, it has all the classes the connect failed
> to load. So any idea as I need to do something extra to get the jar also
> path of classpath.
>
> Thanks
> Sachin
>
>
>
>