You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Justin W (JIRA)" <ji...@apache.org> on 2016/02/02 07:29:39 UTC
[jira] [Commented] (CAMEL-9557) Facebook consumer throws
IllegalArgumentException with reading parameters
[ https://issues.apache.org/jira/browse/CAMEL-9557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15127751#comment-15127751 ]
Justin W commented on CAMEL-9557:
---------------------------------
The commit for CAMEL-9472 adds the following line in FacebookPropertiesHelper.configureReadingProperties which causes the error I believe:
{code}
configuration.setReadingOptions(readingProperties);
{code}
[GitHub|https://github.com/apache/camel/commit/846b097c2b881eac68328800bdd6a9d3017921c7]
I've reverted to 2.16.1 until this is fixed.
> Facebook consumer throws IllegalArgumentException with reading parameters
> -------------------------------------------------------------------------
>
> Key: CAMEL-9557
> URL: https://issues.apache.org/jira/browse/CAMEL-9557
> Project: Camel
> Issue Type: Bug
> Components: camel-facebook
> Affects Versions: 2.16.2
> Environment: OpenJDK Runtime Environment (IcedTea 2.6.4) (Arch Linux build 7.u95_2.6.4-1-x86_64)
> Reporter: Justin W
>
> I've configured a polling Facebook consumer with nearly default Spring configuration as follows:
> {code}
> <camel:from uri="facebook://getFeed?
> reading.since=2016-01-01T00:00:00Z&
> userId=myUserId&
> consumer.delay=60000&
> oAuthAppId=[s]&
> oAuthAppSecret=[s]&
> oAuthAccessToken=[s]
> "/>
> {code}
> However, an IllegalArgument is thrown with any reading.* parameter regardless of endpoint:
> {code}
> java.lang.IllegalArgumentException: No matching operation for getFeed, with arguments [readingOptions, reading, userId]
> {code}
> On debugging, the method FacebookEndpoint.configureProperties sets two properties on the configuration object: (readingOptions, reading).
> {code}
> FacebookPropertiesHelper.configureReadingProperties(configuration, options);
> {code}
> readingOptions is a Map which is finally size 0 after all the relevant properties are extracted into the reading parameter. However, it isn't nullified.
> In the subsequent method initState(), it tries to look for a method in FacebookMethodTypes with the signature:
> {code}
> getFeed(String userId, Reading reading)
> {code}
> Because readingOptions is non null, it looks for a readingOptions parameter as well which doesn't exist, throwing the Exception.
> Is there a workaround I can use for the moment? Thanks!
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)