Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Kafka, mail # dev - Runtime problem in 8 beta1?


Copy link to this message
-
Re: Runtime problem in 8 beta1?
Jay Kreps 2013-08-27, 03:35
Nothing complex here, you just don't have the the scala library on your
classpath. It works just like any jar--if there is a dependency on classes
in the jar it needs to be on the classpath.
On Mon, Aug 26, 2013 at 7:10 PM, David Williams <[EMAIL PROTECTED]>wrote:

> Hi all,
>
> First let me say I have detailed the description of the issue I have in an
> Stack Overflow Ticket here:
>
>
> http://stackoverflow.com/questions/18455480/kafka-quickstart-java-lang-noclassdeffounderror-scala-scalaobject
>
> I am trying to build a small prototype for a project in which I want to
> use Kafka.  I am following this example:
>
> https://cwiki.apache.org/confluence/display/KAFKA/Consumer+Group+Example
>
>
> However, when I compile and run the code I get this runtime exception.
>  What should I do to get a working prototype / example???
>
>
> Exception in thread "main" java.lang.reflect.InvocationTargetException
> 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.simontuffs.onejar.Boot.run(Boot.java:340)
> at com.simontuffs.onejar.Boot.main(Boot.java:166)
> Caused by: java.lang.NoClassDefFoundError: scala/ScalaObject
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:792)
> at
> com.simontuffs.onejar.JarClassLoader.defineClass(JarClassLoader.java:803)
> at com.simontuffs.onejar.JarClassLoader.findClass(JarClassLoader.java:710)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> at com.simontuffs.onejar.JarClassLoader.loadClass(JarClassLoader.java:630)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:792)
> at
> com.simontuffs.onejar.JarClassLoader.defineClass(JarClassLoader.java:803)
> at com.simontuffs.onejar.JarClassLoader.findClass(JarClassLoader.java:710)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> at com.simontuffs.onejar.JarClassLoader.loadClass(JarClassLoader.java:630)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> at java.lang.Class.getDeclaredMethods0(Native Method)
> at java.lang.Class.privateGetDeclaredMethods(Class.java:2521)
> at java.lang.Class.getDeclaredMethods(Class.java:1845)
> at
> org.springframework.core.type.StandardAnnotationMetadata.getAnnotatedMethods(StandardAnnotationMetadata.java:180)
> at
> org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:222)
> at
> org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:165)
> at
> org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:140)
> at
> org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:282)
> at
> org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:223)
> at
> org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:630)
> at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:461)
> at
> org.springframework.context.annotation.AnnotationConfigApplicationContext.<init>(AnnotationConfigApplicationContext.java:73)
> ... 6 more
> Caused by: java.lang.ClassNotFoundException: scala.ScalaObject
> at com.simontuffs.onejar.JarClassLoader.findClass(JarClassLoader.java:713)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> at com.simontuffs.onejar.JarClassLoader.loadClass(JarClassLoader.java:630)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)