The only exception we see is this,
401:Authentication credentials (https://dev.tw itter.com/pages/auth) were missing or incorrect. Ensure that you have set valid consumer key/secret, access token/secret, and the system clock is in sync.
My configuration is like this,
<bean id="configFactory" class="twitter4j.conf.ConfigurationBuilder">
<property name="debugEnabled" value="true" />
<property name="OAuthConsumerKey" value="${twitter.consumerKey}" />
<property name="OAuthConsumerSecret" value="${twitter.consumerSecret}" />
<property name="prettyDebugEnabled" value="true" />
<property name="MBeanEnabled" value="true" />
<property name="includeEntitiesEnabled" value="false" />
<property name="tweetModeExtended" value="true"/>
</bean>
<bean id="twitterConfig" factory-bean="configFactory"
factory-method="build" />
<bean id="twitterFactory" class="twitter4j.TwitterFactory">
<constructor-arg name="conf" ref="twitterConfig" />
</bean>
<bean id="accessToken" class="twitter4j.auth.AccessToken">
<constructor-arg name="token" value="${twitter.token}" />
<constructor-arg name="tokenSecret" value="${twitter.tokenSecret}" />
</bean>
<bean id="twitter" factory-bean="twitterFactory" factory-method="getInstance">
<constructor-arg name="accessToken" ref="accessToken" />
</bean>
I am just trying to get twitter instance.