[jira] [Commented] (KAFKA-2295) Dynamically loaded classes (encoders, etc.) may not be found by Kafka Producer
[ https://issues.apache.org/jira/browse/KAFKA-2295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15150298#comment-15150298 ] Guozhang Wang commented on KAFKA-2295: -- Thanks for reporting [~joconnor]. Could you try to verify if the patch provided in KAFKA-3218 fixes the issue? > Dynamically loaded classes (encoders, etc.) may not be found by Kafka > Producer > --- > > Key: KAFKA-2295 > URL: https://issues.apache.org/jira/browse/KAFKA-2295 > Project: Kafka > Issue Type: Bug > Components: producer >Reporter: Tathagata Das >Assignee: Manikumar Reddy >Priority: Blocker > Fix For: 0.9.0.0 > > Attachments: KAFKA-2295.patch, KAFKA-2295_2015-07-06_11:32:58.patch, > KAFKA-2295_2015-08-20_17:44:56.patch > > > Kafka Producer (via CoreUtils.createObject) effectively uses Class.forName to > load encoder classes. Class.forName is by design finds classes only in the > defining classloader of the enclosing class (which is often the bootstrap > class loader). It does not use the current thread context class loader. This > can lead to problems in environments where classes are dynamically loaded and > therefore may not be present in the bootstrap classloader. > This leads to ClassNotFound Exceptions in environments like Spark where > classes are loaded dynamically using custom classloaders. Issues like this > have reported. E.g. - > https://www.mail-archive.com/user@spark.apache.org/msg30951.html > Other references regarding this issue with Class.forName > http://stackoverflow.com/questions/21749741/though-my-class-was-loaded-class-forname-throws-classnotfoundexception > This is a problem we have faced repeatedly in Apache Spark and we solved it > by explicitly specifying the class loader to use. See > https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/util/Utils.scala#L178 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (KAFKA-2295) Dynamically loaded classes (encoders, etc.) may not be found by Kafka Producer
[ https://issues.apache.org/jira/browse/KAFKA-2295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15136818#comment-15136818 ] Joe O'Connor commented on KAFKA-2295: - This change appears to have caused KAFKA-3218, ClassNotFoundException when using kafka-clients as an OSGi module > Dynamically loaded classes (encoders, etc.) may not be found by Kafka > Producer > --- > > Key: KAFKA-2295 > URL: https://issues.apache.org/jira/browse/KAFKA-2295 > Project: Kafka > Issue Type: Bug > Components: producer >Reporter: Tathagata Das >Assignee: Manikumar Reddy >Priority: Blocker > Fix For: 0.9.0.0 > > Attachments: KAFKA-2295.patch, KAFKA-2295_2015-07-06_11:32:58.patch, > KAFKA-2295_2015-08-20_17:44:56.patch > > > Kafka Producer (via CoreUtils.createObject) effectively uses Class.forName to > load encoder classes. Class.forName is by design finds classes only in the > defining classloader of the enclosing class (which is often the bootstrap > class loader). It does not use the current thread context class loader. This > can lead to problems in environments where classes are dynamically loaded and > therefore may not be present in the bootstrap classloader. > This leads to ClassNotFound Exceptions in environments like Spark where > classes are loaded dynamically using custom classloaders. Issues like this > have reported. E.g. - > https://www.mail-archive.com/user@spark.apache.org/msg30951.html > Other references regarding this issue with Class.forName > http://stackoverflow.com/questions/21749741/though-my-class-was-loaded-class-forname-throws-classnotfoundexception > This is a problem we have faced repeatedly in Apache Spark and we solved it > by explicitly specifying the class loader to use. See > https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/util/Utils.scala#L178 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (KAFKA-2295) Dynamically loaded classes (encoders, etc.) may not be found by Kafka Producer
[ https://issues.apache.org/jira/browse/KAFKA-2295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14958614#comment-14958614 ] ASF GitHub Bot commented on KAFKA-2295: --- GitHub user omkreddy opened a pull request: https://github.com/apache/kafka/pull/314 KAFKA-2295; Support given for dynamically loaded classes (encoders, e… Rebased code.. You can merge this pull request into a Git repository by running: $ git pull https://github.com/omkreddy/kafka KAFKA-2295 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/314.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #314 commit dafc210c2501ac7fc91ba63e744d9939fbeb64c5 Author: Manikumar reddy ODate: 2015-10-15T10:06:40Z KAFKA-2295; Support given for dynamically loaded classes (encoders, etc.) > Dynamically loaded classes (encoders, etc.) may not be found by Kafka > Producer > --- > > Key: KAFKA-2295 > URL: https://issues.apache.org/jira/browse/KAFKA-2295 > Project: Kafka > Issue Type: Bug > Components: producer >Reporter: Tathagata Das >Assignee: Manikumar Reddy >Priority: Blocker > Fix For: 0.9.0.0 > > Attachments: KAFKA-2295.patch, KAFKA-2295_2015-07-06_11:32:58.patch, > KAFKA-2295_2015-08-20_17:44:56.patch > > > Kafka Producer (via CoreUtils.createObject) effectively uses Class.forName to > load encoder classes. Class.forName is by design finds classes only in the > defining classloader of the enclosing class (which is often the bootstrap > class loader). It does not use the current thread context class loader. This > can lead to problems in environments where classes are dynamically loaded and > therefore may not be present in the bootstrap classloader. > This leads to ClassNotFound Exceptions in environments like Spark where > classes are loaded dynamically using custom classloaders. Issues like this > have reported. E.g. - > https://www.mail-archive.com/user@spark.apache.org/msg30951.html > Other references regarding this issue with Class.forName > http://stackoverflow.com/questions/21749741/though-my-class-was-loaded-class-forname-throws-classnotfoundexception > This is a problem we have faced repeatedly in Apache Spark and we solved it > by explicitly specifying the class loader to use. See > https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/util/Utils.scala#L178 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (KAFKA-2295) Dynamically loaded classes (encoders, etc.) may not be found by Kafka Producer
[ https://issues.apache.org/jira/browse/KAFKA-2295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14959318#comment-14959318 ] ASF GitHub Bot commented on KAFKA-2295: --- Github user asfgit closed the pull request at: https://github.com/apache/kafka/pull/314 > Dynamically loaded classes (encoders, etc.) may not be found by Kafka > Producer > --- > > Key: KAFKA-2295 > URL: https://issues.apache.org/jira/browse/KAFKA-2295 > Project: Kafka > Issue Type: Bug > Components: producer >Reporter: Tathagata Das >Assignee: Manikumar Reddy >Priority: Blocker > Fix For: 0.9.0.0 > > Attachments: KAFKA-2295.patch, KAFKA-2295_2015-07-06_11:32:58.patch, > KAFKA-2295_2015-08-20_17:44:56.patch > > > Kafka Producer (via CoreUtils.createObject) effectively uses Class.forName to > load encoder classes. Class.forName is by design finds classes only in the > defining classloader of the enclosing class (which is often the bootstrap > class loader). It does not use the current thread context class loader. This > can lead to problems in environments where classes are dynamically loaded and > therefore may not be present in the bootstrap classloader. > This leads to ClassNotFound Exceptions in environments like Spark where > classes are loaded dynamically using custom classloaders. Issues like this > have reported. E.g. - > https://www.mail-archive.com/user@spark.apache.org/msg30951.html > Other references regarding this issue with Class.forName > http://stackoverflow.com/questions/21749741/though-my-class-was-loaded-class-forname-throws-classnotfoundexception > This is a problem we have faced repeatedly in Apache Spark and we solved it > by explicitly specifying the class loader to use. See > https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/util/Utils.scala#L178 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (KAFKA-2295) Dynamically loaded classes (encoders, etc.) may not be found by Kafka Producer
[ https://issues.apache.org/jira/browse/KAFKA-2295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14958017#comment-14958017 ] Guozhang Wang commented on KAFKA-2295: -- [~omkreddy] Could you rebase the patch again? > Dynamically loaded classes (encoders, etc.) may not be found by Kafka > Producer > --- > > Key: KAFKA-2295 > URL: https://issues.apache.org/jira/browse/KAFKA-2295 > Project: Kafka > Issue Type: Bug > Components: producer >Reporter: Tathagata Das >Assignee: Manikumar Reddy >Priority: Blocker > Fix For: 0.9.0.0 > > Attachments: KAFKA-2295.patch, KAFKA-2295_2015-07-06_11:32:58.patch, > KAFKA-2295_2015-08-20_17:44:56.patch > > > Kafka Producer (via CoreUtils.createObject) effectively uses Class.forName to > load encoder classes. Class.forName is by design finds classes only in the > defining classloader of the enclosing class (which is often the bootstrap > class loader). It does not use the current thread context class loader. This > can lead to problems in environments where classes are dynamically loaded and > therefore may not be present in the bootstrap classloader. > This leads to ClassNotFound Exceptions in environments like Spark where > classes are loaded dynamically using custom classloaders. Issues like this > have reported. E.g. - > https://www.mail-archive.com/user@spark.apache.org/msg30951.html > Other references regarding this issue with Class.forName > http://stackoverflow.com/questions/21749741/though-my-class-was-loaded-class-forname-throws-classnotfoundexception > This is a problem we have faced repeatedly in Apache Spark and we solved it > by explicitly specifying the class loader to use. See > https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/util/Utils.scala#L178 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (KAFKA-2295) Dynamically loaded classes (encoders, etc.) may not be found by Kafka Producer
[ https://issues.apache.org/jira/browse/KAFKA-2295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14953689#comment-14953689 ] Guozhang Wang commented on KAFKA-2295: -- Pinging [~tdas] once again for validation, or if someone else and verify the issue was reproducible and now fixed with the patch, we can go ahead and check it in. > Dynamically loaded classes (encoders, etc.) may not be found by Kafka > Producer > --- > > Key: KAFKA-2295 > URL: https://issues.apache.org/jira/browse/KAFKA-2295 > Project: Kafka > Issue Type: Bug > Components: producer >Reporter: Tathagata Das >Assignee: Manikumar Reddy >Priority: Blocker > Fix For: 0.9.0.0 > > Attachments: KAFKA-2295.patch, KAFKA-2295_2015-07-06_11:32:58.patch, > KAFKA-2295_2015-08-20_17:44:56.patch > > > Kafka Producer (via CoreUtils.createObject) effectively uses Class.forName to > load encoder classes. Class.forName is by design finds classes only in the > defining classloader of the enclosing class (which is often the bootstrap > class loader). It does not use the current thread context class loader. This > can lead to problems in environments where classes are dynamically loaded and > therefore may not be present in the bootstrap classloader. > This leads to ClassNotFound Exceptions in environments like Spark where > classes are loaded dynamically using custom classloaders. Issues like this > have reported. E.g. - > https://www.mail-archive.com/user@spark.apache.org/msg30951.html > Other references regarding this issue with Class.forName > http://stackoverflow.com/questions/21749741/though-my-class-was-loaded-class-forname-throws-classnotfoundexception > This is a problem we have faced repeatedly in Apache Spark and we solved it > by explicitly specifying the class loader to use. See > https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/util/Utils.scala#L178 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (KAFKA-2295) Dynamically loaded classes (encoders, etc.) may not be found by Kafka Producer
[ https://issues.apache.org/jira/browse/KAFKA-2295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14936958#comment-14936958 ] James Netherton commented on KAFKA-2295: Any news on this? This issue looks critical. > Dynamically loaded classes (encoders, etc.) may not be found by Kafka > Producer > --- > > Key: KAFKA-2295 > URL: https://issues.apache.org/jira/browse/KAFKA-2295 > Project: Kafka > Issue Type: Bug > Components: producer >Reporter: Tathagata Das >Assignee: Manikumar Reddy >Priority: Blocker > Fix For: 0.9.0.0 > > Attachments: KAFKA-2295.patch, KAFKA-2295_2015-07-06_11:32:58.patch, > KAFKA-2295_2015-08-20_17:44:56.patch > > > Kafka Producer (via CoreUtils.createObject) effectively uses Class.forName to > load encoder classes. Class.forName is by design finds classes only in the > defining classloader of the enclosing class (which is often the bootstrap > class loader). It does not use the current thread context class loader. This > can lead to problems in environments where classes are dynamically loaded and > therefore may not be present in the bootstrap classloader. > This leads to ClassNotFound Exceptions in environments like Spark where > classes are loaded dynamically using custom classloaders. Issues like this > have reported. E.g. - > https://www.mail-archive.com/user@spark.apache.org/msg30951.html > Other references regarding this issue with Class.forName > http://stackoverflow.com/questions/21749741/though-my-class-was-loaded-class-forname-throws-classnotfoundexception > This is a problem we have faced repeatedly in Apache Spark and we solved it > by explicitly specifying the class loader to use. See > https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/util/Utils.scala#L178 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (KAFKA-2295) Dynamically loaded classes (encoders, etc.) may not be found by Kafka Producer
[ https://issues.apache.org/jira/browse/KAFKA-2295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14704757#comment-14704757 ] Manikumar Reddy commented on KAFKA-2295: [~guozhang] Can we go ahead and commit this minor patch? Dynamically loaded classes (encoders, etc.) may not be found by Kafka Producer --- Key: KAFKA-2295 URL: https://issues.apache.org/jira/browse/KAFKA-2295 Project: Kafka Issue Type: Bug Components: producer Reporter: Tathagata Das Assignee: Manikumar Reddy Fix For: 0.9.0 Attachments: KAFKA-2295.patch, KAFKA-2295_2015-07-06_11:32:58.patch, KAFKA-2295_2015-08-20_17:44:56.patch Kafka Producer (via CoreUtils.createObject) effectively uses Class.forName to load encoder classes. Class.forName is by design finds classes only in the defining classloader of the enclosing class (which is often the bootstrap class loader). It does not use the current thread context class loader. This can lead to problems in environments where classes are dynamically loaded and therefore may not be present in the bootstrap classloader. This leads to ClassNotFound Exceptions in environments like Spark where classes are loaded dynamically using custom classloaders. Issues like this have reported. E.g. - https://www.mail-archive.com/user@spark.apache.org/msg30951.html Other references regarding this issue with Class.forName http://stackoverflow.com/questions/21749741/though-my-class-was-loaded-class-forname-throws-classnotfoundexception This is a problem we have faced repeatedly in Apache Spark and we solved it by explicitly specifying the class loader to use. See https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/util/Utils.scala#L178 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (KAFKA-2295) Dynamically loaded classes (encoders, etc.) may not be found by Kafka Producer
[ https://issues.apache.org/jira/browse/KAFKA-2295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14704749#comment-14704749 ] Manikumar Reddy commented on KAFKA-2295: Updated reviewboard https://reviews.apache.org/r/35880/diff/ against branch origin/trunk Dynamically loaded classes (encoders, etc.) may not be found by Kafka Producer --- Key: KAFKA-2295 URL: https://issues.apache.org/jira/browse/KAFKA-2295 Project: Kafka Issue Type: Bug Components: producer Reporter: Tathagata Das Assignee: Manikumar Reddy Fix For: 0.9.0 Attachments: KAFKA-2295.patch, KAFKA-2295_2015-07-06_11:32:58.patch, KAFKA-2295_2015-08-20_17:44:56.patch Kafka Producer (via CoreUtils.createObject) effectively uses Class.forName to load encoder classes. Class.forName is by design finds classes only in the defining classloader of the enclosing class (which is often the bootstrap class loader). It does not use the current thread context class loader. This can lead to problems in environments where classes are dynamically loaded and therefore may not be present in the bootstrap classloader. This leads to ClassNotFound Exceptions in environments like Spark where classes are loaded dynamically using custom classloaders. Issues like this have reported. E.g. - https://www.mail-archive.com/user@spark.apache.org/msg30951.html Other references regarding this issue with Class.forName http://stackoverflow.com/questions/21749741/though-my-class-was-loaded-class-forname-throws-classnotfoundexception This is a problem we have faced repeatedly in Apache Spark and we solved it by explicitly specifying the class loader to use. See https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/util/Utils.scala#L178 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (KAFKA-2295) Dynamically loaded classes (encoders, etc.) may not be found by Kafka Producer
[ https://issues.apache.org/jira/browse/KAFKA-2295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14622722#comment-14622722 ] Guozhang Wang commented on KAFKA-2295: -- [~tdas] The latest patch from [~omkreddy] looks good to me, do you want to apply it and see if it resolves your Spark usecase? Guozhang Dynamically loaded classes (encoders, etc.) may not be found by Kafka Producer --- Key: KAFKA-2295 URL: https://issues.apache.org/jira/browse/KAFKA-2295 Project: Kafka Issue Type: Bug Components: producer Reporter: Tathagata Das Assignee: Manikumar Reddy Fix For: 0.9.0 Attachments: KAFKA-2295.patch, KAFKA-2295_2015-07-06_11:32:58.patch Kafka Producer (via CoreUtils.createObject) effectively uses Class.forName to load encoder classes. Class.forName is by design finds classes only in the defining classloader of the enclosing class (which is often the bootstrap class loader). It does not use the current thread context class loader. This can lead to problems in environments where classes are dynamically loaded and therefore may not be present in the bootstrap classloader. This leads to ClassNotFound Exceptions in environments like Spark where classes are loaded dynamically using custom classloaders. Issues like this have reported. E.g. - https://www.mail-archive.com/user@spark.apache.org/msg30951.html Other references regarding this issue with Class.forName http://stackoverflow.com/questions/21749741/though-my-class-was-loaded-class-forname-throws-classnotfoundexception This is a problem we have faced repeatedly in Apache Spark and we solved it by explicitly specifying the class loader to use. See https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/util/Utils.scala#L178 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (KAFKA-2295) Dynamically loaded classes (encoders, etc.) may not be found by Kafka Producer
[ https://issues.apache.org/jira/browse/KAFKA-2295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14614582#comment-14614582 ] Manikumar Reddy commented on KAFKA-2295: Updated reviewboard https://reviews.apache.org/r/35880/diff/ against branch origin/trunk Dynamically loaded classes (encoders, etc.) may not be found by Kafka Producer --- Key: KAFKA-2295 URL: https://issues.apache.org/jira/browse/KAFKA-2295 Project: Kafka Issue Type: Bug Components: producer Reporter: Tathagata Das Assignee: Manikumar Reddy Fix For: 0.9.0 Attachments: KAFKA-2295.patch, KAFKA-2295_2015-07-06_11:32:58.patch Kafka Producer (via CoreUtils.createObject) effectively uses Class.forName to load encoder classes. Class.forName is by design finds classes only in the defining classloader of the enclosing class (which is often the bootstrap class loader). It does not use the current thread context class loader. This can lead to problems in environments where classes are dynamically loaded and therefore may not be present in the bootstrap classloader. This leads to ClassNotFound Exceptions in environments like Spark where classes are loaded dynamically using custom classloaders. Issues like this have reported. E.g. - https://www.mail-archive.com/user@spark.apache.org/msg30951.html Other references regarding this issue with Class.forName http://stackoverflow.com/questions/21749741/though-my-class-was-loaded-class-forname-throws-classnotfoundexception This is a problem we have faced repeatedly in Apache Spark and we solved it by explicitly specifying the class loader to use. See https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/util/Utils.scala#L178 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (KAFKA-2295) Dynamically loaded classes (encoders, etc.) may not be found by Kafka Producer
[ https://issues.apache.org/jira/browse/KAFKA-2295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14601476#comment-14601476 ] Manikumar Reddy commented on KAFKA-2295: Created reviewboard https://reviews.apache.org/r/35880/diff/ against branch origin/trunk Dynamically loaded classes (encoders, etc.) may not be found by Kafka Producer --- Key: KAFKA-2295 URL: https://issues.apache.org/jira/browse/KAFKA-2295 Project: Kafka Issue Type: Bug Components: producer Reporter: Tathagata Das Assignee: Jun Rao Attachments: KAFKA-2295.patch Kafka Producer (via CoreUtils.createObject) effectively uses Class.forName to load encoder classes. Class.forName is by design finds classes only in the defining classloader of the enclosing class (which is often the bootstrap class loader). It does not use the current thread context class loader. This can lead to problems in environments where classes are dynamically loaded and therefore may not be present in the bootstrap classloader. This leads to ClassNotFound Exceptions in environments like Spark where classes are loaded dynamically using custom classloaders. Issues like this have reported. E.g. - https://www.mail-archive.com/user@spark.apache.org/msg30951.html Other references regarding this issue with Class.forName http://stackoverflow.com/questions/21749741/though-my-class-was-loaded-class-forname-throws-classnotfoundexception This is a problem we have faced repeatedly in Apache Spark and we solved it by explicitly specifying the class loader to use. See https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/util/Utils.scala#L178 -- This message was sent by Atlassian JIRA (v6.3.4#6332)