Hi ,
I am working on application regarding aggregator, I am developing this application on IBM - RAD...Below is the structure of the my cofiguration file
Now this application takes some messages from input channel and then aggregator aggregates them and finally throws it to the output channel...the issues is that when I execute this appication I get the error,....Code:<?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:si="http://www.springframework.org/schema/integration" xmlns:stream="http://www.springframework.org/schema/integration/stream" xmlns:jms="http://www.springframework.org/schema/integration/jms" xmlns:task="http://www.springframework.org/schema/task" xmlns:file="http://www.springframework.org/schema/integration/file" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.0.xsd http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration-2.0.xsd http://www.springframework.org/schema/integration/jms http://www.springframework.org/schema/integration/jms/spring-integration-jms-2.0.xsd http://www.springframework.org/schema/integration/stream http://www.springframework.org/schema/integration/stream/spring-integration-stream.xsd http://www.springframework.org/schema/integration/file http://www.springframework.org/schema/integration/file/spring-integration-file-2.0.xsd"> <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="location"> <value>config.properties</value> </property> </bean> <!-- Websphere MQ connection factory config --> <bean id="jmsQueue1ConnectionFactory" class="com.ibm.mq.jms.MQQueueConnectionFactory"> <property name="queueManager"> <value>${MQ.QueueManager}</value> </property> <property name="hostName"> <value>${MQ.HostName}</value> </property> <property name="port"> <value>${MQ.Port}</value> </property> <property name="channel"> <value>${MQ.Channel}</value> </property> <property name="transportType"> <value>${MQ.TransportType}</value> </property> </bean> <bean id="jmsQueue2ConnectionFactory" class="com.ibm.mq.jms.MQQueueConnectionFactory"> <property name="queueManager"> <value>${MQ.QueueManager1}</value> </property> <property name="hostName"> <value>${MQ.HostName1}</value> </property> <property name="port"> <value>${MQ.Port1}</value> </property> <property name="channel"> <value>${MQ.Channel1}</value> </property> <property name="transportType"> <value>${MQ.TransportType1}</value> </property> </bean> <bean id="mqConnectionFactory1" class="org.springframework.jms.connection.SingleConnectionFactory"> <property name="targetConnectionFactory"> <ref bean="jmsQueue1ConnectionFactory" /> </property> </bean> <bean id="mqConnectionFactory2" class="org.springframework.jms.connection.SingleConnectionFactory"> <property name="targetConnectionFactory"> <ref bean="jmsQueue2ConnectionFactory" /> </property> </bean> <bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate"> <property name="connectionFactory"> <ref bean="mqConnectionFactory1" /> </property> <property name="defaultDestinationName"> <value>${JMS.DefaultDestinationName}</value> </property> </bean> <!-- Websphere MQ queue config. This config is used only in the absence of jndi --> <bean id="odsRequestQueue_dev1" class="com.ibm.mq.jms.MQQueue"> <property name="baseQueueManagerName" value="${JMS.BaseQueueManagerName}" /> <property name="baseQueueName" value="${JMS.BaseQueueName}" /> <property name="targetClient" value="${JMS.TargetClient}" /> </bean> <!--ActiveMQ Settings --> <!--<bean id="connectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory"> <property name="brokerURL"> <value>tcp://localhost:61616</value> </property> </bean>--> <si:channel id="input"> </si:channel> <jms:outbound-channel-adapter id="channel-to-mq" channel="input" destination-name="${queueName}" /> <jms:message-driven-channel-adapter id="mq-message-listner" channel="aggregator-input-channel" destination-name="${queueName}" concurrent-consumers="${concurrent-consumers}" /> <!-- <si:gateway id="gateway" service-interface="com.sample.agg.Gateway" default-request-channel="aggregator-input-channel"> </si:gateway> --> <si:channel id="aggregator-input-channel"> <si:queue capacity="${queueCapacity}" /> </si:channel> <si:aggregator id="aggregator" input-channel="aggregator-input-channel" output-channel="aggregator-output-channel" ref="sampleAggregator" method="aggregateMessagaes" correlation-strategy="correlationBean" correlation-strategy-method="correlationStrategy" release-strategy="releaseStrategyBean" release-strategy-method="releaseStrategy" message-store="messageStore" order="1" send-partial-result-on-expiry="true" send-timeout="1000" > </si:aggregator> <bean id="sampleAggregator" class="com.walgreens.ods.producer.Aggregator"></bean> <!-- This bean clubs the List of messages --> <bean id="correlationBean" class="com.walgreens.ods.producer.CorrelationBean"/> <bean id="releaseStrategyBean" class="com.walgreens.ods.producer.ReleaseStrategyBean"> <!--This bean if results to true then messages are released --> <property name="recordLength" value="${recordLength}" /> </bean> <!-- <si:channel id="throwAwayChannel" > <si:queue capacity="${queueCapacity}" /> </si:channel> --> <file:outbound-channel-adapter channel="aggregator-output-channel" directory="${aggregatorOutputDirectoryPath}" filename-generator-expression="${outputFileNameExpression}" temporary-file-suffix="_swp" /> <!-- <file:outbound-channel-adapter channel="throwAwayChannel" directory="${aggregatorOutputDirectoryPath}" filename-generator-expression="'discard-'+headers.getTimestamp()+'.xml'" temporary-file-suffix="_swp" /> --> <si:channel id="aggregator-output-channel"> <si:queue capacity="${queueCapacity}" /> </si:channel> <task:scheduler id="scheduler" /> <task:scheduled-tasks scheduler="scheduler"> <task:scheduled ref="reaper" method="run" fixed-rate="${reaperSchedulerFixedRate}" /> </task:scheduled-tasks> <bean id="reaper" class="org.springframework.integration.store.MessageGroupStoreReaper"> <property name="messageGroupStore" ref="messageStore" /> <property name="timeout" value="${reaperTimeOut}" /> </bean> <bean id="messageStore" class="org.springframework.integration.store.SimpleMessageStore" /> <!-- <si:service-activator input-channel="aggregator-output-channel" ref="printerService" method="printString" ></si:service-activator> <bean id="printerService" class="com.sample.agg.PrinterService"></bean> --> <si:poller max-messages-per-poll="1" id="defaultPoller" default="true"> <si:interval-trigger interval="${pollerInterval}" /> </si:poller> <!-- <si:inbound-channel-adapter id="test" ref="exampleReleaseStrategy" method="releaseStrategy" > <si:poller fixed-rate="5000"/> </si:inbound-channel-adapter> --> </beans>
Please advice how to overcome from this problem....??, 2011 5:13:21 PM org.springframework.context.support.AbstractApplic ationContext prepareRefresh
INFO: Refreshing org.springframework.context.support.ClassPathXmlAp plicationContext@228a228a: startup date [Mon Nov 14 17:13:21 IST 2011]; root of context hierarchy
Nov 14, 2011 5:13:22 PM org.springframework.beans.factory.xml.XmlBeanDefin itionReader loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [spring-config.xml]
Exception in thread "main" org.springframework.beans.factory.parsing.BeanDefi nitionParsingException: Configuration problem: A <poller> must have one and only one trigger configuration.
Offending resource: class path resource [spring-config.xml]
at org.springframework.beans.factory.parsing.FailFast ProblemReporter.error(FailFastProblemReporter.java :68)
at org.springframework.beans.factory.parsing.ReaderCo ntext.error(ReaderContext.java:85)
at org.springframework.beans.factory.parsing.ReaderCo ntext.error(ReaderContext.java:72)
at org.springframework.integration.config.xml.PollerP arser.configureTrigger(PollerParser.java:156)
at org.springframework.integration.config.xml.PollerP arser.parseInternal(PollerParser.java:90)
at org.springframework.beans.factory.xml.AbstractBean DefinitionParser.parse(AbstractBeanDefinitionParse r.java:59)
at
at
![]()



Reply With Quote
