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?
Benjamin Black 2013-08-27, 18:16
I've been using the Maven package without issue. Of course, I'm not using
Spring, either. Here's the relevant section from a working pom:

        <dependency>
            <groupId>org.scala-lang</groupId>
            <artifactId>scala-library</artifactId>
            <version>2.9.1</version>
        </dependency>

        <dependency>
            <groupId>org.apache.kafka</groupId>
            <artifactId>kafka_2.9.1</artifactId>
            <version>0.8.0-beta1</version>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-log4j12</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>log4j</groupId>
                    <artifactId>log4j</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.sun.jmx</groupId>
                    <artifactId>jmxri</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.sun.jdmk</groupId>
                    <artifactId>jmxtools</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>javax.jms</groupId>
                    <artifactId>jms</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

On Tue, Aug 27, 2013 at 11:10 AM, David Williams <[EMAIL PROTECTED]>wrote:

>
> So an update.  The required version of log4j is
>
> <dependency>
>    <groupId>log4j</groupId>
>    <artifactId>log4j</artifactId>
>    <version>1.2.17</version>
>         </dependency>
>
>
> Joe, why is this so hard / undocumented / not caught at compile time?
>
>
> Now we have another error:
>
> Exception in thread "main" java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:5
> 7)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
> l.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:
> org/I0Itec/zkclient/IZkStateListener
>         at
> kafka.javaapi.consumer.ZookeeperConsumerConnector.<init>(ZookeeperConsumerC
> onnector.scala:64)
>         at
> kafka.javaapi.consumer.ZookeeperConsumerConnector.<init>(ZookeeperConsumerC
> onnector.scala:66)
>         at
> kafka.consumer.Consumer$.createJavaConsumerConnector(ConsumerConnector.scal
> a:100)
>         at
> kafka.consumer.Consumer.createJavaConsumerConnector(ConsumerConnector.scala
> )
> ... 6 more
> Caused by: java.lang.ClassNotFoundException:
> org.I0Itec.zkclient.IZkStateListener
>         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)
>         ... 12 more
>
>
>
>
>
>
> --
>
>
>
>
>
>
> On 8/27/13 9:54 AM, "David Williams" <[EMAIL PROTECTED]> wrote:
>
> >Ok great, thanks.  What are the other required dependencies?
> >
> >
> >For exmaple, log4j seems needed:
> >
> >
> >Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Logger
> >       at kafka.utils.Logging$class.logger(Logging.scala:24)
> >       at
> kafka.utils.VerifiableProperties.logger(VerifiableProperties.scala:23)
> >       at kafka.utils.Logging$class.info(Logging.scala:66)
> >       at kafka.utils.VerifiableProperties.info
> (VerifiableProperties.scala:23)
> >       at
> >kafka.utils.VerifiableProperties.verify(VerifiableProperties.scala:180)
> >       at kafka.producer.ProducerConfig.<init>(ProducerConfig.scala:57)
> >
> >
> >
> >However adding the following dependencies are not compatible