kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Stein <crypt...@gmail.com>
Subject Re: Help getting started
Date Tue, 27 Aug 2013 23:19:00 GMT
ah, I thought you were trying to run the server and not code against the API

how are you compiling/building? through the IDE?

it seems that the libraries maybe are not on the CLASSPATH for the test
when running it in the IDE

seems like something with how your IDE is setup for your eclipse project
when running the test that is not coming through in the email clearly

its beens been like 6 years since I have used eclipse there might be a
magic setting or something in the IDE you might need to-do for how your
project is setup and how you are using it in the IDE

I am guessing someone else on this list uses eclipse and can help?

perhaps you can post everything from your project into a github repo for
someone to look at and help with its just very opaque to what you are doing
in the project without being able to look exactly

its a lot easier to help once something can get reproduced, i recall
eclipse having an import project from source for new projects

thnx




On Tue, Aug 27, 2013 at 4:34 PM, Robert Heise <roberthheise@yahoo.com>wrote:

> Thanks Joe for the response.
>
> I've tried the beta1 binary distribution as well.  Here is the steps I am
> taking:
>
> * Downloaded kafka_2.8.0-0.8.0-beta1
> * Imported jar files to eclipse project:
> - kafka_2.8.0-0.8.0-beta1/kafka_2.8.0-0.8.0-beta1.jar
> - added kafka_2.8.0-0.8.0-beta1/libs/*.* to build path
> * Quick unit test for producer
> @Test
> public void test() {
> Producer<String, String> producer = new Producer<String, String>(config);
> KeyedMessage<String, String> data = new KeyedMessage<String,
> String>("H406", "test", "test");
> }
>
> What am I missing?
>
>
>
> ________________________________
>  From: Joe Stein <cryptcom@gmail.com>
> To: "users@kafka.apache.org" <users@kafka.apache.org>
> Sent: Tuesday, August 27, 2013 3:31 PM
> Subject: Re: Help getting started
>
>
> You can use the binary distribution if you like
> https://dist.apache.org/repos/dist/release/kafka/kafka_2.8.0-0.8.0-beta1.tgz
>
> As far as what is causing the error will need more info can you maybe take
>  everything going on (commands/steps being done and the output) in your
> terminal and gist it.
>
>
> /*******************************************
> Joe Stein
> Founder, Principal Consultant
> Big Data Open Source Security LLC
> http://www.stealth.ly
> Twitter: @allthingshadoop
> ********************************************/
>
>
> On Aug 27, 2013, at 2:53 PM, Robert Heise <roberthheise@yahoo.com> wrote:
>
> > Hello,
> >
> > I have to no avail.  Im still getting the same exception:
> >
> > java.lang.ClassNotFoundException:
> > at java.lang.Class.forName0(Native Method)
> > at java.lang.Class.forName(Class.java:171)
> > at kafka.utils.Utils$.createObject(Utils.scala:457)
> > at kafka.producer.Producer.<init>(Producer.scala:59)
> > at
>  kafka.javaapi.producer.Producer.<init>(Producer.scala:25)
> > at kafka.PublisherTest.test(PublisherTest.java:56)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> > at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > at java.lang.reflect.Method.invoke(Method.java:597)
> > at
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
> > at
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> > at
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
> > at
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> > at
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
> > at
>
>  org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
> > at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
> > at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
> > at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
> > at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
> > at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
> > at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
> > at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
> > at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
> > at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
> > at
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
> > at
>
>  org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> > at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
> > at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
> > at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
> > at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
> >
> >
> >
> > ________________________________
> > From: Joe Stein <cryptcom@gmail.com>
> > To: users@kafka.apache.org; Robert Heise <roberthheise@yahoo.com>
> > Sent: Tuesday, August 27, 2013 2:40
>  PM
> > Subject: Re: Help getting started
> >
> >
> > Hey Robert, the latest quick start is here
> > http://kafka.apache.org/documentation.html#quickstart
> >
> > Can you give that a try please, thanks!
> >
> > /*******************************************
> > Joe Stein
> > Founder, Principal Consultant
> > Big Data Open Source Security LLC
> > http://www.stealth.ly
> > Twitter: @allthingshadoop <http://www.twitter.com/allthingshadoop>
> > ********************************************/
> >
> >
> > On Tue, Aug 27, 2013 at 2:20 PM, Robert Heise <roberthheise@yahoo.com
> >wrote:
> >
> >> Hello,
> >>
> >> I am getting started with Kafka and the various getting started guides
> are
> >> getting me close, but Ive run into some basic issues.
> >>
> >> Ive followed these guides:
> >> https://cwiki.apache.org/confluence/display/KAFKA/Kafka+0.8+Quick+Start
> >>
> >>
> >>
> http://www.michael-noll.com/blog/2013/03/13/running-a-multi-broker-apache-kafka-cluster-on-a-single-node/#background-why-kafka-and-scala-29
> >>
> >>
> >> When I try to write a basic publisher test I am getting the below
> >> exception.  What am I missing?
> >>
>  java.lang.ClassNotFoundException:
> >> at java.lang.Class.forName0(Native Method)
> >> at java.lang.Class.forName(Class.java:171)
> >> at kafka.utils.Utils$.createObject(Utils.scala:437)
> >> at kafka.producer.Producer.<init>(Producer.scala:59)
> >> at kafka.javaapi.producer.Producer.<init>(Producer.scala:25)
> >> at kafka.PublisherTest.test(PublisherTest.java:56)
> >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >> at
> >>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >> at
> >>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >> at java.lang.reflect.Method.invoke(Method.java:597)
> >> at
> >>
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
> >> at
> >>
>
>  org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> >> at
> >>
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
> >> at
> >>
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> >> at
> >>
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
> >> at
> >>
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
> >> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
> >> at
> >>
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
> >> at
> >>
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
> >> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
> >> at
>  org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
> >> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
> >> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
> >> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
> >> at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
> >> at
> >>
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
> >> at
> >>
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> >> at
> >>
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
> >> at
> >>
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
> >> at
> >>
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
> >>
>  at
> >>
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message