Struts2 ParametersInterceptor problem with oauth_token

Posted by Tahir Akram on Stack Overflow See other posts from Stack Overflow or by Tahir Akram
Published on 2009-09-30T22:03:40Z Indexed on 2010/03/20 5:11 UTC
Read the original article Hit count: 549

Filed under:
|
|

I am developing an application in Struts2 with Twitter4J at GAE/J.

I am getting following exception in the GAE log. Unable to understand whats wrong with it.

com.opensymphony.xwork2.interceptor.ParametersInterceptor setParameters: ParametersInterceptor - [setParameters]: Unexpected Exception caught setting 'oauth_token' on 'class com.action.Home: Error setting expression 'oauth_token' with value '[Ljava.lang.String;@146ac5a'

Following is my struts.xml

<!DOCTYPE struts PUBLIC

"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd">

<constant name="struts.enable.DynamicMethodInvocation" value="false" />
<constant name="struts.devMode" value="false" />

<package name="hello" extends="struts-default" >
	<action name="Home"
		class="com.action.Home">
		<result name="SUCCESS">/home.jsp</result>
		<result name="ERROR">/message.jsp</result>
	</action>
</package>

Home.java code

Twitter twitter = new Twitter();

			HttpSession session = request.getSession();

			twitter.setOAuthConsumer(FFConstants.CONSUMER_KEY, FFConstants.CONSUMER_SECRET);
			AccessToken accessToken = twitter.getOAuthAccessToken((String)session.getAttribute("token"), 
					(String)session.getAttribute("tokenSecret"));
			twitter.setOAuthAccessToken(accessToken);

			User user = twitter.verifyCredentials();

It will be great if some one give me pointer on it.

Thanks.

© Stack Overflow or respective owner

Related posts about gae-java

Related posts about twitterapi