activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmd <dm...@cornell.edu>
Subject error starting embedded broker
Date Tue, 06 Nov 2007 06:36:22 GMT

I get the following error when starting my app, which has an embedded broker.

ERROR [org.dmd.ClientProxy.ClientProxyDaemon.main()]
(ClientProxyDaemon.java:104) -
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'broker' defined in class path resource [client-proxy.xml]:
Invocation of init method failed; nested exception is
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected
exception parsing XML document from class path resource
[client-proxy-broker.xml]; nested exception is
java.lang.IllegalStateException: Unable to invoke parseNestedCustomElement
method

ClientProxyDaemon.java uses AbstractApplicationContext ac = new
ClassPathXmlApplicationContext("client-proxy.xml"); to configure the Spring
context.

client-proxy.xml looks like this:

<?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:util="http://www.springframework.org/schema/util"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
                           http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-2.0.xsd">

    <!-- Create an embedded broker and configure it -->
    <bean id="broker" class="org.apache.activemq.xbean.BrokerFactoryBean">
        <property name="config" value="xbean:client-proxy-broker.xml"/>
        <property name="start" value="true" />
    </bean>

    <bean id="connectionFactory"
class="org.apache.activemq.ActiveMQConnectionFactory">
        <property name="brokerURL" value="vm://embedded"/>
        <property name="userName" value="system"/>
        <property name="password" value="system"/>
    </bean>
    
</beans>

And the file passed to BrokerFactoryBean looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<beans>

    <!-- Allows us to use system properties as variables in this
configuration file -->
	<bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
/>

	<broker xmlns="http://activemq.org/config/1.0" useJmx="false"
persistent="false" brokerName="embedded" populateJMSXUserID="true">

		<transportConnectors>
			<transportConnector uri="tcp://localhost:61616" />
		</transportConnectors>

		<plugins>
		
		    <!-- we'll replace this with JAAS later -->
			<simpleAuthenticationPlugin>
				<users>
					<authenticationUser username="system"
						password="system" groups="users, admins" />
						
					<authenticationUser username="user1"
						password="password1" groups="users" />
					<authenticationUser username="user2"
						password="password2" groups="users" />
				</users>
			</simpleAuthenticationPlugin>

			<!--  lets configure a destination based authorization mechanism -->
			<authorizationPlugin>
				<map>
					<authorizationMap>
						<authorizationEntries>
						  <authorizationEntry queue=">" read="admins" write="admins"
admin="admins" />
						  <authorizationEntry queue="org.dmd.>" read="admins" write="users"
admin="admins" />
						  <authorizationEntry topic="ActiveMQ.Advisory.>" read="users"
write="admins" admin="admins" />
						</authorizationEntries>
					</authorizationMap>
				</map>
			</authorizationPlugin>

		</plugins>
		
	</broker>

</beans>

So, what is the custom element in this case?  Is it the <broker
xmlns="http://activemq.org/config/1.0" useJmx="false" persistent="false"
brokerName="embedded" populateJMSXUserID="true">?  What can I do about this?

Any help would be appreciated.

Cheers,
Dan

-- 
View this message in context: http://www.nabble.com/error-starting-embedded-broker-tf4756326s2354.html#a13601507
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message