title: KafkaSpout BrokerHosts error
body: <p>I am trying to compile and run the storm-kafka-starter project at 
  <a href="https://github.com/TheHydroImpulse/storm-kafka-starter" rel="nofollow">https://github.com/TheHydroImpulse/storm-kafka-starter</a></p>
  
  <p>The main function for KafkaTopology looks like:</p>
  
  <pre><code>public class KafkaTopology {
  
    public static void main(String[] args) throws Exception {
  
      List&lt;String&gt; hosts = new ArrayList&lt;String&gt;();
      hosts.add("localhost");
      SpoutConfig kafkaConf = new SpoutConfig(StaticHosts.fromHostString(hosts,1),
                                          "test-topic","/kafkastorm","discovery");
      kafkaConf.scheme = new SchemeAsMultiScheme(new StringScheme());
      kafkaConf.forceStartOffsetTime(-2);
      TopologyBuilder builder = new TopologyBuilder();
      builder.setSpout("spout", kafkaSpout, 2);
      builder.setBolt("printer", new PrinterBolt()).shuffleGrouping("spout");
  
      Config config = new Config();
      config.setDebug(true);
  
      if(args!=null &amp;&amp; args.length &gt; 0) {
        config.setNumWorkers(3);
        StormSubmitter.submitTopology(args[0], config, builder.createTopology());
      } 
      else {        
        config.setMaxTaskParallelism(3);
        LocalCluster cluster = new LocalCluster();
        cluster.submitTopology("kafka", config, builder.createTopology());
  
        Thread.sleep(10000);
  
        cluster.shutdown();
      }
    }
  }
  </code></pre>
  
  <p>The jar compiles using maven. But on running the topology, I get the error:</p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError:      
  storm/kafka/KafkaConfig$BrokerHosts
  at java.lang.Class.getDeclaredMethods0(Native Method)
  at java.lang.Class.privateGetDeclaredMethods(Class.java:2451)
  at java.lang.Class.getMethod0(Class.java:2694)
  at java.lang.Class.getMethod(Class.java:1622) 
  at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494)
  at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486)
  Caused by: java.lang.ClassNotFoundException: storm.kafka.KafkaConfig$BrokerHosts
  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:423)
  at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
  ... 6 more
  </code></pre>
  
  <p>The local repository does have BrokerHosts in the storm-kafka jar and I have imported the KafkaConfig library in my java file. I cannot figure out the cause of the error. Any suggestions would be appreciated. </p>