Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-8257

[camel-facebook] Cannot explicity configure FacebookEndpoint

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Not A Problem
    • 2.14.1
    • None
    • camel-facebook
    • None
    • Unknown

    Description

      This works:

      final facebookHome = getContext().getEndpoint("facebook://home?consumer.delay=5000&oAuthAppId=${it.facebookSys.facebookAppId}&oAuthAppSecret=${it.facebookSys.facebookAppSecret}&oAuthAccessToken=${it.facebookSys.facebookAccessToken}&reading.since=${sometimeAgo}",
          FacebookEndpoint.class)
      from(facebookHome).to("log:facebook")
      

      But not this one:

      final facebookHome = getContext().getEndpoint("facebook://home", FacebookEndpoint.class)
      facebookHome.configuration.setOAuthAppId(it.facebookSys.facebookAppId)
      facebookHome.configuration.setOAuthAppSecret(it.facebookSys.facebookAppSecret)
      facebookHome.configuration.setOAuthAccessToken(it.facebookSys.facebookAccessToken)
      from(facebookHome).to("log:facebook")
      

      Error:

      2015-01-19 05:57:01.131  INFO 27487 --- [           main] id.ac.itb.lumen.social.LumenRouteConfig  : Initializing facebookRouteBuilder
      2015-01-19 05:57:01.169  INFO 27487 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'facebookRouteBuilder' of type [class id.ac.itb.lumen.social.LumenRouteConfig$1] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
      2015-01-19 05:57:01.170  INFO 27487 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'lumenCamelConfig' of type [class id.ac.itb.lumen.social.LumenCamelConfig$$EnhancerBySpringCGLIB$$6d4a911f] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
      2015-01-19 05:57:01.487  WARN 27487 --- [           main] o.a.c.i.DefaultCamelBeanPostProcessor    : No CamelContext defined yet so cannot inject into bean: org.apache.camel.component.facebook.FacebookComponent
      2015-01-19 05:57:01.528  INFO 27487 --- [           main] o.a.c.i.converter.DefaultTypeConverter   : Loaded 183 type converters
      2015-01-19 05:57:01.528  INFO 27487 --- [           main] i.a.itb.lumen.social.LumenRouteConfig$1  : endpoint methodName: home null
      2015-01-19 05:57:01.528  INFO 27487 --- [           main] i.a.itb.lumen.social.LumenRouteConfig$1  : the endpoint: Endpoint[facebook://home]
      2015-01-19 05:57:01.549  INFO 27487 --- [           main] o.a.camel.spring.SpringCamelContext      : Apache Camel 2.14.1 (CamelContext: camel-1) is starting
      2015-01-19 05:57:01.550  INFO 27487 --- [           main] o.a.c.m.ManagedManagementStrategy        : JMX is enabled
      2015-01-19 05:57:01.673  INFO 27487 --- [           main] o.a.camel.spring.SpringCamelContext      : AllowUseOriginalMessage is enabled. If access to the original message is not needed, then its recommended to turn this option off as it may improve performance.
      2015-01-19 05:57:01.674  INFO 27487 --- [           main] o.a.camel.spring.SpringCamelContext      : StreamCaching is not in use. If using streams then its recommended to enable stream caching. See more details at http://camel.apache.org/stream-caching.html
      2015-01-19 05:57:01.682  INFO 27487 --- [           main] o.a.camel.spring.SpringCamelContext      : Apache Camel 2.14.1 (CamelContext: camel-1) is shutting down
      2015-01-19 05:57:01.686  INFO 27487 --- [           main] o.a.camel.spring.SpringCamelContext      : Apache Camel 2.14.1 (CamelContext: camel-1) uptime 0.136 seconds
      2015-01-19 05:57:01.687  INFO 27487 --- [           main] o.a.camel.spring.SpringCamelContext      : Apache Camel 2.14.1 (CamelContext: camel-1) is shutdown in 0.003 seconds
      2015-01-19 05:57:01.693  WARN 27487 --- [           main] s.c.a.AnnotationConfigApplicationContext : Exception encountered during context initialization - cancelling refresh attempt
      
      org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'camelContext' defined in class path resource [id/ac/itb/lumen/social/LumenCamelConfig.class]: Invocation of init method failed; nested exception is java.lang.NullPointerException
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1566)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
      	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
      	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
      	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:762)
      	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)
      	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
      	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:691)
      	at org.springframework.boot.SpringApplication.run(SpringApplication.java:321)
      	at org.springframework.boot.SpringApplication.run(SpringApplication.java:961)
      	at org.springframework.boot.SpringApplication.run(SpringApplication.java:950)
      	at org.springframework.boot.SpringApplication$run.call(Unknown Source)
      	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
      	at id.ac.itb.lumen.social.LumenSocialApplication.main(LumenSocialApplication.groovy:14)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:483)
      	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
      Caused by: java.lang.NullPointerException: null
      	at java.util.Collections$UnmodifiableCollection.<init>(Collections.java:1026)
      	at java.util.Collections$UnmodifiableList.<init>(Collections.java:1302)
      	at java.util.Collections.unmodifiableList(Collections.java:1287)
      	at org.apache.camel.component.facebook.FacebookEndpoint.getCandidates(FacebookEndpoint.java:182)
      	at org.apache.camel.component.facebook.FacebookConsumer.findMethod(FacebookConsumer.java:126)
      	at org.apache.camel.component.facebook.FacebookConsumer.<init>(FacebookConsumer.java:75)
      	at org.apache.camel.component.facebook.FacebookEndpoint.createConsumer(FacebookEndpoint.java:84)
      	at org.apache.camel.impl.EventDrivenConsumerRoute.addServices(EventDrivenConsumerRoute.java:65)
      	at org.apache.camel.impl.DefaultRoute.onStartingServices(DefaultRoute.java:80)
      	at org.apache.camel.impl.RouteService.warmUp(RouteService.java:134)
      	at org.apache.camel.impl.DefaultCamelContext.doWarmUpRoutes(DefaultCamelContext.java:2369)
      	at org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:2299)
      	at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:2081)
      	at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1941)
      	at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1767)
      	at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
      	at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1735)
      	at org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:254)
      	at org.apache.camel.spring.SpringCamelContext.afterPropertiesSet(SpringCamelContext.java:106)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1625)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1562)
      	... 23 common frames omitted
      
      2015-01-19 05:57:01.694  INFO 27487 --- [           main] .b.l.ClasspathLoggingApplicationListener : Application failed to start with classpath: [file:/usr/lib/jvm/java-8-oracle/jre/lib/deploy.jar, file:/usr/lib/jvm/java-8-oracle/jre/lib/charsets.jar, file:/usr/lib/jvm/java-8-oracle/jre/lib/jfr.jar, file:/usr/lib/jvm/java-8-oracle/jre/lib/plugin.jar, file:/usr/lib/jvm/java-8-oracle/jre/lib/management-agent.jar, file:/usr/lib/jvm/java-8-oracle/jre/lib/javaws.jar, file:/usr/lib/jvm/java-8-oracle/jre/lib/jsse.jar, file:/usr/lib/jvm/java-8-oracle/jre/lib/jfxswt.jar, file:/usr/lib/jvm/java-8-oracle/jre/lib/jce.jar, file:/usr/lib/jvm/java-8-oracle/jre/lib/resources.jar, file:/usr/lib/jvm/java-8-oracle/jre/lib/rt.jar, file:/usr/lib/jvm/java-8-oracle/jre/lib/ext/sunjce_provider.jar, file:/usr/lib/jvm/java-8-oracle/jre/lib/ext/dnsns.jar, file:/usr/lib/jvm/java-8-oracle/jre/lib/ext/localedata.jar, file:/usr/lib/jvm/java-8-oracle/jre/lib/ext/zipfs.jar, file:/usr/lib/jvm/java-8-oracle/jre/lib/ext/nashorn.jar, file:/usr/lib/jvm/java-8-oracle/jre/lib/ext/sunpkcs11.jar, file:/usr/lib/jvm/java-8-oracle/jre/lib/ext/jfxrt.jar, file:/usr/lib/jvm/java-8-oracle/jre/lib/ext/cldrdata.jar, file:/usr/lib/jvm/java-8-oracle/jre/lib/ext/sunec.jar, file:/home/ceefour/git/lumen/social/target/classes/, file:/home/ceefour/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.5.0/jackson-databind-2.5.0.jar, file:/home/ceefour/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.5.0/jackson-annotations-2.5.0.jar, file:/home/ceefour/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.5.0/jackson-core-2.5.0.jar, file:/home/ceefour/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-guava/2.5.0/jackson-datatype-guava-2.5.0.jar, file:/home/ceefour/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-joda/2.5.0/jackson-datatype-joda-2.5.0.jar, file:/home/ceefour/.m2/repository/joda-time/joda-time/2.5/joda-time-2.5.jar, file:/home/ceefour/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar, file:/home/ceefour/.m2/repository/org/springframework/data/spring-data-commons/1.9.1.RELEASE/spring-data-commons-1.9.1.RELEASE.jar, file:/home/ceefour/.m2/repository/org/springframework/spring-core/4.1.4.RELEASE/spring-core-4.1.4.RELEASE.jar, file:/home/ceefour/.m2/repository/org/springframework/spring-beans/4.1.4.RELEASE/spring-beans-4.1.4.RELEASE.jar, file:/home/ceefour/.m2/repository/org/slf4j/slf4j-api/1.7.8/slf4j-api-1.7.8.jar, file:/home/ceefour/.m2/repository/org/slf4j/jcl-over-slf4j/1.7.8/jcl-over-slf4j-1.7.8.jar, file:/home/ceefour/.m2/repository/com/google/guava/guava/18.0/guava-18.0.jar, file:/home/ceefour/.m2/repository/javax/enterprise/cdi-api/1.0-SP4/cdi-api-1.0-SP4.jar, file:/home/ceefour/.m2/repository/org/jboss/spec/javax/interceptor/jboss-interceptors-api_1.1_spec/1.0.0.Beta1/jboss-interceptors-api_1.1_spec-1.0.0.Beta1.jar, file:/home/ceefour/.m2/repository/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar, file:/home/ceefour/.m2/repository/javax/inject/javax.inject/1/javax.inject-1.jar, file:/home/ceefour/.m2/repository/org/apache/camel/camel-spring-javaconfig/2.14.1/camel-spring-javaconfig-2.14.1.jar, file:/home/ceefour/.m2/repository/org/apache/camel/camel-core/2.14.1/camel-core-2.14.1.jar, file:/home/ceefour/.m2/repository/com/sun/xml/bind/jaxb-impl/2.2.7/jaxb-impl-2.2.7.jar, file:/home/ceefour/.m2/repository/com/sun/xml/bind/jaxb-core/2.2.7/jaxb-core-2.2.7.jar, file:/home/ceefour/.m2/repository/javax/xml/bind/jaxb-api/2.2.7/jaxb-api-2.2.7.jar, file:/home/ceefour/.m2/repository/com/sun/istack/istack-commons-runtime/2.16/istack-commons-runtime-2.16.jar, file:/home/ceefour/.m2/repository/com/sun/xml/fastinfoset/FastInfoset/1.2.12/FastInfoset-1.2.12.jar, file:/home/ceefour/.m2/repository/javax/xml/bind/jsr173_api/1.0/jsr173_api-1.0.jar, file:/home/ceefour/.m2/repository/org/apache/camel/camel-spring/2.14.1/camel-spring-2.14.1.jar, file:/home/ceefour/.m2/repository/org/springframework/spring-context/4.1.4.RELEASE/spring-context-4.1.4.RELEASE.jar, file:/home/ceefour/.m2/repository/org/springframework/spring-expression/4.1.4.RELEASE/spring-expression-4.1.4.RELEASE.jar, file:/home/ceefour/.m2/repository/org/springframework/spring-aop/4.1.4.RELEASE/spring-aop-4.1.4.RELEASE.jar, file:/home/ceefour/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar, file:/home/ceefour/.m2/repository/org/springframework/spring-test/4.1.4.RELEASE/spring-test-4.1.4.RELEASE.jar, file:/home/ceefour/.m2/repository/org/apache/servicemix/bundles/org.apache.servicemix.bundles.cglib/2.1_3_7/org.apache.servicemix.bundles.cglib-2.1_3_7.jar, file:/home/ceefour/.m2/repository/org/apache/camel/camel-facebook/2.14.1/camel-facebook-2.14.1.jar, file:/home/ceefour/.m2/repository/org/apache/camel/spi-annotations/2.14.1/spi-annotations-2.14.1.jar, file:/home/ceefour/.m2/repository/org/facebook4j/facebook4j-core/1.1.12/facebook4j-core-1.1.12.jar, file:/home/ceefour/.m2/repository/org/apache/camel/camel-twitter/2.14.1/camel-twitter-2.14.1.jar, file:/home/ceefour/.m2/repository/org/twitter4j/twitter4j-core/4.0.2/twitter4j-core-4.0.2.jar, file:/home/ceefour/.m2/repository/org/twitter4j/twitter4j-stream/4.0.2/twitter4j-stream-4.0.2.jar, file:/home/ceefour/.m2/repository/org/apache/camel/camel-amqp/2.14.1/camel-amqp-2.14.1.jar, file:/home/ceefour/.m2/repository/org/apache/camel/camel-jms/2.14.1/camel-jms-2.14.1.jar, file:/home/ceefour/.m2/repository/org/springframework/spring-jms/4.1.4.RELEASE/spring-jms-4.1.4.RELEASE.jar, file:/home/ceefour/.m2/repository/org/springframework/spring-messaging/4.1.4.RELEASE/spring-messaging-4.1.4.RELEASE.jar, file:/home/ceefour/.m2/repository/org/springframework/spring-tx/4.1.4.RELEASE/spring-tx-4.1.4.RELEASE.jar, file:/home/ceefour/.m2/repository/org/springframework/boot/spring-boot-starter/1.2.1.RELEASE/spring-boot-starter-1.2.1.RELEASE.jar, file:/home/ceefour/.m2/repository/org/springframework/boot/spring-boot/1.2.1.RELEASE/spring-boot-1.2.1.RELEASE.jar, file:/home/ceefour/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/1.2.1.RELEASE/spring-boot-autoconfigure-1.2.1.RELEASE.jar, file:/home/ceefour/.m2/repository/org/springframework/boot/spring-boot-starter-logging/1.2.1.RELEASE/spring-boot-starter-logging-1.2.1.RELEASE.jar, file:/home/ceefour/.m2/repository/org/slf4j/jul-to-slf4j/1.7.8/jul-to-slf4j-1.7.8.jar, file:/home/ceefour/.m2/repository/org/slf4j/log4j-over-slf4j/1.7.8/log4j-over-slf4j-1.7.8.jar, file:/home/ceefour/.m2/repository/ch/qos/logback/logback-classic/1.1.2/logback-classic-1.1.2.jar, file:/home/ceefour/.m2/repository/ch/qos/logback/logback-core/1.1.2/logback-core-1.1.2.jar, file:/home/ceefour/.m2/repository/org/yaml/snakeyaml/1.14/snakeyaml-1.14.jar, file:/home/ceefour/.m2/repository/org/codehaus/groovy/groovy/2.3.8/groovy-2.3.8.jar, file:/home/ceefour/idea/lib/idea_rt.jar]
      2015-01-19 05:57:01.694  INFO 27487 --- [           main] utoConfigurationReportLoggingInitializer : 
      
      Error starting ApplicationContext. To display the auto-configuration report enabled debug logging (start with --debug)
      
      
      2015-01-19 05:57:01.694 ERROR 27487 --- [           main] o.s.boot.SpringApplication               : Application startup failed
      
      org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'camelContext' defined in class path resource [id/ac/itb/lumen/social/LumenCamelConfig.class]: Invocation of init method failed; nested exception is java.lang.NullPointerException
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1566)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
      	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
      	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
      	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:762)
      	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)
      	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
      	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:691)
      	at org.springframework.boot.SpringApplication.run(SpringApplication.java:321)
      	at org.springframework.boot.SpringApplication.run(SpringApplication.java:961)
      	at org.springframework.boot.SpringApplication.run(SpringApplication.java:950)
      	at org.springframework.boot.SpringApplication$run.call(Unknown Source)
      	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
      	at id.ac.itb.lumen.social.LumenSocialApplication.main(LumenSocialApplication.groovy:14)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:483)
      	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
      Caused by: java.lang.NullPointerException: null
      	at java.util.Collections$UnmodifiableCollection.<init>(Collections.java:1026)
      	at java.util.Collections$UnmodifiableList.<init>(Collections.java:1302)
      	at java.util.Collections.unmodifiableList(Collections.java:1287)
      	at org.apache.camel.component.facebook.FacebookEndpoint.getCandidates(FacebookEndpoint.java:182)
      	at org.apache.camel.component.facebook.FacebookConsumer.findMethod(FacebookConsumer.java:126)
      	at org.apache.camel.component.facebook.FacebookConsumer.<init>(FacebookConsumer.java:75)
      	at org.apache.camel.component.facebook.FacebookEndpoint.createConsumer(FacebookEndpoint.java:84)
      	at org.apache.camel.impl.EventDrivenConsumerRoute.addServices(EventDrivenConsumerRoute.java:65)
      	at org.apache.camel.impl.DefaultRoute.onStartingServices(DefaultRoute.java:80)
      	at org.apache.camel.impl.RouteService.warmUp(RouteService.java:134)
      	at org.apache.camel.impl.DefaultCamelContext.doWarmUpRoutes(DefaultCamelContext.java:2369)
      	at org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:2299)
      	at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:2081)
      	at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1941)
      	at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1767)
      	at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
      	at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1735)
      	at org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:254)
      	at org.apache.camel.spring.SpringCamelContext.afterPropertiesSet(SpringCamelContext.java:106)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1625)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1562)
      	... 23 common frames omitted
      
      Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'camelContext' defined in class path resource [id/ac/itb/lumen/social/LumenCamelConfig.class]: Invocation of init method failed; nested exception is java.lang.NullPointerException
      Related cause: org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'camelContext': Requested bean is currently in creation: Is there an unresolvable circular reference?
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1566)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
      	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
      	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
      	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:762)
      	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)
      	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
      	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:691)
      	at org.springframework.boot.SpringApplication.run(SpringApplication.java:321)
      	at org.springframework.boot.SpringApplication.run(SpringApplication.java:961)
      	at org.springframework.boot.SpringApplication.run(SpringApplication.java:950)
      	at org.springframework.boot.SpringApplication$run.call(Unknown Source)
      	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
      	at id.ac.itb.lumen.social.LumenSocialApplication.main(LumenSocialApplication.groovy:14)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:483)
      	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
      Caused by: java.lang.NullPointerException
      	at java.util.Collections$UnmodifiableCollection.<init>(Collections.java:1026)
      	at java.util.Collections$UnmodifiableList.<init>(Collections.java:1302)
      	at java.util.Collections.unmodifiableList(Collections.java:1287)
      	at org.apache.camel.component.facebook.FacebookEndpoint.getCandidates(FacebookEndpoint.java:182)
      	at org.apache.camel.component.facebook.FacebookConsumer.findMethod(FacebookConsumer.java:126)
      	at org.apache.camel.component.facebook.FacebookConsumer.<init>(FacebookConsumer.java:75)
      	at org.apache.camel.component.facebook.FacebookEndpoint.createConsumer(FacebookEndpoint.java:84)
      	at org.apache.camel.impl.EventDrivenConsumerRoute.addServices(EventDrivenConsumerRoute.java:65)
      	at org.apache.camel.impl.DefaultRoute.onStartingServices(DefaultRoute.java:80)
      	at org.apache.camel.impl.RouteService.warmUp(RouteService.java:134)
      	at org.apache.camel.impl.DefaultCamelContext.doWarmUpRoutes(DefaultCamelContext.java:2369)
      	at org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:2299)
      	at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:2081)
      	at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1941)
      	at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1767)
      	at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
      	at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1735)
      	at org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:254)
      	at org.apache.camel.spring.SpringCamelContext.afterPropertiesSet(SpringCamelContext.java:106)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1625)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1562)
      	... 23 more
      Related cause:
      org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'camelContext': Requested bean is currently in creation: Is there an unresolvable circular reference?
      	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.beforeSingletonCreation(DefaultSingletonBeanRegistry.java:347)
      	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
      	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:523)
      	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:512)
      	at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1052)
      	at org.apache.camel.spring.CamelBeanPostProcessor$1.getOrLookupCamelContext(CamelBeanPostProcessor.java:73)
      	at org.apache.camel.impl.DefaultCamelBeanPostProcessor.postProcessBeforeInitialization(DefaultCamelBeanPostProcessor.java:87)
      	at org.apache.camel.spring.CamelBeanPostProcessor.postProcessBeforeInitialization(CamelBeanPostProcessor.java:148)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:408)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1558)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:342)
      	at org.apache.camel.spring.spi.SpringInjector.newInstance(SpringInjector.java:39)
      	at org.apache.camel.impl.DefaultComponentResolver.resolveComponent(DefaultComponentResolver.java:87)
      	at org.apache.camel.impl.DefaultCamelContext.getComponent(DefaultCamelContext.java:366)
      	at org.apache.camel.impl.DefaultCamelContext.getComponent(DefaultCamelContext.java:353)
      	at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:517)
      	at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:560)
      	at id.ac.itb.lumen.social.LumenRouteConfig$_1_configure_closure1.doCall(LumenRouteConfig.groovy:46)
      	at id.ac.itb.lumen.social.LumenRouteConfig$_1_configure_closure1.call(LumenRouteConfig.groovy)
      	at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1379)
      	at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1372)
      	at id.ac.itb.lumen.social.LumenRouteConfig$1.configure(LumenRouteConfig.groovy:41)
      	at org.apache.camel.builder.RouteBuilder.checkInitialized(RouteBuilder.java:383)
      	at org.apache.camel.builder.RouteBuilder.configureRoutes(RouteBuilder.java:324)
      	at org.apache.camel.builder.RouteBuilder.addRoutesToCamelContext(RouteBuilder.java:307)
      	at org.apache.camel.impl.DefaultCamelContext.addRoutes(DefaultCamelContext.java:698)
      	at org.apache.camel.spring.javaconfig.CamelConfiguration.camelContext(CamelConfiguration.java:145)
      	at id.ac.itb.lumen.social.LumenCamelConfig$$EnhancerBySpringCGLIB$$6d4a911f.CGLIB$camelContext$44(<generated>)
      	at id.ac.itb.lumen.social.LumenCamelConfig$$EnhancerBySpringCGLIB$$6d4a911f$$FastClassBySpringCGLIB$$3bbce5a6.invoke(<generated>)
      	at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
      	at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:309)
      	at id.ac.itb.lumen.social.LumenCamelConfig$$EnhancerBySpringCGLIB$$6d4a911f.camelContext(<generated>)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:483)
      	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
      	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1111)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1006)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
      	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
      	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
      	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:762)
      	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)
      	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
      	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:691)
      	at org.springframework.boot.SpringApplication.run(SpringApplication.java:321)
      	at org.springframework.boot.SpringApplication.run(SpringApplication.java:961)
      	at org.springframework.boot.SpringApplication.run(SpringApplication.java:950)
      	at org.springframework.boot.SpringApplication$run.call(Unknown Source)
      	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
      	at id.ac.itb.lumen.social.LumenSocialApplication.main(LumenSocialApplication.groovy:14)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:483)
      	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
      

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            ceefour Hendy Irawan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: