Announcement Announcement Module
Collapse
No announcement yet.
Cannot resolve the name 'integration:subscribersAttributeGroup' to a(n) 'attribute .. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cannot resolve the name 'integration:subscribersAttributeGroup' to a(n) 'attribute ..

    Hi,
    This is my simple master chunking xml configuration

    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:int="http://www.springframework.org/schema/integration"
    	xmlns:int-jms="http://www.springframework.org/schema/integration/jms"
    	xsi:schemaLocation="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.2.xsd
    		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
    
    	<bean id="connectionFactory"
    		class="org.springframework.jms.connection.CachingConnectionFactory">
    		<property name="targetConnectionFactory">
    			<bean class="org.apache.activemq.ActiveMQConnectionFactory">
    				<property name="brokerURL" value="tcp://localhost:61616"></property>
    			</bean>
    		</property>
    	</bean>
    
    	<bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
    		<property name="connectionFactory" ref="connectionFactory"></property>
    		<property name="defaultDestinationName" value="replies"></property>
    		<property name="receiveTimeout" value="1000"></property>
    		<property name="sessionTransacted" value="true"></property>
    	</bean>
    	<int:channel id="requestChannel" />
    	<int:channel id="incoming" />
    
    	<bean id="messagingGateway" class="org.springframework.integration.core.MessagingTemplate">
    		<property name="defaultChannel" ref="requestChannel"></property>
    		<property name="receiveTimeout" value="1000"></property>
    	</bean>
    
    	<int-jms:outbound-channel-adapter
    		connection-factory="connectionFactory" channel="requestChannel"
    		destination-name="requests" />
    
    	<bean id="headerExtractor"
    		class="org.springframework.batch.integration.chunk.JmsRedeliveredExtractor" />
    	
    	<int:transformer input-channel="incoming"
    		output-channel="replies" ref="headerExtractor" method="extract" />
    
    	<int:channel id="replies" scope="thread">
    		<int:queue />
    		<int:interceptors>
    			<bean id="pollerInterceptor"
    				class="org.springframework.batch.integration.chunk.MessageSourcePollerInterceptor">
    				<property name="messageSource">
    					<bean
    						class="org.springframework.integration.jms.JmsDestinationPollingSource">
    						<constructor-arg>
    							<bean class="org.springframework.jms.core.JmsTemplate">
    								<property name="connectionFactory" ref="connectionFactory" />
    								<property name="defaultDestinationName" value="replies" />
    								<property name="receiveTimeout" value="100" />
    							</bean>
    						</constructor-arg>
    					</bean>
    				</property>
    				<property name="channel" ref="incoming" />
    			</bean>
    		</int:interceptors>
    	</int:channel>
    
    	<bean id="chunkWriter"
    		class="org.springframework.batch.integration.chunk.ChunkMessageChannelItemWriter"
    		scope="step">
    		<property name="messagingOperations" ref="messagingGateway" />
    		<property name="replyChannel" ref="replies" />
    		<property name="maxWaitTimeouts" value="10" />
    	</bean>
    
    </beans>


    But i am getting the following error.
    i can't figure out where is the error.
    Please help.

    Code:
    Caused by: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 379 in XML document from file [C:\Users\Anupam\Documents\fresh_workspace-sts-3.0.0.RELEASE\.metadata\.plugins\org.eclipse.wst.server.core\tmp2\wtpwebapps\BatchPOC\WEB-INF\classes\bootstrap\master_integration.xml] is invalid; nested exception is org.xml.sax.SAXParseException: src-resolve: Cannot resolve the name 'integration:subscribersAttributeGroup' to a(n) 'attribute group' component.
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
    	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)
    	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209)
    	at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:239)
    	... 33 more
    Caused by: org.xml.sax.SAXParseException: src-resolve: Cannot resolve the name 'integration:subscribersAttributeGroup' to a(n) 'attribute group' component.
    	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
    	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:131)
    	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:384)
    	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaErr(XSDHandler.java:2537)
    	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaError(XSDHandler.java:2528)
    	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getGlobalDecl(XSDHandler.java:1472)
    	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDAttributeGroupTraverser.traverseLocal(XSDAttributeGroupTraverser.java:74)
    	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDAbstractTraverser.traverseAttrsAndAttrGrps(XSDAbstractTraverser.java:633)
    	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDComplexTypeTraverser.processComplexContent(XSDComplexTypeTraverser.java:1059)
    	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDComplexTypeTraverser.traverseComplexTypeDecl(XSDComplexTypeTraverser.java:279)
    	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDComplexTypeTraverser.traverseGlobal(XSDComplexTypeTraverser.java:160)
    	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getGlobalDecl(XSDHandler.java:1534)
    	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDComplexTypeTraverser.traverseComplexContent(XSDComplexTypeTraverser.java:706)
    	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDComplexTypeTraverser.traverseComplexTypeDecl(XSDComplexTypeTraverser.java:260)
    	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDComplexTypeTraverser.traverseLocal(XSDComplexTypeTraverser.java:133)
    	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDElementTraverser.traverseNamedElement(XSDElementTraverser.java:356)
    	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDElementTraverser.traverseGlobal(XSDElementTraverser.java:214)
    	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.traverseSchemas(XSDHandler.java:1258)
    	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:579)
    	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:552)
    	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.findSchemaGrammar(XMLSchemaValidator.java:2408)
    	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1753)
    	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.emptyElement(XMLSchemaValidator.java:705)
    	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:377)
    	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2747)
    	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
    	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
    	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
    	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
    	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
    	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
    	at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:225)
    	at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:283)
    	at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388)
    	... 38 more

    When i remove
    <int-jms:outbound-channel-adapter
    connection-factory="connectionFactory" channel="requestChannel"
    destination-name="requests" />
    the error is gone.

    But i need that adapter.

    Please help me resolve this problem.

    Thanks.

  • #2
    Resolved...
    I changed
    xsi:schemaLocation="http://www.springframework.org/schema/integration http://www.springframework.org/schem...ration-2.0.xsd

    to

    xsi:schemaLocation="http://www.springframework.org/schema/integration http://www.springframework.org/schem...ration-2.2.xsd


    and changed the spring-integration-core to 2.2.0.RELEASE

    Comment

    Working...
    X