【问题标题】:Spring-xd - Error when trying to stream data with "Twittersearch"Spring-xd - 尝试使用“Twittersearch”流式传输数据时出错
【发布时间】:2014-12-23 11:51:58
【问题描述】:

我通过这个 spring xd 代码创建了一个将推文写入文件的流:

stream create --name javatweets --definition "twittersearch --query=java --consumerKey=<my_key>
--consumerSecret=<my_secret> | file" --deploy    

很遗憾,我收到以下错误消息:

WARN DeploymentsPathChildrenCache-0 annotation.AnnotationConfigApplicationContext - 
Exception encountered during context initialization - cancelling refresh attempt
org.springframework.beans.factory.BeanCreationException: Error creating bean with name
'org.springframework.integration.x.twitter.TwitterSearchChannelAdapter#0' defined in class path   resource [config/twittersearch.xml]: Cannot resolve reference to bean 'twitterTemplate' while setting  constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'twitterTemplate' defined in class path resource [config/twittersearch.xml]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.social.twitter.api.impl.TwitterTemplate]: Constructor threw exception; nested exception is org.springframework.web.client.HttpClientErrorException: 403 Forbidden

【问题讨论】:

    标签: spring spring-integration spring-xd


    【解决方案1】:

    HttpClientErrorException: 403 禁止

    您的凭据(consumerKey 和/或consumerSecret)不正确。

    【讨论】:

      猜你喜欢
      • 2020-01-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-07-04
      • 1970-01-01
      • 2016-02-17
      • 2016-12-22
      相关资源
      最近更新 更多