Announcement Announcement Module
Collapse
No announcement yet.
problem when validating schema for jms Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • problem when validating schema for jms

    hello,
    could anyone tell me wha'ts wrong with this sprign xml file?

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans:beans xmlns:beans="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns="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/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/jms
            http://www.springframework.org/schema/integration/jms/spring-integration-file-1.0.xsd">
    
    	<channel id="inAndOutChannel" />
    
    	<jms-source channel="inAndOutChannel"
    		connection-factory="connectionFactory" destination="inQueue" />
    
    	<jms-target channel="inAndOutChannel"
    		connection-factory="connectionFactory" destination="outTopic" />
    
    	<bean id="connectionFactory"
    		class="org.apache.activemq.ActiveMQConnectionFactory">
    		<property name="brokerURL" value="tcp://localhost:61616" />
    	</bean>
    
    	<bean id="inQueue"
    		class="org.apache.activemq.command.ActiveMQQueue">
    		<constructor-arg index="0" value="sample.queue" />
    	</bean>
    
    	<bean id="outTopic"
    		class="org.apache.activemq.command.ActiveMQTopic">
    		<constructor-arg index="0" value="sample.topic" />
    	</bean>
    </beans>
    i keep on getting following excepiton when i run in eclipse
    Code:
    Line 20 in XML document from class path resource [jms-context.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 'jms-source'.
    i m using spring integ 1.0.3 ...


    regards
    marco

  • #2
    sorted out... here's my new schema definition (in case anyone else faces same problem)

    Code:
    <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:file="http://www.springframework.org/schema/integration/file"
        xmlns:jms="http://www.springframework.org/schema/integration/jms"
        xmlns:mail="http://www.springframework.org/schema/integration/mail"
        xmlns:rmi="http://www.springframework.org/schema/integration/rmi"
        xmlns:ws="http://www.springframework.org/schema/integration/ws"
        xsi:schemaLocation="http://www.springframework.org/schema/beans
                http://www.springframework.org/schema/beans/spring-beans-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/file
                http://www.springframework.org/schema/integration/file/spring-integration-file-1.0.xsd
                http://www.springframework.org/schema/integration/jms
                http://www.springframework.org/schema/integration/jms/spring-integration-jms-1.0.xsd
                http://www.springframework.org/schema/integration/mail
                http://www.springframework.org/schema/integration/mail/spring-integration-mail-1.0.xsd
                http://www.springframework.org/schema/integration/rmi
                http://www.springframework.org/schema/integration/rmi/spring-integration-rmi-1.0.xsd
                http://www.springframework.org/schema/integration/ws
                http://www.springframework.org/schema/integration/ws/spring-integration-ws-1.0.xsd">
    sorry for bothering

    rgds
    marco

    Comment


    • #3
      Where did you get 'jms-source' and jms-target' elements from? SI JMS schema does not define these elements, instead there is:

      jms:inbound-channel-adapter
      jms:outbound-channel-adapter

      Comment

      Working...
      X