You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by "Ngu, Bob" <bo...@intel.com> on 2013/10/30 23:26:06 UTC

Kafka 0.8, Scala 2.10.2, OSGi

Hi,

I decided to start a new thread regarding Kafka 0.8 beta1 support for Scala 2.10.2 and OSGi. I asked about 2.10.2 in a different thread

I am using Maven to build my Scala library but to resolve the bad POM
definition issue, https://issues.apache.org/jira/browse/KAFKA-1064, I
added all the required dependencies to my POM and thought I had to use
Scala 2.9.2 but it seems to build just fine with 2.10.2, this should be
fine, right?

However, I am getting java.lang.NoClassDefFoundError: scala/reflect/ClassManifest error calling ProducerConfig
  val config = new ProducerConfig(props)

I believe this is because Kafka is built with 2.9.2 so I made the following changes to Build.scala
  scalaVersion := “2.10.2” ,
  publishTo := Some(Resolver.file("file",  new File(Path.userHome.absolutePath+"/.m2/repository"))),

I should be able to run “sbt publish” to my local maven repository. However, I also need to package this library in OSGi format since I am using the library in OSGi, does anyone know if this works in OSGi? I would also need to include addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.4.0”) for OSGi bundling.

Thanks for any help!
Bob




Re: Kafka 0.8, Scala 2.10.2, OSGi

Posted by "Ngu, Bob" <bo...@intel.com>.
Ok, so I guess this means there isn’t explicit support for OSGi yet, I’ll
take a look at the client rewrite when I get a chance, thanks.

On 10/30/13, 5:31 PM, "Joe Stein" <jo...@stealth.ly> wrote:

>In regards to OSGi maybe it is something you would propose and help out
>with for the client rewrite
>https://cwiki.apache.org/confluence/display/KAFKA/Client+Rewrite I don't
>know what is entailed for coding and long term support and what the
>community benefit would be.  If you could help with any of that it would
>go
>towards making it happening.
>
>/*******************************************
> Joe Stein
> Founder, Principal Consultant
> Big Data Open Source Security LLC
> http://www.stealth.ly
> Twitter: @allthingshadoop <http://www.twitter.com/allthingshadoop>
>********************************************/
>
>
>On Wed, Oct 30, 2013 at 7:12 PM, Ngu, Bob <bo...@intel.com> wrote:
>
>> Thanks, I did just that, I found the kafka github repo, grabbed the 0.8
>> branch and it builds fine now. Any thoughts on the OSGi support
>>question?
>>
>> On 10/30/13, 4:00 PM, "Joe Stein" <jo...@stealth.ly> wrote:
>>
>> >Can you go off the 0.8 branch please? We're in the process of the 0.8.0
>> >release so if you still have problems that were not resolved we can
>>know
>> >what they are.
>> >
>> >
>> >/*******************************************
>> > Joe Stein
>> > Founder, Principal Consultant
>> > Big Data Open Source Security LLC
>> > http://www.stealth.ly
>> > Twitter: @allthingshadoop
>> >********************************************/
>> >
>> >
>> >On Oct 30, 2013, at 6:26 PM, "Ngu, Bob" <bo...@intel.com> wrote:
>> >
>> >> Hi,
>> >>
>> >> I decided to start a new thread regarding Kafka 0.8 beta1 support for
>> >>Scala 2.10.2 and OSGi. I asked about 2.10.2 in a different thread
>> >>
>> >> I am using Maven to build my Scala library but to resolve the bad POM
>> >> definition issue, https://issues.apache.org/jira/browse/KAFKA-1064, I
>> >> added all the required dependencies to my POM and thought I had to
>>use
>> >> Scala 2.9.2 but it seems to build just fine with 2.10.2, this should
>>be
>> >> fine, right?
>> >>
>> >> However, I am getting java.lang.NoClassDefFoundError:
>> >>scala/reflect/ClassManifest error calling ProducerConfig
>> >>  val config = new ProducerConfig(props)
>> >>
>> >> I believe this is because Kafka is built with 2.9.2 so I made the
>> >>following changes to Build.scala
>> >>  scalaVersion := ³2.10.2² ,
>> >>  publishTo := Some(Resolver.file("file",  new
>> >>File(Path.userHome.absolutePath+"/.m2/repository"))),
>> >>
>> >> I should be able to run ³sbt publish² to my local maven repository.
>> >>However, I also need to package this library in OSGi format since I am
>> >>using the library in OSGi, does anyone know if this works in OSGi? I
>> >>would also need to include addSbtPlugin("com.typesafe.sbt" %
>>"sbt-osgi"
>> >>% "0.4.0²) for OSGi bundling.
>> >>
>> >> Thanks for any help!
>> >> Bob
>> >>
>> >>
>> >>
>>
>>


Re: Kafka 0.8, Scala 2.10.2, OSGi

Posted by Joe Stein <jo...@stealth.ly>.
In regards to OSGi maybe it is something you would propose and help out
with for the client rewrite
https://cwiki.apache.org/confluence/display/KAFKA/Client+Rewrite I don't
know what is entailed for coding and long term support and what the
community benefit would be.  If you could help with any of that it would go
towards making it happening.

/*******************************************
 Joe Stein
 Founder, Principal Consultant
 Big Data Open Source Security LLC
 http://www.stealth.ly
 Twitter: @allthingshadoop <http://www.twitter.com/allthingshadoop>
********************************************/


On Wed, Oct 30, 2013 at 7:12 PM, Ngu, Bob <bo...@intel.com> wrote:

> Thanks, I did just that, I found the kafka github repo, grabbed the 0.8
> branch and it builds fine now. Any thoughts on the OSGi support question?
>
> On 10/30/13, 4:00 PM, "Joe Stein" <jo...@stealth.ly> wrote:
>
> >Can you go off the 0.8 branch please? We're in the process of the 0.8.0
> >release so if you still have problems that were not resolved we can know
> >what they are.
> >
> >
> >/*******************************************
> > Joe Stein
> > Founder, Principal Consultant
> > Big Data Open Source Security LLC
> > http://www.stealth.ly
> > Twitter: @allthingshadoop
> >********************************************/
> >
> >
> >On Oct 30, 2013, at 6:26 PM, "Ngu, Bob" <bo...@intel.com> wrote:
> >
> >> Hi,
> >>
> >> I decided to start a new thread regarding Kafka 0.8 beta1 support for
> >>Scala 2.10.2 and OSGi. I asked about 2.10.2 in a different thread
> >>
> >> I am using Maven to build my Scala library but to resolve the bad POM
> >> definition issue, https://issues.apache.org/jira/browse/KAFKA-1064, I
> >> added all the required dependencies to my POM and thought I had to use
> >> Scala 2.9.2 but it seems to build just fine with 2.10.2, this should be
> >> fine, right?
> >>
> >> However, I am getting java.lang.NoClassDefFoundError:
> >>scala/reflect/ClassManifest error calling ProducerConfig
> >>  val config = new ProducerConfig(props)
> >>
> >> I believe this is because Kafka is built with 2.9.2 so I made the
> >>following changes to Build.scala
> >>  scalaVersion := ³2.10.2² ,
> >>  publishTo := Some(Resolver.file("file",  new
> >>File(Path.userHome.absolutePath+"/.m2/repository"))),
> >>
> >> I should be able to run ³sbt publish² to my local maven repository.
> >>However, I also need to package this library in OSGi format since I am
> >>using the library in OSGi, does anyone know if this works in OSGi? I
> >>would also need to include addSbtPlugin("com.typesafe.sbt" % "sbt-osgi"
> >>% "0.4.0²) for OSGi bundling.
> >>
> >> Thanks for any help!
> >> Bob
> >>
> >>
> >>
>
>

Re: Kafka 0.8, Scala 2.10.2, OSGi

Posted by "Ngu, Bob" <bo...@intel.com>.
Thanks, got it to work, much appreciated.

On 10/30/13, 5:23 PM, "Joe Stein" <jo...@stealth.ly> wrote:

>you need a pgp keypair.
>
>if you use sbt you could try http://www.scala-sbt.org/sbt-pgp/usage.html
>
>or without sbt get OpenPGP installed http://linux.die.net/man/1/gpg2 and
>then
>
>gpg2 --gen-key
>
>
>On Wed, Oct 30, 2013 at 8:05 PM, Ngu, Bob <bo...@intel.com> wrote:
>
>> Hi Joe,
>>
>> I ran into a number of missing PGP key error with “sbt publish-local”
>> [error] (Kafka/*:packaged-artifacts) java.io.FileNotFoundException:
>> /Users/rngu/.sbt/gpg/secring.asc (No such file or directory)
>> [error] (perf/*:packaged-artifacts) java.io.FileNotFoundException:
>> /Users/rngu/.sbt/gpg/secring.asc (No such file or directory)
>> [error] (contrib/*:packaged-artifacts) java.io.FileNotFoundException:
>> /Users/rngu/.sbt/gpg/secring.asc (No such file or directory)
>> [error] (hadoop-consumer/*:packaged-artifacts)
>> java.io.FileNotFoundException: /Users/rngu/.sbt/gpg/secring.asc (No such
>> file or directory)
>> [error] (hadoop-producer/*:packaged-artifacts)
>> java.io.FileNotFoundException: /Users/rngu/.sbt/gpg/secring.asc (No such
>> file or directory)
>> [error] (java-examples/*:packaged-artifacts)
>> java.io.FileNotFoundException: /Users/rngu/.sbt/gpg/secring.asc (No such
>> file or directory)
>> [error] (core/*:packaged-artifacts) java.io.FileNotFoundException:
>> /Users/rngu/.sbt/gpg/secring.asc (No such file or directory)
>>
>>
>> Any ideas?
>> Thanks,
>> Bob
>>
>> On 10/30/13, 4:12 PM, "Ngu, Bob" <bo...@intel.com> wrote:
>>
>> >Thanks, I did just that, I found the kafka github repo, grabbed the 0.8
>> >branch and it builds fine now. Any thoughts on the OSGi support
>>question?
>> >
>> >On 10/30/13, 4:00 PM, "Joe Stein" <jo...@stealth.ly> wrote:
>> >
>> >>Can you go off the 0.8 branch please? We're in the process of the
>>0.8.0
>> >>release so if you still have problems that were not resolved we can
>>know
>> >>what they are.
>> >>
>> >>
>> >>/*******************************************
>> >> Joe Stein
>> >> Founder, Principal Consultant
>> >> Big Data Open Source Security LLC
>> >> http://www.stealth.ly
>> >> Twitter: @allthingshadoop
>> >>********************************************/
>> >>
>> >>
>> >>On Oct 30, 2013, at 6:26 PM, "Ngu, Bob" <bo...@intel.com> wrote:
>> >>
>> >>> Hi,
>> >>>
>> >>> I decided to start a new thread regarding Kafka 0.8 beta1 support
>>for
>> >>>Scala 2.10.2 and OSGi. I asked about 2.10.2 in a different thread
>> >>>
>> >>> I am using Maven to build my Scala library but to resolve the bad
>>POM
>> >>> definition issue, https://issues.apache.org/jira/browse/KAFKA-1064,
>>I
>> >>> added all the required dependencies to my POM and thought I had to
>>use
>> >>> Scala 2.9.2 but it seems to build just fine with 2.10.2, this
>>should be
>> >>> fine, right?
>> >>>
>> >>> However, I am getting java.lang.NoClassDefFoundError:
>> >>>scala/reflect/ClassManifest error calling ProducerConfig
>> >>>  val config = new ProducerConfig(props)
>> >>>
>> >>> I believe this is because Kafka is built with 2.9.2 so I made the
>> >>>following changes to Build.scala
>> >>>  scalaVersion := ³2.10.2² ,
>> >>>  publishTo := Some(Resolver.file("file",  new
>> >>>File(Path.userHome.absolutePath+"/.m2/repository"))),
>> >>>
>> >>> I should be able to run ³sbt publish² to my local maven repository.
>> >>>However, I also need to package this library in OSGi format since I
>>am
>> >>>using the library in OSGi, does anyone know if this works in OSGi? I
>> >>>would also need to include addSbtPlugin("com.typesafe.sbt" %
>>"sbt-osgi"
>> >>>% "0.4.0²) for OSGi bundling.
>> >>>
>> >>> Thanks for any help!
>> >>> Bob
>> >>>
>> >>>
>> >>>
>> >
>>
>>


Re: Kafka 0.8, Scala 2.10.2, OSGi

Posted by Joe Stein <jo...@stealth.ly>.
you need a pgp keypair.

if you use sbt you could try http://www.scala-sbt.org/sbt-pgp/usage.html

or without sbt get OpenPGP installed http://linux.die.net/man/1/gpg2 and
then

gpg2 --gen-key


On Wed, Oct 30, 2013 at 8:05 PM, Ngu, Bob <bo...@intel.com> wrote:

> Hi Joe,
>
> I ran into a number of missing PGP key error with “sbt publish-local”
> [error] (Kafka/*:packaged-artifacts) java.io.FileNotFoundException:
> /Users/rngu/.sbt/gpg/secring.asc (No such file or directory)
> [error] (perf/*:packaged-artifacts) java.io.FileNotFoundException:
> /Users/rngu/.sbt/gpg/secring.asc (No such file or directory)
> [error] (contrib/*:packaged-artifacts) java.io.FileNotFoundException:
> /Users/rngu/.sbt/gpg/secring.asc (No such file or directory)
> [error] (hadoop-consumer/*:packaged-artifacts)
> java.io.FileNotFoundException: /Users/rngu/.sbt/gpg/secring.asc (No such
> file or directory)
> [error] (hadoop-producer/*:packaged-artifacts)
> java.io.FileNotFoundException: /Users/rngu/.sbt/gpg/secring.asc (No such
> file or directory)
> [error] (java-examples/*:packaged-artifacts)
> java.io.FileNotFoundException: /Users/rngu/.sbt/gpg/secring.asc (No such
> file or directory)
> [error] (core/*:packaged-artifacts) java.io.FileNotFoundException:
> /Users/rngu/.sbt/gpg/secring.asc (No such file or directory)
>
>
> Any ideas?
> Thanks,
> Bob
>
> On 10/30/13, 4:12 PM, "Ngu, Bob" <bo...@intel.com> wrote:
>
> >Thanks, I did just that, I found the kafka github repo, grabbed the 0.8
> >branch and it builds fine now. Any thoughts on the OSGi support question?
> >
> >On 10/30/13, 4:00 PM, "Joe Stein" <jo...@stealth.ly> wrote:
> >
> >>Can you go off the 0.8 branch please? We're in the process of the 0.8.0
> >>release so if you still have problems that were not resolved we can know
> >>what they are.
> >>
> >>
> >>/*******************************************
> >> Joe Stein
> >> Founder, Principal Consultant
> >> Big Data Open Source Security LLC
> >> http://www.stealth.ly
> >> Twitter: @allthingshadoop
> >>********************************************/
> >>
> >>
> >>On Oct 30, 2013, at 6:26 PM, "Ngu, Bob" <bo...@intel.com> wrote:
> >>
> >>> Hi,
> >>>
> >>> I decided to start a new thread regarding Kafka 0.8 beta1 support for
> >>>Scala 2.10.2 and OSGi. I asked about 2.10.2 in a different thread
> >>>
> >>> I am using Maven to build my Scala library but to resolve the bad POM
> >>> definition issue, https://issues.apache.org/jira/browse/KAFKA-1064, I
> >>> added all the required dependencies to my POM and thought I had to use
> >>> Scala 2.9.2 but it seems to build just fine with 2.10.2, this should be
> >>> fine, right?
> >>>
> >>> However, I am getting java.lang.NoClassDefFoundError:
> >>>scala/reflect/ClassManifest error calling ProducerConfig
> >>>  val config = new ProducerConfig(props)
> >>>
> >>> I believe this is because Kafka is built with 2.9.2 so I made the
> >>>following changes to Build.scala
> >>>  scalaVersion := ³2.10.2² ,
> >>>  publishTo := Some(Resolver.file("file",  new
> >>>File(Path.userHome.absolutePath+"/.m2/repository"))),
> >>>
> >>> I should be able to run ³sbt publish² to my local maven repository.
> >>>However, I also need to package this library in OSGi format since I am
> >>>using the library in OSGi, does anyone know if this works in OSGi? I
> >>>would also need to include addSbtPlugin("com.typesafe.sbt" % "sbt-osgi"
> >>>% "0.4.0²) for OSGi bundling.
> >>>
> >>> Thanks for any help!
> >>> Bob
> >>>
> >>>
> >>>
> >
>
>

Re: Kafka 0.8, Scala 2.10.2, OSGi

Posted by "Ngu, Bob" <bo...@intel.com>.
Hi Joe,

I ran into a number of missing PGP key error with “sbt publish-local”
[error] (Kafka/*:packaged-artifacts) java.io.FileNotFoundException:
/Users/rngu/.sbt/gpg/secring.asc (No such file or directory)
[error] (perf/*:packaged-artifacts) java.io.FileNotFoundException:
/Users/rngu/.sbt/gpg/secring.asc (No such file or directory)
[error] (contrib/*:packaged-artifacts) java.io.FileNotFoundException:
/Users/rngu/.sbt/gpg/secring.asc (No such file or directory)
[error] (hadoop-consumer/*:packaged-artifacts)
java.io.FileNotFoundException: /Users/rngu/.sbt/gpg/secring.asc (No such
file or directory)
[error] (hadoop-producer/*:packaged-artifacts)
java.io.FileNotFoundException: /Users/rngu/.sbt/gpg/secring.asc (No such
file or directory)
[error] (java-examples/*:packaged-artifacts)
java.io.FileNotFoundException: /Users/rngu/.sbt/gpg/secring.asc (No such
file or directory)
[error] (core/*:packaged-artifacts) java.io.FileNotFoundException:
/Users/rngu/.sbt/gpg/secring.asc (No such file or directory)


Any ideas?
Thanks,
Bob

On 10/30/13, 4:12 PM, "Ngu, Bob" <bo...@intel.com> wrote:

>Thanks, I did just that, I found the kafka github repo, grabbed the 0.8
>branch and it builds fine now. Any thoughts on the OSGi support question?
>
>On 10/30/13, 4:00 PM, "Joe Stein" <jo...@stealth.ly> wrote:
>
>>Can you go off the 0.8 branch please? We're in the process of the 0.8.0
>>release so if you still have problems that were not resolved we can know
>>what they are.
>>
>>
>>/*******************************************
>> Joe Stein
>> Founder, Principal Consultant
>> Big Data Open Source Security LLC
>> http://www.stealth.ly
>> Twitter: @allthingshadoop
>>********************************************/
>>
>>
>>On Oct 30, 2013, at 6:26 PM, "Ngu, Bob" <bo...@intel.com> wrote:
>>
>>> Hi,
>>> 
>>> I decided to start a new thread regarding Kafka 0.8 beta1 support for
>>>Scala 2.10.2 and OSGi. I asked about 2.10.2 in a different thread
>>> 
>>> I am using Maven to build my Scala library but to resolve the bad POM
>>> definition issue, https://issues.apache.org/jira/browse/KAFKA-1064, I
>>> added all the required dependencies to my POM and thought I had to use
>>> Scala 2.9.2 but it seems to build just fine with 2.10.2, this should be
>>> fine, right?
>>> 
>>> However, I am getting java.lang.NoClassDefFoundError:
>>>scala/reflect/ClassManifest error calling ProducerConfig
>>>  val config = new ProducerConfig(props)
>>> 
>>> I believe this is because Kafka is built with 2.9.2 so I made the
>>>following changes to Build.scala
>>>  scalaVersion := ³2.10.2² ,
>>>  publishTo := Some(Resolver.file("file",  new
>>>File(Path.userHome.absolutePath+"/.m2/repository"))),
>>> 
>>> I should be able to run ³sbt publish² to my local maven repository.
>>>However, I also need to package this library in OSGi format since I am
>>>using the library in OSGi, does anyone know if this works in OSGi? I
>>>would also need to include addSbtPlugin("com.typesafe.sbt" % "sbt-osgi"
>>>% "0.4.0²) for OSGi bundling.
>>> 
>>> Thanks for any help!
>>> Bob
>>> 
>>> 
>>> 
>


Re: Kafka 0.8, Scala 2.10.2, OSGi

Posted by "Ngu, Bob" <bo...@intel.com>.
Thanks, I did just that, I found the kafka github repo, grabbed the 0.8
branch and it builds fine now. Any thoughts on the OSGi support question?

On 10/30/13, 4:00 PM, "Joe Stein" <jo...@stealth.ly> wrote:

>Can you go off the 0.8 branch please? We're in the process of the 0.8.0
>release so if you still have problems that were not resolved we can know
>what they are.
>
>
>/*******************************************
> Joe Stein
> Founder, Principal Consultant
> Big Data Open Source Security LLC
> http://www.stealth.ly
> Twitter: @allthingshadoop
>********************************************/
>
>
>On Oct 30, 2013, at 6:26 PM, "Ngu, Bob" <bo...@intel.com> wrote:
>
>> Hi,
>> 
>> I decided to start a new thread regarding Kafka 0.8 beta1 support for
>>Scala 2.10.2 and OSGi. I asked about 2.10.2 in a different thread
>> 
>> I am using Maven to build my Scala library but to resolve the bad POM
>> definition issue, https://issues.apache.org/jira/browse/KAFKA-1064, I
>> added all the required dependencies to my POM and thought I had to use
>> Scala 2.9.2 but it seems to build just fine with 2.10.2, this should be
>> fine, right?
>> 
>> However, I am getting java.lang.NoClassDefFoundError:
>>scala/reflect/ClassManifest error calling ProducerConfig
>>  val config = new ProducerConfig(props)
>> 
>> I believe this is because Kafka is built with 2.9.2 so I made the
>>following changes to Build.scala
>>  scalaVersion := ³2.10.2² ,
>>  publishTo := Some(Resolver.file("file",  new
>>File(Path.userHome.absolutePath+"/.m2/repository"))),
>> 
>> I should be able to run ³sbt publish² to my local maven repository.
>>However, I also need to package this library in OSGi format since I am
>>using the library in OSGi, does anyone know if this works in OSGi? I
>>would also need to include addSbtPlugin("com.typesafe.sbt" % "sbt-osgi"
>>% "0.4.0²) for OSGi bundling.
>> 
>> Thanks for any help!
>> Bob
>> 
>> 
>> 


Re: Kafka 0.8, Scala 2.10.2, OSGi

Posted by Joe Stein <jo...@stealth.ly>.
Can you go off the 0.8 branch please? We're in the process of the 0.8.0 release so if you still have problems that were not resolved we can know what they are.


/*******************************************
 Joe Stein
 Founder, Principal Consultant
 Big Data Open Source Security LLC
 http://www.stealth.ly
 Twitter: @allthingshadoop
********************************************/


On Oct 30, 2013, at 6:26 PM, "Ngu, Bob" <bo...@intel.com> wrote:

> Hi,
> 
> I decided to start a new thread regarding Kafka 0.8 beta1 support for Scala 2.10.2 and OSGi. I asked about 2.10.2 in a different thread
> 
> I am using Maven to build my Scala library but to resolve the bad POM
> definition issue, https://issues.apache.org/jira/browse/KAFKA-1064, I
> added all the required dependencies to my POM and thought I had to use
> Scala 2.9.2 but it seems to build just fine with 2.10.2, this should be
> fine, right?
> 
> However, I am getting java.lang.NoClassDefFoundError: scala/reflect/ClassManifest error calling ProducerConfig
>  val config = new ProducerConfig(props)
> 
> I believe this is because Kafka is built with 2.9.2 so I made the following changes to Build.scala
>  scalaVersion := “2.10.2” ,
>  publishTo := Some(Resolver.file("file",  new File(Path.userHome.absolutePath+"/.m2/repository"))),
> 
> I should be able to run “sbt publish” to my local maven repository. However, I also need to package this library in OSGi format since I am using the library in OSGi, does anyone know if this works in OSGi? I would also need to include addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.4.0”) for OSGi bundling.
> 
> Thanks for any help!
> Bob
> 
> 
> 

Re: Kafka 0.8, Scala 2.10.2, OSGi

Posted by "Ngu, Bob" <bo...@intel.com>.
Also I have to upgrade scalatest to 1.9 because 1.8 no longer exists.
However, I got a bunch of compile errors building with 2.10.2, any
insights will be much appreciated, thanks.

[error] 
/Users/rngu/ij/kafka-0.8.0-beta1-src/core/src/main/scala/kafka/utils/Annota
tions.scala:31: not found: type StaticAnnotation
[error] class nonthreadsafe extends StaticAnnotation
[error]                             ^
[error] 
/Users/rngu/ij/kafka-0.8.0-beta1-src/core/src/main/scala/kafka/api/FetchReq
uest.scala:166: type mismatch;
[error]  found   : kafka.utils.nonthreadsafe
[error]  required: scala.annotation.Annotation
[error] @nonthreadsafe
[error]  ^
[error] 
/Users/rngu/ij/kafka-0.8.0-beta1-src/core/src/main/scala/kafka/utils/Pool.s
cala:74: value asSet is not a member of object
scala.collection.JavaConversions
[error]   def keys = JavaConversions.asSet(pool.keySet())
[error]                              ^
[error] 
/Users/rngu/ij/kafka-0.8.0-beta1-src/core/src/main/scala/kafka/utils/Annota
tions.scala:26: not found: type StaticAnnotation
[error] class threadsafe extends StaticAnnotation
[error]                          ^
[error] 
/Users/rngu/ij/kafka-0.8.0-beta1-src/core/src/main/scala/kafka/consumer/Con
sumerTopicStats.scala:25: type mismatch;
[error]  found   : kafka.utils.threadsafe
[error]  required: scala.annotation.Annotation
[error] @threadsafe
[error]  ^
[error] 
/Users/rngu/ij/kafka-0.8.0-beta1-src/core/src/main/scala/kafka/consumer/Sim
pleConsumer.scala:28: type mismatch;
[error]  found   : kafka.utils.threadsafe
[error]  required: scala.annotation.Annotation
[error] @threadsafe
[error]  ^
[error] 
/Users/rngu/ij/kafka-0.8.0-beta1-src/core/src/main/scala/kafka/consumer/Zoo
keeperConsumerConnector.scala:443: value findIndexOf is not a member of
List[String]
[error]           val myConsumerPosition = curConsumers.findIndexOf(_ ==
consumerThreadId)
[error]                                                 ^
[error]             val currentChildren =
JavaConversions.asBuffer(children).toSet
[error]                                                   ^
[error] 
/Users/rngu/ij/kafka-0.8.0-beta1-src/core/src/main/scala/kafka/javaapi/Fetc
hRequest.scala:32: value asMap is not a member of object
scala.collection.JavaConversions
[error]     val scalaMap = JavaConversions.asMap(requestInfo).toMap
[error]                                    ^
[error] 
/Users/rngu/ij/kafka-0.8.0-beta1-src/core/src/main/scala/kafka/javaapi/Offs
etRequest.scala:31: value asMap is not a member of object
scala.collection.JavaConversions
[error]     val scalaMap = JavaConversions.asMap(requestInfo).toMap
[error]                                    ^
[error] 
/Users/rngu/ij/kafka-0.8.0-beta1-src/core/src/main/scala/kafka/javaapi/Topi
cMetadata.scala:20: value asList is not a member of object
scala.collection.JavaConversions
[error] import scala.collection.JavaConversions.asList
[error]        ^
[error] 
/Users/rngu/ij/kafka-0.8.0-beta1-src/core/src/main/scala/kafka/javaapi/Topi
cMetadata.scala:25: not found: value asList
[error]     asList(topicMetadataSeq.map(new
kafka.javaapi.TopicMetadata(_)))
[error]     ^
[error] 
/Users/rngu/ij/kafka-0.8.0-beta1-src/core/src/main/scala/kafka/javaapi/Topi
cMetadata.scala:29: not found: value asList
[error]     asList(partitionMetadataSeq.map(new
kafka.javaapi.PartitionMetadata(_)))
[error]     ^
[error] 
/Users/rngu/ij/kafka-0.8.0-beta1-src/core/src/main/scala/kafka/javaapi/Topi
cMetadata.scala:54: not found: value asList
[error]   def replicas: java.util.List[Broker] =
asList(underlying.replicas)
[error]                                          ^
[error] 
/Users/rngu/ij/kafka-0.8.0-beta1-src/core/src/main/scala/kafka/javaapi/Topi
cMetadata.scala:56: not found: value asList
[error]   def isr: java.util.List[Broker] = asList(underlying.isr)
[error]                                     ^
[error] 
/Users/rngu/ij/kafka-0.8.0-beta1-src/core/src/main/scala/kafka/javaapi/Topi
cMetadataRequest.scala:30: value asBuffer is not a member of object
scala.collection.JavaConversions
[error]     new kafka.api.TopicMetadataRequest(versionId, correlationId,
clientId, JavaConversions.asBuffer(topics))
[error]            
                        ^
[error] 
/Users/rngu/ij/kafka-0.8.0-beta1-src/core/src/main/scala/kafka/javaapi/cons
umer/SimpleConsumer.scala:28: type mismatch;
[error]  found   : kafka.utils.threadsafe
[error]  required: scala.annotation.Annotation
[error] @threadsafe
[error]  ^
[error] 
/Users/rngu/ij/kafka-0.8.0-beta1-src/core/src/main/scala/kafka/javaapi/cons
umer/ZookeeperConsumerConnector.scala:21: value asList is not a member of
object scala.collection.JavaConversions
[error] import scala.collection.JavaConversions.asList
[error]        ^
[error] 
/Users/rngu/ij/kafka-0.8.0-beta1-src/core/src/main/scala/kafka/javaapi/cons
umer/ZookeeperConsumerConnector.scala:76: not found: value asMap
[error]     val scalaTopicCountMap: Map[String, Int] = Map.empty[String,
Int] ++ asMap(topicCountMap.asInstanceOf[java.util.Map[String, Int]])
[error]            
      ^
[error] 
/Users/rngu/ij/kafka-0.8.0-beta1-src/core/src/main/scala/kafka/javaapi/cons
umer/ZookeeperConsumerConnector.scala:92: not found: value asList
[error]     asList(underlying.createMessageStreamsByFilter(topicFilter,
numStreams, keyDecoder, valueDecoder))
[error]     ^
[error] 
/Users/rngu/ij/kafka-0.8.0-beta1-src/core/src/main/scala/kafka/javaapi/mess
age/ByteBufferMessageSet.scala:28: value asBuffer is not a member of
object scala.collection.JavaConversions
[error]     this(new kafka.message.ByteBufferMessageSet(compressionCodec,
new AtomicLong(0), scala.collection.JavaConversions.asBuffer(messages):
_*).buffer)
[error]            
                                                   ^
[error] 
/Users/rngu/ij/kafka-0.8.0-beta1-src/core/src/main/scala/kafka/javaapi/prod
ucer/Producer.scala:41: not found: value asBuffer
[error]     underlying.send(asBuffer(messages):_*)
[error]                     ^
[error] 
/Users/rngu/ij/kafka-0.8.0-beta1-src/core/src/main/scala/kafka/log/FileMess
ageSet.scala:36: type mismatch;
[error]  found   : kafka.utils.nonthreadsafe
[error]  required: scala.annotation.Annotation
[error] @nonthreadsafe
[error]  ^
[error] 
/Users/rngu/ij/kafka-0.8.0-beta1-src/core/src/main/scala/kafka/log/Log.scal
a:100: type mismatch;
[error]  found   : kafka.utils.threadsafe
[error]  required: scala.annotation.Annotation
[error] @threadsafe
[error]  ^
[error] 
/Users/rngu/ij/kafka-0.8.0-beta1-src/core/src/main/scala/kafka/log/LogManag
er.scala:38: type mismatch;
[error]  found   : kafka.utils.threadsafe
[error]  required: scala.annotation.Annotation
[error] @threadsafe
[error]  ^
[error] 
/Users/rngu/ij/kafka-0.8.0-beta1-src/core/src/main/scala/kafka/log/LogSegme
nt.scala:32: type mismatch;
[error]  found   : kafka.utils.nonthreadsafe
[error]  required: scala.annotation.Annotation
[error] @nonthreadsafe
[error]  ^
[error] 
/Users/rngu/ij/kafka-0.8.0-beta1-src/core/src/main/scala/kafka/network/Bloc
kingChannel.scala:34: type mismatch;
[error]  found   : kafka.utils.nonthreadsafe
[error]  required: scala.annotation.Annotation
[error] @nonthreadsafe
[error]  ^
[error] 
/Users/rngu/ij/kafka-0.8.0-beta1-src/core/src/main/scala/kafka/network/Boun
dedByteBufferReceive.scala:28: type mismatch;
[error]  found   : kafka.utils.nonthreadsafe
[error]  required: scala.annotation.Annotation
[error] @nonthreadsafe
[error]  ^
[error] 
/Users/rngu/ij/kafka-0.8.0-beta1-src/core/src/main/scala/kafka/network/Boun
dedByteBufferSend.scala:25: type mismatch;
[error]  found   : kafka.utils.nonthreadsafe
[error]  required: scala.annotation.Annotation
[error] @nonthreadsafe
[error]  ^
[error] 
/Users/rngu/ij/kafka-0.8.0-beta1-src/core/src/main/scala/kafka/network/Byte
BufferSend.scala:24: type mismatch;
[error]  found   : kafka.utils.nonthreadsafe
[error]  required: scala.annotation.Annotation
[error] @nonthreadsafe
[error]  ^
[error] 
/Users/rngu/ij/kafka-0.8.0-beta1-src/core/src/main/scala/kafka/producer/Pro
ducerTopicStats.scala:25: type mismatch;
[error]  found   : kafka.utils.threadsafe
[error]  required: scala.annotation.Annotation
[error] @threadsafe
[error]  ^
[error] 
/Users/rngu/ij/kafka-0.8.0-beta1-src/core/src/main/scala/kafka/producer/Syn
cProducer.scala:33: type mismatch;
[error]  found   : kafka.utils.threadsafe
[error]  required: scala.annotation.Annotation
[error] @threadsafe
[error]  ^
[error] 
/Users/rngu/ij/kafka-0.8.0-beta1-src/core/src/main/scala/kafka/server/Messa
geSetSend.scala:31: type mismatch;
[error]  found   : kafka.utils.nonthreadsafe
[error]  required: scala.annotation.Annotation
[error] @nonthreadsafe
[error]  ^
[error] 
/Users/rngu/ij/kafka-0.8.0-beta1-src/core/src/main/scala/kafka/tools/JmxToo
l.scala:89: not found: value asSet
[error]     val names = queries.map((name: ObjectName) =>
asSet(mbsc.queryNames(name, null))).flatten
[error]                                                   ^
[error] 
/Users/rngu/ij/kafka-0.8.0-beta1-src/core/src/main/scala/kafka/utils/Annota
tions.scala:36: not found: type StaticAnnotation
[error] class immutable extends StaticAnnotation
[error]                         ^
[warn] 
/Users/rngu/ij/kafka-0.8.0-beta1-src/core/src/main/scala/kafka/utils/Json.s
cala:35: This catches all Throwables. If this is really intended, use
`case t : Throwable` to clear this warning.
[error] 
/Users/rngu/ij/kafka-0.8.0-beta1-src/core/src/main/scala/kafka/utils/Pool.s
cala:77: value asIterable is not a member of object
scala.collection.JavaConversions
[error]     JavaConversions.asIterable(new ArrayList[V](pool.values()))
[error]                     ^
[error] 
/Users/rngu/ij/kafka-0.8.0-beta1-src/core/src/main/scala/kafka/utils/Thrott
ler.scala:36: type mismatch;
[error]  found   : kafka.utils.nonthreadsafe
[error]  required: scala.annotation.Annotation
[error] @nonthreadsafe
[error]  ^
[error] 37 errors found





On 10/30/13, 3:26 PM, "Ngu, Bob" <bo...@intel.com> wrote:

>Hi,
>
>I decided to start a new thread regarding Kafka 0.8 beta1 support for
>Scala 2.10.2 and OSGi. I asked about 2.10.2 in a different thread
>
>I am using Maven to build my Scala library but to resolve the bad POM
>definition issue, https://issues.apache.org/jira/browse/KAFKA-1064, I
>added all the required dependencies to my POM and thought I had to use
>Scala 2.9.2 but it seems to build just fine with 2.10.2, this should be
>fine, right?
>
>However, I am getting java.lang.NoClassDefFoundError:
>scala/reflect/ClassManifest error calling ProducerConfig
>  val config = new ProducerConfig(props)
>
>I believe this is because Kafka is built with 2.9.2 so I made the
>following changes to Build.scala
>  scalaVersion := ³2.10.2² ,
>  publishTo := Some(Resolver.file("file",  new
>File(Path.userHome.absolutePath+"/.m2/repository"))),
>
>I should be able to run ³sbt publish² to my local maven repository.
>However, I also need to package this library in OSGi format since I am
>using the library in OSGi, does anyone know if this works in OSGi? I
>would also need to include addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" %
>"0.4.0²) for OSGi bundling.
>
>Thanks for any help!
>Bob
>
>
>