activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elusivemel <MJone...@CNTUS.JNJ.COM>
Subject Spring 2.0 + ActiveMQ 4.1 Snapshot: SAXParseException on XML config files
Date Wed, 06 Dec 2006 20:13:23 GMT

I've been trying to wire up ActiveMQ 4.1-SNAPSHOT with Spring 2.0-m2 with no
success.  I'm using maven2 to manage my project's build process and I'm
using xbean-spring-common 2.7:

>From my pom.xml:


I started with the example spring XML configuration file
, but got an exception:

------- begin error message ------- 

org.springframework.beans.factory.BeanDefinitionStoreException: Line 5 in
XML document from ServletContext resource
[/WEB-INF/jms-context.xml] is invalid; nested exception is
org.xml.sax.SAXParseException: Document root element "beans", must match
DOCTYPE root "null".
org.xml.sax.SAXParseException: Document root element "beans", must match
DOCTYPE root "null".

------- end error message ------- 

Here's a look at my spring configuration file.

------ begin jms-context.xml ------ 
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns=""

	<!--  lets create an embedded ActiveMQ Broker -->
	<amq:broker useJmx="false" persistent="false">
			<amq:transportConnector uri="tcp://localhost:0" />

	<!--  ActiveMQ destinations to use  -->
	<amq:queue id="destination"
		physicalName="org.apache.activemq.spring.Test.spring.embedded" />

	<!-- JMS ConnectionFactory to use, configuring the embedded broker using
XML -->
	<amq:connectionFactory id="jmsFactory" brokerURL="vm://localhost" />

	<!-- Spring JMS Template -->
	<bean id="myJmsTemplate"
		<property name="connectionFactory">
			<!-- lets wrap in a pool to avoid creating a connection per send -->
				<property name="targetConnectionFactory">
					<ref local="jmsFactory" />

	<bean id="consumerJmsTemplate"
		<property name="connectionFactory" ref="jmsFactory" />

	<!-- a sample POJO which uses a Spring JmsTemplate -->
	<bean id="producer"
		<property name="template">
			<ref bean="myJmsTemplate" />

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

		<property name="messageCount">

	<!-- a sample POJO consumer -->
	<bean id="consumer"
		<property name="template" ref="consumerJmsTemplate" />
		<property name="destination" ref="destination" />
------ end jms-context.xml ------ 

Am I missing a DTD somewhere?  The message "Document root element "beans",
must match DOCTYPE root 'null'" has me stumped.  

It's been two frustrating days and I don't see any end in sight.  Any help
would be greatly appreciated.

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message