KafkaSpout throws NoClassDefFoundError for log4j

前端 未结 3 761
礼貌的吻别
礼貌的吻别 2021-01-19 01:06

For some reason I get the following error when I try to run my topology on a Storm cluster:

java.lang.NoClassDefFoundError: Could not initialize class org.ap         


        
3条回答
  •  逝去的感伤
    2021-01-19 01:54

    I have occured to the same problem when I included kafka like you, so I included kafka by another way according to the throw exception:

    SLF4J: Detected both log4j-over-slf4j.jar AND slf4j-log4j12.jar on the class path, preempting StackOverflowError. SLF4J: See also http://www.slf4j.org/codes.html#log4jDelegationLoop for more details.

    You can include kafka in the following way:

    
            org.apache.kafka
            kafka_2.10
            ${kafka.version}
            
                
                    org.apache.zookeeper
                    zookeeper
                
                
                    org.slf4j
                    slf4j-log4j12
                
                
                log4j
                log4j
            
        
    
    

提交回复
热议问题