Announcement Announcement Module
Collapse
No announcement yet.
Issue with Pollar Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Issue with Pollar

    I am getting below exception
    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.integration.config.ConsumerEn dpointFactoryBean#1': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: No poller has been defined for endpoint 'org.springframework.integration.config.ConsumerEn dpointFactoryBean#1', and no default poller is available within the context.
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1420)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:519)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:456)
    at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 93)
    at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:222)
    at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:290 )
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:192)
    at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:567)
    at org.springframework.context.support.AbstractApplic ationContext.finishBeanFactoryInitialization(Abstr actApplicationContext.java:895)
    at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:425)
    at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:139)
    at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:83)
    at com.messaging.springintegration.test.main(test.jav a:35)
    Caused by: java.lang.IllegalArgumentException: No poller has been defined for endpoint 'org.springframework.integration.config.ConsumerEn dpointFactoryBean#1', and no default poller is available within the context.
    at org.springframework.util.Assert.notNull(Assert.jav a:112)
    at org.springframework.integration.config.ConsumerEnd pointFactoryBean.initializeEndpoint(ConsumerEndpoi ntFactoryBean.java:180)
    at org.springframework.integration.config.ConsumerEnd pointFactoryBean.afterPropertiesSet(ConsumerEndpoi ntFactoryBean.java:135)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:1477)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1417)
    ... 12 more


    -------------------------------------------------------------------------------------------------------------------------------------------------

    My configuration file is

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:int="http://www.springframework.org/schema/integration"
    xmlns:jms="http://www.springframework.org/schema/integration/jms"
    xmlns:context="http://www.springframework.org/schema/context"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schem...-beans-3.0.xsd http://www.springframework.org/schema/integration http://www.springframework.org/schem...ration-2.0.xsd http://www.springframework.org/schema/integration/jms http://www.springframework.org/schem...on-jms-2.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">




    <context:component-scan base-package="com.messaging.springintegration" />

    <int:channel id="output" >
    <int:queue capacity="10" />
    </int:channel>
    <int:channel id="input" />
    <jms:outbound-channel-adapter channel="input" destination-name="requestQueueamit15" />
    <jms:message-driven-channel-adapter channel="output" destination-name="requestQueueamit15" />

    <int:header-value-router header-name="type" ignore-channel-name-resolution-failures="true"
    input-channel="output">
    <int:mapping value="inventory" channel="inventory"/>
    </int:header-value-router>

    <int:channel id="inventory">
    <int:queue capacity="10" />
    </int:channel>





    <int:outbound-channel-adapter channel="inventory" ref="shouter" method="shout">
    <intoller fixed-rate="3000"/>
    </int:outbound-channel-adapter>

    -------------------------------------------------------------------------------------------------------------------------------

    I want to know why do we need Pller in my case because I am putting the message from MQ to output channel and than my Router will route the message to channel Inventory by checking the header.Although inventory is Pollable so i have defined the Inbound adaptor which will to process the inventory messages.

    So my question is why do we need Poller some extra pollar.

  • #2
    The channel named 'output' has a <queue> sub-element. Therefore any downstream consumers of that (those with input-channel="output") will need to have either a <poller> sub-element or a single default poller configured as a top-level component.

    If you don't need the <queue> sub-element, then leave it out - the channel becomes a direct channel in that case and is not only simpler but probably better suited to your use-case (in terms of transactional context, etc). Please read the reference guide - it covers all of this basic information in quite a bit of detail: http://static.springsource.org/sprin...nce/htmlsingle

    Comment


    • #3
      I need to use queue because i will recieve n number of messages from MQ to output channel.When I put the default pollar like
      <intoller default="true" max-messages-per-poll="10" fixed-rate="3000"/>
      i am getting the below exception although aopaliance.jar is there in my classpath

      INFO: Destroying singletons in org.springframework.beans.factory.support.DefaultL istableBeanFactory@10ffb38: defining beans [customer,jmsConfiguration,spittleAlertHandler,stri ngHandler,xmlConfiguration,org.springframework.con text.annotation.internalConfigurationAnnotationPro cessor,org.springframework.context.annotation.inte rnalAutowiredAnnotationProcessor,org.springframewo rk.context.annotation.internalRequiredAnnotationPr ocessor,org.springframework.context.annotation.int ernalCommonAnnotationProcessor,org.springframework .integration.internalDefaultConfiguringBeanFactory PostProcessor,output,input,org.springframework.int egration.jms.JmsSendingMessageHandler#0,org.spring framework.integration.config.ConsumerEndpointFacto ryBean#0,org.springframework.jms.listener.DefaultM essageListenerContainer#0,org.springframework.inte gration.jms.ChannelPublishingJmsMessageListener#0, org.springframework.integration.jms.JmsMessageDriv enEndpoint#0,org.springframework.integration.confi g.RouterFactoryBean#0,org.springframework.integrat ion.config.ConsumerEndpointFactoryBean#1,inventory ,org.springframework.integration.handler.MethodInv okingMessageHandler#0,org.springframework.scheduli ng.support.PeriodicTrigger#0,org.springframework.i ntegration.config.ConsumerEndpointFactoryBean#2,or g.springframework.scheduling.support.PeriodicTrigg er#1,org.springframework.integration.context.defau ltPollerMetadata,shouter,connectionFactory,marshal ler,nullChannel,errorChannel,_org.springframework. integration.errorLogger,taskScheduler,org.springfr amework.integration.config.IdGeneratorConfigurer#0]; root of factory hierarchy
      org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.integration.config.ConsumerEn dpointFactoryBean#1': Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.integration.context.defaultPo llerMetadata': Initialization of bean failed; nested exception is java.lang.TypeNotPresentException: Type org.aopalliance.aop.Advice not present
      at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1420)
      at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:519)
      at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:456)
      at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 93)
      at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:222)
      at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:290 )
      at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:192)
      at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:567)
      at org.springframework.context.support.AbstractApplic ationContext.finishBeanFactoryInitialization(Abstr actApplicationContext.java:895)
      at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:425)
      at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:139)
      at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:83)
      at com.messaging.springintegration.test.main(test.jav a:35)
      Caused by: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.integration.context.defaultPo llerMetadata': Initialization of bean failed; nested exception is java.lang.TypeNotPresentException: Type org.aopalliance.aop.Advice not present
      at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:527)
      at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:456)
      at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 93)
      at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:222)
      at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:290 )
      at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:196)
      at org.springframework.integration.context.Integratio nContextUtils.getBeanOfType(IntegrationContextUtil s.java:104)
      at org.springframework.integration.context.Integratio nContextUtils.getDefaultPollerMetadata(Integration ContextUtils.java:88)
      at org.springframework.integration.config.ConsumerEnd pointFactoryBean.initializeEndpoint(ConsumerEndpoi ntFactoryBean.java:179)
      at org.springframework.integration.config.ConsumerEnd pointFactoryBean.afterPropertiesSet(ConsumerEndpoi ntFactoryBean.java:135)
      at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:1477)
      at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1417)
      ... 12 more
      Caused by: java.lang.TypeNotPresentException: Type org.aopalliance.aop.Advice not present
      at sun.reflect.generics.factory.CoreReflectionFactory .makeNamedType(CoreReflectionFactory.java:98)
      at sun.reflect.generics.visitor.Reifier.visitClassTyp eSignature(Reifier.java:107)
      at sun.reflect.generics.tree.ClassTypeSignature.accep t(ClassTypeSignature.java:31)
      at sun.reflect.generics.visitor.Reifier.reifyTypeArgu ments(Reifier.java:50)
      at sun.reflect.generics.visitor.Reifier.visitClassTyp eSignature(Reifier.java:120)
      at sun.reflect.generics.tree.ClassTypeSignature.accep t(ClassTypeSignature.java:31)
      at sun.reflect.generics.repository.MethodRepository.g etReturnType(MethodRepository.java:50)
      at java.lang.reflect.Method.getGenericReturnType(Meth od.java:236)
      at org.springframework.core.GenericTypeResolver.resol veReturnType(GenericTypeResolver.java:98)
      at org.springframework.beans.GenericTypeAwareProperty Descriptor.getPropertyType(GenericTypeAwarePropert yDescriptor.java:126)
      at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.isExcludedFromDependenc yCheck(AbstractAutowireCapableBeanFactory.java:123 4)
      at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.filterPropertyDescripto rsForDependencyCheck(AbstractAutowireCapableBeanFa ctory.java:1211)
      at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.populateBean(AbstractAu towireCapableBeanFactory.java:1069)
      at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:517)
      ... 23 more
      Caused by: java.lang.ClassNotFoundException: org.aopalliance.aop.Advice
      at java.net.URLClassLoader$1.run(URLClassLoader.java: 202)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.j ava:190)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:3 06)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:301)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:2 47)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:247)
      at sun.reflect.generics.factory.CoreReflectionFactory .makeNamedType(CoreReflectionFactory.java:95)
      ... 36 more

      Comment


      • #4
        As exception states, you are missing aopaliance JAR from the classpath

        Comment


        • #5
          Also, I would suggest to look at the Spring Integration samples especially JMS https://github.com/SpringSource/spri...ration-samples

          Comment


          • #6
            i Oleg this jar is already there in my classpath any other clue because this issue come aonly after adding the pollar.

            Comment


            • #7
              No, the JAR is clearly not on your classpath. I don't know how your classpath is setup, but your runtime doesn't see it hence CNFE

              Comment

              Working...
              X