You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Ewen Cheslack-Postava (JIRA)" <ji...@apache.org> on 2017/05/12 22:05:04 UTC

[jira] [Created] (KAFKA-5229) Reflections logs excessive warnings when scanning classpaths

Ewen Cheslack-Postava created KAFKA-5229:
--------------------------------------------

             Summary: Reflections logs excessive warnings when scanning classpaths
                 Key: KAFKA-5229
                 URL: https://issues.apache.org/jira/browse/KAFKA-5229
             Project: Kafka
          Issue Type: Bug
          Components: KafkaConnect
    Affects Versions: 0.10.2.1, 0.10.2.0, 0.10.1.1, 0.10.1.0, 0.10.0.1, 0.10.0.0
            Reporter: Ewen Cheslack-Postava
            Priority: Minor


We use Reflections to scan the classpath for available plugins (connectors, converters, transformations), but when doing so Reflections tends to generate a lot of log noise like this:

{code}
[2017-05-12 14:59:48,224] WARN could not get type for name org.jboss.netty.channel.SimpleChannelHandler from any class loader (org.reflections.Reflections:396)
org.reflections.ReflectionsException: could not get type for name org.jboss.netty.channel.SimpleChannelHandler
	at org.reflections.ReflectionUtils.forName(ReflectionUtils.java:390)
	at org.reflections.Reflections.expandSuperTypes(Reflections.java:381)
	at org.reflections.Reflections.<init>(Reflections.java:126)
	at org.apache.kafka.connect.runtime.PluginDiscovery.scanClasspathForPlugins(PluginDiscovery.java:68)
	at org.apache.kafka.connect.runtime.AbstractHerder$1.run(AbstractHerder.java:391)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: org.jboss.netty.channel.SimpleChannelHandler
	at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
	at org.reflections.ReflectionUtils.forName(ReflectionUtils.java:388)
	... 5 more
{code}

Despite being benign, these warnings worry users, especially first time users.

We should either a) see if we can get Reflections to turn off these specific warnings via some config or b) make Reflections only log at > WARN by default in our log4j config. (b) is probably safe since we should only be seeing these at startup and I don't think I've seen any actual issue logged at WARN.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)