You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2016/02/03 08:32:39 UTC
[jira] [Resolved] (CAMEL-9557) Facebook consumer throws
IllegalArgumentException with reading parameters
[ https://issues.apache.org/jira/browse/CAMEL-9557?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-9557.
--------------------------------
Resolution: Fixed
Thanks for reporting.
> 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
> Assignee: Claus Ibsen
> Fix For: 2.16.3, 2.17.0
>
>
> 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)