activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jones, Melvin [GBSUS Non-J&J]" <MJone...@CNTUS.JNJ.COM>
Subject Spring 2.0.1 + ActiveMQ 4.1.0: Did activemq-core-4.1-incubator-S NAPSHOT.xsd change?
Date Mon, 08 Jan 2007 17:11:26 GMT
All:

Forgive me for asking if I'm missing something obvious, but did the XML
schema definition for the 4.1.0 release change underneath me?  

I'm using Spring 2.0.1 and xbean-spring-v2c-2.7 and this configuration file
was working fine 2 weeks ago, but suddenly I'm getting and error:

Line 10 in XML document from URL
[file:/c:/work/workspace/compliance_wire/target/test-classes/WEB-INF/jms-con
text.xml] is invalid; nested exception is org.xml.sax.SAXParseException:
cvc-complex-type.2.4.b: The content of element 'amq:queue' is not complete.
One of '{"http://activemq.org/config/1.0":compositeDestinations,
"http://activemq.org/config/1.0":properties,
WC[##other:"http://activemq.org/config/1.0"]}' is expected. 


Here's the block of code that the parser is complaining about:

		<amq:destinations>
			<amq:queue name="jobqueue"
physicalName="com.cntus.jnj.cw.jobqueue" />
		</amq:destinations>


So it looks like element <amq:queue> isn't complete.  I get it.  

It's not very clear to me exactly what properties I need to fill in and what
their values should be. 

Is there any updated documentation that I missed somewhere?   

I've been struggling with this for days, any help would be greatly
appreciated. 

My entire config is below.



-------------------begin entire xml config----------------------------

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:amq="http://activemq.org/config/1.0"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://activemq.org/config/1.0
http://people.apache.org/repository/org.apache.activemq/xsds/activemq-core-4
.1-incubator-SNAPSHOT.xsd">

	<!--  lets create an embedded ActiveMQ Broker -->
	<amq:broker useJmx="false" persistent="true" start="true">
		<amq:destinations>
			<amq:queue name="jobqueue"
physicalName="com.cntus.jnj.cw.jobqueue" />
		</amq:destinations>

		<amq:persistenceAdapter>
			<amq:jdbcPersistenceAdapter>
				<amq:dataSource>
					<ref bean="dataSource" />
				</amq:dataSource>
			</amq:jdbcPersistenceAdapter>
		</amq:persistenceAdapter>

		<amq:transportConnectors>
			<amq:transportConnector uri="tcp://localhost:0" />
		</amq:transportConnectors>
	</amq:broker>

	<!--  ActiveMQ destinations to use  -->
	  <amq:queue name="cwjobqueue" 
		physicalName="com.cntus.jnj.cw.jobqueue" /> 
     
	<!-- JMS ConnectionFactory to use, configuring the embedded broker
using XML -->
	<amq:connectionFactory id="jmsFactory" brokerURL="vm://localhost" />

	<!-- Spring JMS Template -->
	<bean id="cwJmsTemplate"
		class="org.springframework.jms.core.JmsTemplate">
		<property name="connectionFactory">
			<!-- lets wrap in a pool to avoid creating a
connection per send -->
			<bean
	
class="org.springframework.jms.connection.SingleConnectionFactory">
				<property name="targetConnectionFactory">
					<ref local="jmsFactory" />
				</property>
			</bean>
		</property>
	</bean>

	<bean id="consumerJmsTemplate"
		class="org.springframework.jms.core.JmsTemplate">
		<property name="connectionFactory" ref="jmsFactory" />
	</bean>

	<!-- a sample POJO which uses a Spring JmsTemplate -->
	<bean id="producer"
		class="com.cntus.jnj.cw.jms.ComplianceWireMessageProducer">
		<property name="template">
			<ref bean="cwJmsTemplate" />
		</property>

		<property name="destination">
			<ref bean="cwjobqueue" />
		</property>

		<property name="messageCount">
			<value>10</value>
		</property>
	</bean>

	<!-- a sample POJO consumer -->
	<bean id="consumer"
		class="com.cntus.jnj.cw.jms.ComplianceWireMessageConsumer">
		<property name="template" ref="consumerJmsTemplate" />
		<property name="destination" ref="cwjobqueue" />
	</bean>
</beans>

-------------------end xml config----------------------------





Melvin Jones
x2478



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message