title: java.lang.NullPointerException at java.util.Properties$LineReader.readLine
body: <p>I am running <strong>Apache storm</strong> topology and I am trying to read the values from properties file. My main function is able to read the values while the bolts are throwing the following error.</p>
  
  <p>Also , I am able to read all the values from a normal class in the same project.  </p>
  
  <p><strong>Error</strong> </p>
  
  <pre><code>java.lang.NullPointerException at 
  java.util.Properties$LineReader.readLine(Properties.java:434) at 
  java.util.Properties.load0(Properties.java:353) at 
  java.util.Properties.load(Properties.java:341) at 
  com.StormConsumer.commons.FilePropertyManager.loadPrope
  rtyFile(FilePropertyManager.java:54) at 
  com.StormConsumer.commons.FilePropertyManager.getProper
  ty(FilePropertyManager.java:34) at 
  com.StormConsumer.bolt.SessionIdCounter.prepare(SessionIdCounter.java:42) at 
  backtype.storm.topology.BasicBoltExecutor.prepare(BasicBoltExecutor.java:43) 
  at backtype.storm.daemon.executor$fn__4722$fn__4734.invoke(executor.clj:692) 
  at backtype.storm.util$async_loop$fn__458.invoke(util.clj:461) at 
  clojure.lang.AFn.run(AFn.java:24) at java.lang.Thread.run(Thread.java:745) 
  </code></pre>
  
  <p>How to solve it ?</p>
  
  <p><strong>This is the class :</strong></p>
  
  <pre><code>public class SessionIdCounter extends BaseBasicBolt {
  
  private static final long serialVersionUID = 1L;
  
  Cluster cluster;
  Session session;
  
  /*private static final String KEYSPACE = FilePropertyManager.getProperty(
          ApplicationConstants.CASSANDRA_CONSTANTS_FILE,
          ApplicationConstants.KEYSPACE);
  private static final String CREATE_TABLE = FilePropertyManager.getProperty(
          ApplicationConstants.CASSANDRA_QUERY_FILE,
          ApplicationConstants.TABLE_SessionID);*/
  
  /**
   * creates a table SessionID with fields sessionid, year, month, day, hour,
   * dayofyear, weekofyear, count.
   */
  
  public void cleanup() {
  
  }
  
  public void prepare(Map stormConf, TopologyContext context) {
      final String KEYSPACE = FilePropertyManager.getProperty(
              ApplicationConstants.CASSANDRA_CONSTANTS_FILE,
              ApplicationConstants.KEYSPACE);
      final String CREATE_TABLE = FilePropertyManager.getProperty(
              ApplicationConstants.CASSANDRA_QUERY_FILE,
              ApplicationConstants.TABLE_SessionID);
  
      cluster = CassandraConnection.setupCassandraClient();
      session = CassandraConnection.getSessionWithRetry(cluster, KEYSPACE);
  
      session.executeAsync(CREATE_TABLE);
  }
  
  public void declareOutputFields(OutputFieldsDeclarer declarer) {
  }
  
  public void execute(Tuple input, BasicOutputCollector collector) {
  
      String sessionid = input.getString(0);
      int year = input.getInteger(1);
      int month = input.getInteger(2);
      int day = input.getInteger(3);
      int hour = input.getInteger(4);
      int dayofyear = input.getInteger(5);
      int weekofyear = input.getInteger(6);
  
      /*
       * Inserting Values In Cassandra
       */
  
      String insertUpdateTable = "UPDATE SessionID SET count = count + 1 "
              + "where sessionid = \'" + sessionid + "\' AND year = " + year
              + " AND month = " + month + " AND day = " + day
              + " AND hour = " + hour + " AND dayofyear = " + dayofyear
              + " AND weekofyear = " + weekofyear + " ;";
      session.executeAsync(insertUpdateTable);
  
  }
  
  }
  </code></pre>