title: HTTP Status 500 - No Token available. twiiter4j 4.0.3
body: <p>I am trying to integrate twitter login in my dummy web App . But while getting OAuthAccessToken , it says</p>
  
  <p><strong>HTTP Status 500 - No Token available.</strong> </p>
  
  <p>Here is my code for creating twitter instance</p>
  
  <pre><code>twitterConfigurationBuilder = new ConfigurationBuilder();
          twitterConfigurationBuilder.setDebugEnabled(true)
                  .setOAuthConsumerKey(oAuthConsumerKey)
                  .setOAuthConsumerSecret(oAuthConsumerSecret);
  twitterInstance = (new TwitterFactory(
                  twitterConfigurationBuilder.build())).getInstance();
  </code></pre>
  
  <p>Here How I am redirecting for Authentication :</p>
  
  <pre><code>RequestToken requestToken = twitterInstance
                      .getOAuthRequestToken(callBackURL);
              req.getSession().setAttribute("requestToken", requestToken);
              resp.sendRedirect(requestToken.getAuthenticationURL());
  </code></pre>
  
  <p>Here How I am getting OAuthAccessTken</p>
  
  <pre><code>RequestToken token = (RequestToken) req.getSession().getAttribute(
                  "requestToken");
          String verifier = req.getParameter("oauth_verifier");
          req.getSession().removeAttribute("requestToken");
          try {
              // Exception Occurred here
              twitterInstance.getOAuthAccessToken(token, verifier);
          } catch (TwitterException e) {
              e.printStackTrace();
          }
  </code></pre>
  
  <p>Here is the stackTrace :</p>
  
  <pre><code>java.lang.IllegalStateException: No Token available.
      twitter4j.auth.OAuthAuthorization.ensureTokenIsAvailable(OAuthAuthorization.java:71)
      twitter4j.auth.OAuthAuthorization.getOAuthAccessToken(OAuthAuthorization.java:131)
      twitter4j.auth.OAuthAuthorization.getOAuthAccessToken(OAuthAuthorization.java:146)
      twitter4j.TwitterBaseImpl.getOAuthAccessToken(TwitterBaseImpl.java:362)
      com.xxx.social.controller.Twitter.doGet(Twitter.java:67)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
  </code></pre>
  
  <p><strong>P.S.
   I tried twitter4j 4.0.3 and 4.0.4 and included core,stream api in pom</strong></p>