If you've got security enabled, then I'm afraid you're going to have to
comment out the commandAgent and most probably the camelContext elements.
These components try and connect to the broker, but AFAIK there's no way to
assign them a valid user name and password via their respective elements in
the broker XML configuration file. If you figure it out, a posting
describing the solution would be greatly appreciated.   

Joe 
Goto www.ttmsolutions.com for a free ActiveMQ user guide


j0llyr0g3r wrote:
> 
> Hi,
> 
> sorry, i forgot something:
> 
> If i get the documentation right, the most simple setup would to just
> insert:
> 
>     <plugins>
>       <simpleAuthenticationPlugin>
>               <users>
>                       <authenticationUser username="system" password="manager"
>                                               groups="admins"/>
>               </users>
>       </simpleAuthenticationPlugin>
>     </plugins> 
> 
> in the activemq.xml, thereby defining users and passwords.
> 
> So, no -Djava....., no login.conf, no users.properties, no realm......
> 
> But even that does not work:
> 
> ERROR: java.lang.RuntimeException: Failed to execute start task. Reason:
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'org.apache.activemq.broker.util.CommandAgent' defined in
> class path resource [activemq.xml]: Invocation of init method failed;
> nested exception is javax.jms.JMSException: User name or password is
> invalid.
> java.lang.RuntimeException: Failed to execute start task. Reason:
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'org.apache.activemq.broker.util.CommandAgent' defined in
> class path resource [activemq.xml]: Invocation of init method failed;
> nested exception is javax.jms.JMSException: User name or password is
> invalid.
>         at
> org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:99)
>         at
> org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:51)
>         at
> org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:104)
>         at
> org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:51)
>         at
> org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:76)
>         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:597)
>         at org.apache.activemq.console.Main.runTaskClass(Main.java:222)
>         at org.apache.activemq.console.Main.main(Main.java:106)
> Caused by: org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'org.apache.activemq.broker.util.CommandAgent'
> defined in class path resource [activemq.xml]: Invocation of init method
> failed; nested exception is javax.jms.JMSException: User name or password
> is invalid.
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1174)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:425)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
>         at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
>         at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:284)
>         at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
>         at
> org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:64)
>         at
> org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:52)
>         at
> org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:91)
>         at
> org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:51)
>         at
> org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:71)
>         at
> org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)
>         at
> org.apache.activemq.console.command.StartCommand.startBroker(StartCommand.java:112)
>         at
> org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:74)
>         ... 10 more
> Caused by: javax.jms.JMSException: User name or password is invalid.
>         at
> org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:49)
>         at
> org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1178)
>         at
> org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1262)
>         at
> org.apache.activemq.ActiveMQConnection.start(ActiveMQConnection.java:453)
>         at
> org.apache.activemq.broker.util.CommandAgent.getConnection(CommandAgent.java:140)
>         at
> org.apache.activemq.broker.util.CommandAgent.start(CommandAgent.java:54)
>         at
> org.apache.activemq.broker.util.CommandAgent.afterPropertiesSet(CommandAgent.java:97)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1201)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1171)
>         ... 25 more                                                           
>                                                                               
>                                                          
> 
> I mean, there must be a simple, working example, right?
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Simple-authentication-not-working%3A-Unrecognized-xbean-element-mapping%3A-authenticationUser-tp16765832s2354p16815510.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to