You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by joesan <co...@gmail.com> on 2012/08/23 15:12:35 UTC
ActiveMQ Authentication
I'm using the simple authentication plugin and have encrypted my passwords
using the encrypt utility. The following problems I face when I start my
activemq:
ERROR | Failed to load: class path resource [activemq.xml], reason: Invalid
bean definition with name 'org.apache.activemq.xbean.XBeanBrokerService#0'
defined in class path resource [activemq.xml]: Co
uld not resolve placeholder 'admin.password'
org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean
definition with name 'org.apache.activemq.xbean.XBeanBrokerService#0'
defined in class path resource [activemq.xml]: Could
not resolve placeholder 'admin.password'
at
org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:287)
at
org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:75)
at
org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:663)
at
org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:638)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:407)
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$1.<init>(XBeanBrokerFactory.java:108)
at
org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:108)
at
org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:72)
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:115)
at
org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:74)
at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
at
org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:148)
at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
at
org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:90)
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:257)
at org.apache.activemq.console.Main.main(Main.java:111)
ERROR: java.lang.RuntimeException: Failed to execute start task. Reason:
org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean
definition with name 'org.apache.activemq.xbean.XB
eanBrokerService#0' defined in class path resource [activemq.xml]: Could not
resolve placeholder 'admin.password'
java.lang.RuntimeException: Failed to execute start task. Reason:
org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean
definition with name 'org.apache.activemq.xbean.XBeanBrok
erService#0' defined in class path resource [activemq.xml]: Could not
resolve placeholder 'admin.password'
at
org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:98)
at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
at
org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:148)
at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
at
org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:90)
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:257)
at org.apache.activemq.console.Main.main(Main.java:111)
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException:
Invalid bean definition with name
'org.apache.activemq.xbean.XBeanBrokerService#0' defined in class path
resource [activemq.x
ml]: Could not resolve placeholder 'admin.password'
at
org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:287)
at
org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:75)
at
org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:663)
at
org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:638)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:407)
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$1.<init>(XBeanBrokerFactory.java:108)
at
org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:108)
at
org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:72)
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:115)
at
org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:74)
... 10 more
ERROR: java.lang.Exception:
org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean
definition with name 'org.apache.activemq.xbean.XBeanBrokerService#0'
defined in class path res
ource [activemq.xml]: Could not resolve placeholder 'admin.password'
java.lang.Exception:
org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean
definition with name 'org.apache.activemq.xbean.XBeanBrokerService#0'
defined in class path resource [
activemq.xml]: Could not resolve placeholder 'admin.password'
at
org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:99)
at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
at
org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:148)
at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
at
org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:90)
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:257)
at org.apache.activemq.console.Main.main(Main.java:111)
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException:
Invalid bean definition with name
'org.apache.activemq.xbean.XBeanBrokerService#0' defined in class path
resource [activemq.x
ml]: Could not resolve placeholder 'admin.password'
at
org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:287)
at
org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:75)
at
org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:663)
at
org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:638)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:407)
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$1.<init>(XBeanBrokerFactory.java:108)
at
org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:108)
at
org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:72)
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:115)
at
org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:74)
... 10 more
Why could it not resolve the placeholder??
--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-Authentication-tp4655478.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: ActiveMQ Authentication
Posted by joesan <co...@gmail.com>.
I had a look at the ActiveMQ in Action examples and that uses the
activemq-security.xml to start the ActiveMQ. But I guess that should not
matter.
I will check for those braces and see if that works!
--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-Authentication-tp4655478p4655518.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: ActiveMQ Authentication
Posted by joesan <co...@gmail.com>.
My publisher is trying to connect to the service with his credentials.
User publish is not authorized to create:
topic://ActiveMQ.Advisory.Connection
I modified the entry as below. But still it woudn't allow??
* <authorizationMap>
<authorizationEntries>
<authorizationEntry queue=">"
read="admins,publishers" write="admins,publishers" admin="admins" />
<authorizationEntry topic=">"
read="admins,publishers" write="admins,publishers" admin="admins" />
<authorizationEntry queue="MYQUEUE.CLUSTERQUEUE>" read="consumers"
write="publishers" admin="publishers" />
<authorizationEntry topic="MYTOPIC.CLUSTERTOPIC>" read="consumers"
write="publishers" admin="publishers" />
</authorizationEntries>
</authorizationMap>*
--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-Authentication-tp4655478p4655543.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: ActiveMQ Authentication
Posted by joesan <co...@gmail.com>.
Great! That worked. Thanks!
--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-Authentication-tp4655478p4655542.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: ActiveMQ Authentication
Posted by Dejan Bosanac <de...@nighttale.net>.
You need to set ACTIVEMQ_ENCRYPTION_PASSWORD environment var. See the
instructions at
http://activemq.apache.org/encrypted-passwords.html
Something like
export ACTIVEMQ_ENCRYPTION_PASSWORD=activemq
should do
Regards
--
Dejan Bosanac
Senior Software Engineer | FuseSource Corp.
dejanb@fusesource.com | fusesource.com
skype: dejan.bosanac | twitter: @dejanb
blog: http://www.nighttale.net
ActiveMQ in Action: http://www.manning.com/snyder/
On Fri, Aug 24, 2012 at 3:49 PM, joesan <co...@gmail.com> wrote:
> So here is the exception that I get after modifying my activemq.xml by
> removing the bean definition that was redundant:
>
> Loading message broker from: xbean:activemq.xml
> INFO | Refreshing org.apache.activemq.xbean.XBeanBrokerFactory$1@c5495e:
> startup date [Fri Aug 24 15:42:55 CEST 2012]; root of context hierarchy
> INFO | Loading properties file from URL
> [file:C:/folders/Projects/amqcluster1/apache-activemq-5.6.0-Master/bin/../conf/credentials-enc.properties]
> ERROR: java.lang.RuntimeException: Failed to execute start task. Reason:
> java.lang.NullPointerException
> java.lang.RuntimeException: Failed to execute start task. Reason:
> java.lang.NullPointerException
> at
> org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:98)
> at
> org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
> at
> org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:148)
> at
> org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
> at
> org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:90)
> 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:257)
> at org.apache.activemq.console.Main.main(Main.java:111)
> Caused by: java.lang.NullPointerException
> at
> org.jasypt.encryption.pbe.config.SimplePBEConfig.getPasswordCharArray(SimplePBEConfig.java:434)
> at
> org.jasypt.encryption.pbe.StandardPBEByteEncryptor.resolveConfigurationPassword(StandardPBEByteEncryptor.java:740)
> at
> org.jasypt.encryption.pbe.StandardPBEByteEncryptor.initialize(StandardPBEByteEncryptor.java:590)
> at
> org.jasypt.encryption.pbe.StandardPBEStringEncryptor.initialize(StandardPBEStringEncryptor.java:570)
> at
> org.jasypt.encryption.pbe.StandardPBEStringEncryptor.decrypt(StandardPBEStringEncryptor.java:697)
> at
> org.jasypt.properties.PropertyValueEncryptionUtils.decrypt(PropertyValueEncryptionUtils.java:72)
> at
> org.jasypt.spring.properties.EncryptablePropertyPlaceholderConfigurer.convertPropertyValue(EncryptablePropertyPlaceholderConfigurer.java:108)
> at
> org.springframework.beans.factory.config.PropertyResourceConfigurer.convertProperty(PropertyResourceConfigurer.java:112)
> at
> org.springframework.beans.factory.config.PropertyResourceConfigurer.convertProperties(PropertyResourceConfigurer.java:95)
> at
> org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:72)
> at
> org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:663)
> at
> org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:638)
> at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:407)
> 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$1.<init>(XBeanBrokerFactory.java:108)
> at
> org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:108)
> at
> org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:72)
> 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:115)
> at
> org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:74)
> ... 10 more
> ERROR: java.lang.Exception: java.lang.NullPointerException
> java.lang.Exception: java.lang.NullPointerException
> at
> org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:99)
> at
> org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
> at
> org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:148)
> at
> org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
> at
> org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:90)
> 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:257)
> at org.apache.activemq.console.Main.main(Main.java:111)
> Caused by: java.lang.NullPointerException
> at
> org.jasypt.encryption.pbe.config.SimplePBEConfig.getPasswordCharArray(SimplePBEConfig.java:434)
> at
> org.jasypt.encryption.pbe.StandardPBEByteEncryptor.resolveConfigurationPassword(StandardPBEByteEncryptor.java:740)
> at
> org.jasypt.encryption.pbe.StandardPBEByteEncryptor.initialize(StandardPBEByteEncryptor.java:590)
> at
> org.jasypt.encryption.pbe.StandardPBEStringEncryptor.initialize(StandardPBEStringEncryptor.java:570)
> at
> org.jasypt.encryption.pbe.StandardPBEStringEncryptor.decrypt(StandardPBEStringEncryptor.java:697)
> at
> org.jasypt.properties.PropertyValueEncryptionUtils.decrypt(PropertyValueEncryptionUtils.java:72)
> at
> org.jasypt.spring.properties.EncryptablePropertyPlaceholderConfigurer.convertPropertyValue(EncryptablePropertyPlaceholderConfigurer.java:108)
> at
> org.springframework.beans.factory.config.PropertyResourceConfigurer.convertProperty(PropertyResourceConfigurer.java:112)
> at
> org.springframework.beans.factory.config.PropertyResourceConfigurer.convertProperties(PropertyResourceConfigurer.java:95)
> at
> org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:72)
> at
> org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:663)
> at
> org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:638)
> at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:407)
> 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$1.<init>(XBeanBrokerFactory.java:108)
> at
> org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:108)
> at
> org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:72)
> 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:115)
> at
> org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:74)
> ... 10 more
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-Authentication-tp4655478p4655539.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: ActiveMQ Authentication
Posted by joesan <co...@gmail.com>.
So here is the exception that I get after modifying my activemq.xml by
removing the bean definition that was redundant:
Loading message broker from: xbean:activemq.xml
INFO | Refreshing org.apache.activemq.xbean.XBeanBrokerFactory$1@c5495e:
startup date [Fri Aug 24 15:42:55 CEST 2012]; root of context hierarchy
INFO | Loading properties file from URL
[file:C:/folders/Projects/amqcluster1/apache-activemq-5.6.0-Master/bin/../conf/credentials-enc.properties]
ERROR: java.lang.RuntimeException: Failed to execute start task. Reason:
java.lang.NullPointerException
java.lang.RuntimeException: Failed to execute start task. Reason:
java.lang.NullPointerException
at
org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:98)
at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
at
org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:148)
at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
at
org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:90)
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:257)
at org.apache.activemq.console.Main.main(Main.java:111)
Caused by: java.lang.NullPointerException
at
org.jasypt.encryption.pbe.config.SimplePBEConfig.getPasswordCharArray(SimplePBEConfig.java:434)
at
org.jasypt.encryption.pbe.StandardPBEByteEncryptor.resolveConfigurationPassword(StandardPBEByteEncryptor.java:740)
at
org.jasypt.encryption.pbe.StandardPBEByteEncryptor.initialize(StandardPBEByteEncryptor.java:590)
at
org.jasypt.encryption.pbe.StandardPBEStringEncryptor.initialize(StandardPBEStringEncryptor.java:570)
at
org.jasypt.encryption.pbe.StandardPBEStringEncryptor.decrypt(StandardPBEStringEncryptor.java:697)
at
org.jasypt.properties.PropertyValueEncryptionUtils.decrypt(PropertyValueEncryptionUtils.java:72)
at
org.jasypt.spring.properties.EncryptablePropertyPlaceholderConfigurer.convertPropertyValue(EncryptablePropertyPlaceholderConfigurer.java:108)
at
org.springframework.beans.factory.config.PropertyResourceConfigurer.convertProperty(PropertyResourceConfigurer.java:112)
at
org.springframework.beans.factory.config.PropertyResourceConfigurer.convertProperties(PropertyResourceConfigurer.java:95)
at
org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:72)
at
org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:663)
at
org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:638)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:407)
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$1.<init>(XBeanBrokerFactory.java:108)
at
org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:108)
at
org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:72)
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:115)
at
org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:74)
... 10 more
ERROR: java.lang.Exception: java.lang.NullPointerException
java.lang.Exception: java.lang.NullPointerException
at
org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:99)
at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
at
org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:148)
at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
at
org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:90)
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:257)
at org.apache.activemq.console.Main.main(Main.java:111)
Caused by: java.lang.NullPointerException
at
org.jasypt.encryption.pbe.config.SimplePBEConfig.getPasswordCharArray(SimplePBEConfig.java:434)
at
org.jasypt.encryption.pbe.StandardPBEByteEncryptor.resolveConfigurationPassword(StandardPBEByteEncryptor.java:740)
at
org.jasypt.encryption.pbe.StandardPBEByteEncryptor.initialize(StandardPBEByteEncryptor.java:590)
at
org.jasypt.encryption.pbe.StandardPBEStringEncryptor.initialize(StandardPBEStringEncryptor.java:570)
at
org.jasypt.encryption.pbe.StandardPBEStringEncryptor.decrypt(StandardPBEStringEncryptor.java:697)
at
org.jasypt.properties.PropertyValueEncryptionUtils.decrypt(PropertyValueEncryptionUtils.java:72)
at
org.jasypt.spring.properties.EncryptablePropertyPlaceholderConfigurer.convertPropertyValue(EncryptablePropertyPlaceholderConfigurer.java:108)
at
org.springframework.beans.factory.config.PropertyResourceConfigurer.convertProperty(PropertyResourceConfigurer.java:112)
at
org.springframework.beans.factory.config.PropertyResourceConfigurer.convertProperties(PropertyResourceConfigurer.java:95)
at
org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:72)
at
org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:663)
at
org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:638)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:407)
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$1.<init>(XBeanBrokerFactory.java:108)
at
org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:108)
at
org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:72)
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:115)
at
org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:74)
... 10 more
--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-Authentication-tp4655478p4655539.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: ActiveMQ Authentication
Posted by joesan <co...@gmail.com>.
I will try that and let know the results here.
--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-Authentication-tp4655478p4655525.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: ActiveMQ Authentication
Posted by Chris Pratt <th...@gmail.com>.
I would try commenting out the original PropertyPlaceholderConfigurer, they
might be clashing and from what I understand you can put all the
non-encrypted values you want in your credentials-enc.properties file,
they'll work just fine. The example I found seems to have a few more
parameters for the EncryptablePropertyPlaceholderConfigurer (but I haven't
tried it myself). http://activemq.apache.org/encrypted-passwords.html
(*Chris*)
On Fri, Aug 24, 2012 at 12:11 AM, joesan <co...@gmail.com> wrote:
> I modified the properties by generating new values but still no luck!
>
> admin.password=ENC(qcsJFdo+PVIz9FLW7HZX0u/fniJ21gpk)
> publish.password=ENC(VRd4U5n+KFpQARExI7XbicVgM//1GLYB)
> consume.password=ENC(GXQopJamSs6wPv/gHzs7oQsICAfkVDcV)
>
> In my activemq.xml, I also have this additional bean tag. Should this be
> the
> reason?
>
> <bean
>
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
> <property name="locations">
> <value>file:${activemq.conf}/credentials.properties</value>
> </property>
> </bean>
>
> But it is configured to read a different properties file. What I"m also
> wondering is the property name is locations here as opposed to location in
> the bean tag for EncryptablePropertyPlaceholderConfigurer
>
> *<bean id="propertyConfigurer"
>
>
> class="org.jasypt.spring.properties.EncryptablePropertyPlaceholderConfigurer">
> <constructor-arg ref="configurationEncryptor" />
> <property name="location"
> value="file:${activemq.conf}/credentials-enc.properties"/>
> </bean>*
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-Authentication-tp4655478p4655523.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
Re: ActiveMQ Authentication
Posted by joesan <co...@gmail.com>.
I modified the properties by generating new values but still no luck!
admin.password=ENC(qcsJFdo+PVIz9FLW7HZX0u/fniJ21gpk)
publish.password=ENC(VRd4U5n+KFpQARExI7XbicVgM//1GLYB)
consume.password=ENC(GXQopJamSs6wPv/gHzs7oQsICAfkVDcV)
In my activemq.xml, I also have this additional bean tag. Should this be the
reason?
<bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<value>file:${activemq.conf}/credentials.properties</value>
</property>
</bean>
But it is configured to read a different properties file. What I"m also
wondering is the property name is locations here as opposed to location in
the bean tag for EncryptablePropertyPlaceholderConfigurer
*<bean id="propertyConfigurer"
class="org.jasypt.spring.properties.EncryptablePropertyPlaceholderConfigurer">
<constructor-arg ref="configurationEncryptor" />
<property name="location"
value="file:${activemq.conf}/credentials-enc.properties"/>
</bean>*
--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-Authentication-tp4655478p4655523.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: ActiveMQ Authentication
Posted by Dejan Bosanac <de...@nighttale.net>.
This )) at the end of admin.password property look suspicious to me.
I'd start testing with values that comes with the distro and check if
the properties are OK.
Regards
--
Dejan Bosanac
Senior Software Engineer | FuseSource Corp.
dejanb@fusesource.com | fusesource.com
skype: dejan.bosanac | twitter: @dejanb
blog: http://www.nighttale.net
ActiveMQ in Action: http://www.manning.com/snyder/
On Thu, Aug 23, 2012 at 4:48 PM, joesan <co...@gmail.com> wrote:
> This is my config: (activemq.xml)
>
> * <plugins>
> <simpleAuthenticationPlugin>
> <users>
> <authenticationUser username="admin"
> password="${admin.password}" groups="admins,publishers,consumers"/>
> <authenticationUser username="publish"
> password="${publish.password}" groups="publishers"/>
> <authenticationUser username="consume"
> password="${consume.password}" groups="consumers"/>
> </users>
> </simpleAuthenticationPlugin>
> </plugins>*
>
> In my credentials-enc.properties, I have the following:
>
> * admin.password=ENC(poLn7+4Q4huiuGb6xCI2hg==))
> publish.password=ENC(mYRkg+4Q4hua1kvpCCI2hg==)
> consume.password=ENC(tYun7+4yuEhua1kvpCCI2hg=+)*
>
> Again, in my activemq.xml, I have the following defined:
>
> *<bean id="environmentVariablesConfiguration"
> class="org.jasypt.encryption.pbe.config.EnvironmentStringPBEConfig">
> <property name="algorithm" value="PBEWithMD5AndDES" />
> <property name="passwordEnvName" value="ACTIVEMQ_ENCRYPTION_PASSWORD" />
> </bean>
> <bean id="configurationEncryptor"
> class="org.jasypt.encryption.pbe.StandardPBEStringEncryptor">
> <property name="config" ref="environmentVariablesConfiguration" />
> </bean>
> <bean id="propertyConfigurer"
> class="org.jasypt.spring.properties.EncryptablePropertyPlaceholderConfigurer">
> <constructor-arg ref="configurationEncryptor" />
> <property name="location"
> value="file:${activemq.conf}/credentials-enc.properties"/>
> </bean>*
>
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-Authentication-tp4655478p4655488.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: ActiveMQ Authentication
Posted by joesan <co...@gmail.com>.
This is my config: (activemq.xml)
* <plugins>
<simpleAuthenticationPlugin>
<users>
<authenticationUser username="admin"
password="${admin.password}" groups="admins,publishers,consumers"/>
<authenticationUser username="publish"
password="${publish.password}" groups="publishers"/>
<authenticationUser username="consume"
password="${consume.password}" groups="consumers"/>
</users>
</simpleAuthenticationPlugin>
</plugins>*
In my credentials-enc.properties, I have the following:
* admin.password=ENC(poLn7+4Q4huiuGb6xCI2hg==))
publish.password=ENC(mYRkg+4Q4hua1kvpCCI2hg==)
consume.password=ENC(tYun7+4yuEhua1kvpCCI2hg=+)*
Again, in my activemq.xml, I have the following defined:
*<bean id="environmentVariablesConfiguration"
class="org.jasypt.encryption.pbe.config.EnvironmentStringPBEConfig">
<property name="algorithm" value="PBEWithMD5AndDES" />
<property name="passwordEnvName" value="ACTIVEMQ_ENCRYPTION_PASSWORD" />
</bean>
<bean id="configurationEncryptor"
class="org.jasypt.encryption.pbe.StandardPBEStringEncryptor">
<property name="config" ref="environmentVariablesConfiguration" />
</bean>
<bean id="propertyConfigurer"
class="org.jasypt.spring.properties.EncryptablePropertyPlaceholderConfigurer">
<constructor-arg ref="configurationEncryptor" />
<property name="location"
value="file:${activemq.conf}/credentials-enc.properties"/>
</bean>*
--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-Authentication-tp4655478p4655488.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: ActiveMQ Authentication
Posted by Dejan Bosanac <de...@nighttale.net>.
Can you share your config?
"Could not resolve placeholder" is a Spring exception meaning that
you're using ${admin.password} somewhere in the file which is not
defined anywhere.
Regards
--
Dejan Bosanac
Senior Software Engineer | FuseSource Corp.
dejanb@fusesource.com | fusesource.com
skype: dejan.bosanac | twitter: @dejanb
blog: http://www.nighttale.net
ActiveMQ in Action: http://www.manning.com/snyder/
On Thu, Aug 23, 2012 at 3:12 PM, joesan <co...@gmail.com> wrote:
> I'm using the simple authentication plugin and have encrypted my passwords
> using the encrypt utility. The following problems I face when I start my
> activemq:
>
> ERROR | Failed to load: class path resource [activemq.xml], reason: Invalid
> bean definition with name 'org.apache.activemq.xbean.XBeanBrokerService#0'
> defined in class path resource [activemq.xml]: Co
> uld not resolve placeholder 'admin.password'
> org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean
> definition with name 'org.apache.activemq.xbean.XBeanBrokerService#0'
> defined in class path resource [activemq.xml]: Could
> not resolve placeholder 'admin.password'
> at
> org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:287)
> at
> org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:75)
> at
> org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:663)
> at
> org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:638)
> at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:407)
> 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$1.<init>(XBeanBrokerFactory.java:108)
> at
> org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:108)
> at
> org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:72)
> 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:115)
> at
> org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:74)
> at
> org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
> at
> org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:148)
> at
> org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
> at
> org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:90)
> 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:257)
> at org.apache.activemq.console.Main.main(Main.java:111)
> ERROR: java.lang.RuntimeException: Failed to execute start task. Reason:
> org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean
> definition with name 'org.apache.activemq.xbean.XB
> eanBrokerService#0' defined in class path resource [activemq.xml]: Could not
> resolve placeholder 'admin.password'
> java.lang.RuntimeException: Failed to execute start task. Reason:
> org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean
> definition with name 'org.apache.activemq.xbean.XBeanBrok
> erService#0' defined in class path resource [activemq.xml]: Could not
> resolve placeholder 'admin.password'
> at
> org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:98)
> at
> org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
> at
> org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:148)
> at
> org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
> at
> org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:90)
> 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:257)
> at org.apache.activemq.console.Main.main(Main.java:111)
> Caused by: org.springframework.beans.factory.BeanDefinitionStoreException:
> Invalid bean definition with name
> 'org.apache.activemq.xbean.XBeanBrokerService#0' defined in class path
> resource [activemq.x
> ml]: Could not resolve placeholder 'admin.password'
> at
> org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:287)
> at
> org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:75)
> at
> org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:663)
> at
> org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:638)
> at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:407)
> 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$1.<init>(XBeanBrokerFactory.java:108)
> at
> org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:108)
> at
> org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:72)
> 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:115)
> at
> org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:74)
> ... 10 more
> ERROR: java.lang.Exception:
> org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean
> definition with name 'org.apache.activemq.xbean.XBeanBrokerService#0'
> defined in class path res
> ource [activemq.xml]: Could not resolve placeholder 'admin.password'
> java.lang.Exception:
> org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean
> definition with name 'org.apache.activemq.xbean.XBeanBrokerService#0'
> defined in class path resource [
> activemq.xml]: Could not resolve placeholder 'admin.password'
> at
> org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:99)
> at
> org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
> at
> org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:148)
> at
> org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
> at
> org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:90)
> 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:257)
> at org.apache.activemq.console.Main.main(Main.java:111)
> Caused by: org.springframework.beans.factory.BeanDefinitionStoreException:
> Invalid bean definition with name
> 'org.apache.activemq.xbean.XBeanBrokerService#0' defined in class path
> resource [activemq.x
> ml]: Could not resolve placeholder 'admin.password'
> at
> org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:287)
> at
> org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:75)
> at
> org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:663)
> at
> org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:638)
> at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:407)
> 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$1.<init>(XBeanBrokerFactory.java:108)
> at
> org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:108)
> at
> org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:72)
> 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:115)
> at
> org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:74)
> ... 10 more
>
> Why could it not resolve the placeholder??
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-Authentication-tp4655478.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.