activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carlos <csa...@netscape.net>
Subject Cannot create destinations at startup when they have authorization requirements
Date Wed, 07 Feb 2007 12:45:20 GMT

Cannot create destinations at startup when they have authorization
requirements

Hi. I have a queue that is configured in a <authorizationPlugin>
element so only some roles can read,write or admin it. I want to create this
queue at
startup, using <destinations>. When I try, activemq fails to start
with a SecurityException

I would say that the security constraints should not apply when
creating destinations specified in the config file. However, if that
isn't the case, is there anyway to set something like "runasRoles" in
the config file?

I'm using the latest release, 4.1.0. I've tried with a 4.2 snapshot
from some days ago, but the same thing happens.


Thanks,

Carlos

The exception stack trace:

2007-02-07 12:10:04,000 [main           ] ERROR BrokerService                 
- Failed to start ActiveMQ JMS Message Broker. Reason:
java.lang.SecurityException: User is not authenticated.
java.lang.SecurityException: User is not authenticated.
	at
org.apache.activemq.security.AuthorizationBroker.addDestination(AuthorizationBroker.java:57)
	at
org.apache.activemq.broker.MutableBrokerFilter.addDestination(MutableBrokerFilter.java:152)
	at
org.apache.activemq.broker.BrokerService.startDestinations(BrokerService.java:1429)
	at org.apache.activemq.broker.BrokerService.start(BrokerService.java:383)
	at
org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:47)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1062)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1029)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:420)
	at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
	at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
	at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:290)
	at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:348)
	at
org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:161)
	at
org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:51)
	at
org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:41)
	at
org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:57)
	at
org.apache.activemq.console.command.StartCommand.startBroker(StartCommand.java:82)
	at
org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:47)
	at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:50)
	at
org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:65)
	at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:50)
	at
org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:46)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.activemq.console.Main.runTaskClass(Main.java:159)
	at org.apache.activemq.console.Main.main(Main.java:91)
2007-02-07 12:10:04,000 [main           ] INFO  DefaultListableBeanFactory    
- Destroying singletons in
{org.springframework.beans.factory.support.DefaultListableBeanFactory
defining beans
[org.springframework.beans.factory.config.PropertyPlaceholderConfigurer,org.apache.activemq.xbean.XBeanBrokerService];
root of BeanFactory hierarchy}
2007-02-07 12:10:07,890 [main           ] INFO  CollectionFactory             
- JDK 1.4+ collections available
2007-02-07 12:10:07,953 [main           ] INFO  XBeanXmlBeanDefinitionReader  
- Loading XML bean definitions from class path resource [activemq.xml]
2007-02-07 12:10:08,343 [main           ] INFO 
ClassPathXmlApplicationContext - Bean factory for application context
[org.apache.xbean.spring.context.ClassPathXmlApplicationContext;hashCode=19551481]:
org.springframework.beans.factory.support.DefaultListableBeanFactory
defining beans
[org.springframework.beans.factory.config.PropertyPlaceholderConfigurer,org.apache.activemq.xbean.XBeanBrokerService];
root of BeanFactory hierarchy
2007-02-07 12:10:08,359 [main           ] INFO 
ClassPathXmlApplicationContext - 2 beans defined in application context
[org.apache.xbean.spring.context.ClassPathXmlApplicationContext;hashCode=19551481]
2007-02-07 12:10:08,406 [main           ] INFO 
ClassPathXmlApplicationContext - Unable to locate MessageSource with name
'messageSource': using default
[org.springframework.context.support.DelegatingMessageSource@d6a05e]
2007-02-07 12:10:08,406 [main           ] INFO 
ClassPathXmlApplicationContext - Unable to locate
ApplicationEventMulticaster with name 'applicationEventMulticaster': using
default
[org.springframework.context.event.SimpleApplicationEventMulticaster@b8bef7]
2007-02-07 12:10:08,421 [main           ] INFO  DefaultListableBeanFactory    
- Pre-instantiating singletons in factory
[org.springframework.beans.factory.support.DefaultListableBeanFactory
defining beans
[org.springframework.beans.factory.config.PropertyPlaceholderConfigurer,org.apache.activemq.xbean.XBeanBrokerService];
root of BeanFactory hierarchy]
2007-02-07 12:10:08,843 [main           ] INFO  BrokerService                 
- ActiveMQ 4.1.0-incubator JMS Message Broker (soccerfury-activemq-broker)
is starting
2007-02-07 12:10:08,843 [main           ] INFO  BrokerService                 
- For help or more information please see:
http://incubator.apache.org/activemq/
2007-02-07 12:10:09,671 [main           ] INFO  JDBCPersistenceAdapter        
- Database driver recognized: [apache_derby_embedded_jdbc_driver]
2007-02-07 12:10:10,953 [main           ] INFO  DefaultDatabaseLocker         
- Attempting to acquire the exclusive lock to become the Master broker
2007-02-07 12:10:10,953 [main           ] INFO  DefaultDatabaseLocker         
- Becoming the master on dataSource:
org.apache.derby.jdbc.EmbeddedDataSource@366573
2007-02-07 12:10:11,031 [main           ] INFO  JournalPersistenceAdapter     
- Journal Recovery Started from: Active Journal: using 5 x 20.0 Megs at:
C:\soccerfury\apache-activemq-4.1.0-incubator\activemq-data\journal
2007-02-07 12:10:11,078 [main           ] INFO  JournalPersistenceAdapter     
- Journal Recovered: 0 message(s) in transactions recovered.
2007-02-07 12:10:11,203 [main           ] ERROR BrokerService                 
- Failed to start ActiveMQ JMS Message Broker. Reason:
java.lang.SecurityException: User is not authenticated.
java.lang.SecurityException: User is not authenticated.
	at
org.apache.activemq.security.AuthorizationBroker.addDestination(AuthorizationBroker.java:57)
	at
org.apache.activemq.broker.MutableBrokerFilter.addDestination(MutableBrokerFilter.java:152)
	at
org.apache.activemq.broker.BrokerService.startDestinations(BrokerService.java:1429)
	at org.apache.activemq.broker.BrokerService.start(BrokerService.java:383)
	at
org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:47)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1062)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1029)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:420)
	at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
	at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
	at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:290)
	at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:348)
	at
org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:161)
	at
org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:51)
	at
org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:41)
	at
org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:57)
	at
org.apache.activemq.console.command.StartCommand.startBroker(StartCommand.java:82)
	at
org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:47)
	at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:50)
	at
org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:65)
	at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:50)
	at
org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:46)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.activemq.console.Main.runTaskClass(Main.java:159)
	at org.apache.activemq.console.Main.main(Main.java:91)
2007-02-07 12:10:11,203 [main           ] INFO  DefaultListableBeanFactory    
- Destroying singletons in
{org.springframework.beans.factory.support.DefaultListableBeanFactory
defining beans
[org.springframework.beans.factory.config.PropertyPlaceholderConfigurer,org.apache.activemq.xbean.XBeanBrokerService];
root of BeanFactory hierarchy}


-- 
View this message in context: http://www.nabble.com/Cannot-create-destinations-at-startup-when-they-have-authorization-requirements-tf3186784s2354.html#a8844737
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message