Mentre esecuzione del seguente comando nel mio codice:java.lang.NoClassDefFoundError: kafka/common/TopicAndPartition
kafka_streams = [KafkaUtils.createStream(ssc, zk_settings['QUORUM'], zk_settings['CONSUMERS'][k],
{zk_settings['TOPICS'][0]: zk_settings['NUM_THREADS']})
.window(zk_settings['WINDOW_DURATION'], zk_settings['SLIDE_DURATION'])
for k in range(len(zk_settings['CONSUMERS']))]
ma sto ottenendo il seguente errore:
Exception in thread "Thread-3" java.lang.NoClassDefFoundError: kafka/common/TopicAndPartition
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2625)
at java.lang.Class.privateGetPublicMethods(Class.java:2743)
at java.lang.Class.getMethods(Class.java:1480)
at py4j.reflection.ReflectionEngine.getMethodsByNameAndLength(ReflectionEngine.java:365)
at py4j.reflection.ReflectionEngine.getMethod(ReflectionEngine.java:317)
at py4j.reflection.ReflectionEngine.getMethod(ReflectionEngine.java:342)
at py4j.Gateway.invoke(Gateway.java:252)
at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:133)
at py4j.commands.CallCommand.execute(CallCommand.java:79)
at py4j.GatewayConnection.run(GatewayConnection.java:207)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: kafka.common.TopicAndPartition
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)
... 12 more
Mi sto perdendo qualcosa?
mi è stato sempre qualche errore di scintilla così ho ricostruito l'errore scintilla e che portano a questo errore.
Come si fa a costruire ed eseguire l'applicazione? –
controllo ortografico del nome della classe TopicAndPartition, all'interno pacchetto comune. –
@Poonam Agrawal - Come hai fatto a risolvere questo problema? Sto anche affrontando uno stesso problema come hai affrontato in precedenza. – kit