i follow the tutorial on
https://cwiki.apache.org/confluence/display/KAFKA/0.8.0+Producer+Example,
but got the following error

exception in thread "main" java.lang.ClassNotFoundException:
example.producer.SimplePartitioner
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 java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:191)
at kafka.utils.Utils$.createObject(Utils.scala:435)
at kafka.producer.Producer.<init>(Producer.scala:61)
at kafka.javaapi.producer.Producer.<init>(Producer.scala:26)
at TestProducer.run(TestProducer.java:41)
at Main.main(Main.java:11)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)


Here is my producer <http://ideone.com/EuffMq> and SimplePartitioner
<http://ideone.com/1R2RsK>. No solution in the internet related to the
problem above. anything is missing in the tutorial?
Thanks.


Willy

Reply via email to