Hi all
i have tried to add int:event namespace to my spring integ app and i am getting this exception
What am i doing wrong in my xml config file? here it isCode:Exception in thread "main" org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 194 in XML document from class path resource [si-shares-pipeline.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'int-event:inbound-channel-adapter'.
could anyone assist?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:context="http://www.springframework.org/schema/context" xmlns:si="http://www.springframework.org/schema/integration" xmlns:int-event="http://www.springframework.org/schema/integration/event" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration-1.0.xsd http://www.springframework.org/schema/integration/event/ http://www.springframework.org/schema/integration/event/spring-integration-event-2.0.xsd"> <si:channel id="shares-input"/> <si:channel id="shares-output"/> <si:channel id="shares-process"/> <si:channel id="shares-data"/> <si:channel id="shares-sink"/> <si:channel id="shares-insiderTrading"/> <si:channel id="edgarChannel"/> <si:channel id="globalNews"/> <si:channel id="shares-historic"/> <si:channel id="shares-volatility"/> <si:channel id="option-data"/> <si:channel id="option-sink"/> <!-- This channel is the input for the pipeline --> <si:chain input-channel="shares-input" output-channel="shares-sink"> <!-- Main Router --> <si:transformer ref="sharesTransformer" method="loadPortfolioShares"/> <si:splitter/> </si:chain> <si:chain input-channel="shares-historic" output-channel="shares-output"> <si:transformer ref="sharesTransformer" method="loadVolatilities"/> <si:splitter/> <si:service-activator ref="ws-activator" method="retrieveHistoricQuote"/> <si:splitter/> </si:chain> <si:chain input-channel="shares-output"> <si:service-activator ref="stockQuoteHandler" method="handle" /> <si:service-activator ref="volatilityHandler" method="loadVolatility"/> </si:chain> <si:chain input-channel="shares-process" output-channel="shares-output"> <si:service-activator ref="ws-activator" method="retrieveQuote" /> </si:chain> <si:chain input-channel="option-channel" output-channel="option-sink"> <si:transformer ref="optionTransformer"/> </si:chain> <si:chain input-channel="shares-preFetch" output-channel="shares-data"> <si:transformer ref="sharesTransformer" method="loadSharesTickers"/> </si:chain> <si:chain input-channel="insiderTrading" output-channel="xmlfeed"> <si:service-activator ref="newsService" method="retrieveNewsForShare" /> <si:splitter/> </si:chain> <si:chain input-channel="globalNews" output-channel="xmlfeed"> <si:service-activator ref="newsService" method="fetchGlobalNews"/> </si:chain> <!-- this sink will receive a list of <Shares> and will dispatch to two separate channels, so that we can fetch prices/news and insider info--> <si:recipient-list-router id="sharesSinkListRouter" input-channel="shares-sink"> <si:recipient channel="shares-preFetch"/> <!-- We know rmi works. now we publish directly to another channel <si:recipient channel="rmiChannel"/--> <si:recipient channel="insiderTrading"/> </si:recipient-list-router> <!-- this router will fetch prices and news at the same time --> <si:recipient-list-router id="recipientListRouter" input-channel="shares-data"> <si:recipient channel="shares-process"/> <!-- We know rmi works. now we publish directly to another channel <si:recipient channel="rmiChannel"/--> <!--si:recipient channel="rmiRequestsChannel"/--> </si:recipient-list-router> <bean id="ws-activator" class="com.sample.services.WsActivatorImpl"> <property name="stockQuoteRetriever" ref="stockQuoteService"/> </bean> <bean id="sharesTransformer" class="com.sample.transformers.SharesTransformerImpl"> <property name="portfolioDao" ref="portfolioDao"/> <property name="sharesDao" ref="sharesDao"/> </bean> <bean id="sharesTransformerJmx" class="com.sample.transformers.SharesTransformerJmxImpl"> <property name="sharesTransformer" ref="sharesTransformer"/> </bean> <bean id="optionTransformer" class="com.sample.transformers.OptionTransformerImpl"/> <!-- si:outbound-channel-adapter channel="shares-output" ref="stockQuoteHandler" method="handle"/> </si:outbound-channel-adapter--> <si:outbound-channel-adapter channel="shares-volatility" ref="volatilityHandler" method="loadVolatility"> </si:outbound-channel-adapter> <si:outbound-channel-adapter channel="option-sink" ref="optionHandler" method="handleOption"> </si:outbound-channel-adapter> <si:outbound-channel-adapter channel="edgarChannel" ref="edgarHandler" method="loadInsiderInformation"> </si:outbound-channel-adapter> <bean id="optionHandler" class="com.sample.handlers.OptionHandlerImpl"> <property name="optionDao" ref="optionDao"/> </bean> <bean id="stockQuoteHandler" class="com.sample.handlers.StockQuoteHandlerImpl" parent="abstractEventHandler"> <property name="stockQuoteRetriever" ref="stockQuoteService"/> <property name="sharePriceDao" ref="sharePriceDao"/> </bean> <bean id="optionLoaderService" class="com.sample.services.OptionLoaderService"> <property name="channelGateway" ref="gateway"/> </bean> <bean id="optionLoaderJmx" class="com.sample.services.OptionLoaderServiceJmx"> <property name="optionLoaderService" ref="optionLoaderService"/> </bean> <bean id="volatilityHandler" class="com.sample.handlers.VolatilityHandlerImpl" parent="abstractEventHandler"> <property name="sharePriceDao" ref="sharePriceDao"/> <property name="volatilityDao" ref="volatilityDao"/> <property name="analyticsService" ref="analyticsService"/> </bean> <bean id="edgarHandler" class="com.sample.handlers.EdgarHandlerImpl"/> <bean name="abstractEventHandler" class="com.sample.handlers.AbstractEventHandler" abstract="true"/> <!-- Spring INtegration Event Handler --> <int-event:inbound-channel-adapter channel="eventChannel" error-channel="eventErrorChannel" event-types="com.sample.domain.ErrorEvent"/> <si:publish-subscribe-channel id="eventChannel"/> <si:publish-subscribe-channel id="eventErrorChannel"/> <bean id="testErrorHandler" class="com.sample.handlers.TestErrorHandlerImpl"/> <si:chain input-channel="eventChannel"> <si:delayer default-delay="1200" /> <si:service-activator ref="testErrorHandler" method="handleError" /> </si:chain> </beans>
rgds
marco


Reply With Quote
