gpt4 book ai didi

apache-kafka - Kafka 连接 : could not get type for name org. Windows 上的 osgi.framework.BundleListener

转载 作者:行者123 更新时间:2023-12-04 04:16:36 26 4
gpt4 key购买 nike

我正在关注 this tutorial用于 Linux 和 Windows。在 Step 7我在尝试运行时遇到 Java 异常:

>bin\windows\connect-standalone.bat config\connect-standalone.properties config\connect-file-source.properties config\connect-file-sink.properties

异常(exception)情况是:

[2019-05-13 13:00:20,145] WARN could not get type for name org.osgi.framework.BundleListener from any class loader (org.reflections.Reflections) org.reflections.ReflectionsException: could not get type for name org.osgi.framework.BundleListener at org.reflections.ReflectionUtils.forName(ReflectionUtils.java:390) at org.reflections.Reflections.expandSuperTypes(Reflections.java:381) at org.reflections.Reflections.(Reflections.java:126) at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader$InternalReflections.(DelegatingClassLoader.java:400) at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.scanPluginPath(DelegatingClassLoader.java:299) at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.scanUrlsAndAddPlugins(DelegatingClassLoader.java:237) at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.initPluginLoader(DelegatingClassLoader.java:185) at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.initLoaders(DelegatingClassLoader.java:178) at org.apache.kafka.connect.runtime.isolation.Plugins.(Plugins.java:61) at org.apache.kafka.connect.cli.ConnectStandalone.main(ConnectStandalone.java:78) Caused by: java.lang.ClassNotFoundException: org.osgi.framework.BundleListener at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at org.reflections.ReflectionUtils.forName(ReflectionUtils.java:388) ... 9 more

我在 Windows 上工作。

最佳答案

所以我的 test.txt 文件中有 json 数据,并运行上述命令以在 test.sink.txt 文件中获取输出。我遇到了上面提到的相同错误,但是当我检查 test.sink.txt 文件时,令人惊讶的是,json 数据是由 kafka 写入的。我在 test.txt 文件中有一些不正确的 json 记录,并且在输出接收器文件中省略了这些记录。

输入/输出文件的名称在本例中为 test.txt/test.sink.txt 可以在我们提供的属性文件中更改上述命令的参数。

TLDR: Even though the cmd shows the stack-trace/warning , the functionality seems to be working. Data goes from input file to topic to output file.

关于apache-kafka - Kafka 连接 : could not get type for name org. Windows 上的 osgi.framework.BundleListener,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56111750/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com