title: I am trying to update my twitter status and read my timeline using twitter4j
body: <pre><code>import twitter4j.*;
  
  import java.util.*;
  
  import twitter4j.conf.ConfigurationBuilder;
  
  /**
   * @author 
   *
   */
  public class main {
  
      /**
       * @param args
       */
      public static void main(String[] args) {
          // TODO Auto-generated method stub
          //new login();
  
          ConfigurationBuilder cb = new ConfigurationBuilder();
          cb.setDebugEnabled(true)
              .setOAuthConsumerKey("XXXXXXXXXXX")
              .setOAuthConsumerSecret("XXXXXXXX")
              .setOAuthAccessToken("XXXXXXXXXXXX")
              .setOAuthAccessTokenSecret("XXXXXXXXXX");
          TwitterFactory tf = new TwitterFactory(cb.build());
          twitter4j.Twitter twitter = tf.getInstance();
          I am trying to update status on my twitter
          try {
              Status status = twitter.updateStatus("Anything");
          } catch (TwitterException e) {
              e.printStackTrace();
          }
  
          List&lt;Status&gt; status = null;
          try {
              status = twitter.getHomeTimeline();
  
          } catch (TwitterException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          }
  
          for(Status st : status) 
          {
              System.out.println(st.getUser().getName());
              System.out.println(st.getText());
          }
  
  
      }
  
  }
  </code></pre>
  
  <p>Please help me, I am getting the following error.</p>
  
  <pre><code>Exception in thread "main" java.lang.AssertionError: java.lang.reflect.InvocationTargetException
      at twitter4j.TwitterFactory.&lt;clinit&gt;(TwitterFactory.java:86)
  </code></pre>