activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ken Gallo <kga...@exist.com>
Subject Re: ActiveMQ 4.1 war with jaas
Date Tue, 05 Dec 2006 00:56:04 GMT

Oh, you might want to comment out the command agent part in the xml:

<!--<commandAgent xmlns="http://activemq.org/config/1.0"/>-->

HTH,
Ken


dsnopek wrote:
> 
> Hello,
> 
> I built ActiveMQ 4.1 svn and deployed the WAR from
> activemq-web-console/target/ under tomcat5.  It ran perfectly fine with
> the default configuration.  However, when I enable authorization and
> authentication via jaas, the server fails to start.  I know that my
> configuration is correct because it works when running in standalone mode
> and that it is required to copy the activemq-jaas-4.1.0-incubator.jar into
> WEB-INF/lib/.  I know that my login.config and associated files are being
> loaded, because when I move them away, I get an exception telling me it
> can't read them.
> 
> What is required to get this to work?
> 
> Thanks!
> David Snopek.
> 
> This is the enormous stack trace I get:
> 
> 2006-12-04 12:10:18 StandardContext[/activemq]Exception sending context
> initialized event to listener instance of class
> org.springframework.web.context.ContextLoaderListener
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'brokerService' defined in ServletContext resource
> [/WEB-INF/applicationContext.xml]: Invocation of init method failed;
> nested exception is
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'org.apache.activemq.broker.util.CommandAgent' defined in
> ServletContext resource [/WEB-INF/activemq.xml]: Invocation of init method
> failed; nested exception is javax.jms.JMSException: User name or password
> is invalid.
> Caused by: org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'org.apache.activemq.broker.util.CommandAgent'
> defined in ServletContext resource [/WEB-INF/activemq.xml]: Invocation of
> init method failed; nested exception is javax.jms.JMSException: User name
> or password is invalid.
> Caused by: javax.jms.JMSException: User name or password is invalid.
>         at
> org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:46)
>         at
> org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1191)
>         at
> org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1273)
>         at
> org.apache.activemq.ActiveMQConnection.start(ActiveMQConnection.java:449)
>         at
> org.apache.activemq.broker.util.CommandAgent.getConnection(CommandAgent.java:145)
>         at
> org.apache.activemq.broker.util.CommandAgent.start(CommandAgent.java:55)
>         at
> org.apache.activemq.broker.util.CommandAgent.afterPropertiesSet(CommandAgent.java:100)
>         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:287)
>         at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:348)
>         at
> org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:88)
>         at
> org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:76)
>         at
> org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:72)
>         at
> org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:68)
>         at
> org.apache.activemq.xbean.BrokerFactoryBean.afterPropertiesSet(BrokerFactoryBean.java:84)
>         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:287)
>         at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:348)
>         at
> org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
>         at
> org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
>         at
> org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
>         at
> org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
>         at
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
>         at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4343)
>         at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
>         at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
>         at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
>         at
> org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:277)
>         at
> org.apache.catalina.core.StandardHost.install(StandardHost.java:832)
>         at
> org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:617)
>         at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:431)
>         at
> org.apache.catalina.startup.HostConfig.start(HostConfig.java:968)
>         at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
>         at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
>         at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
>         at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
>         at
> org.apache.catalina.core.StandardService.start(StandardService.java:480)
>         at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
>         at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
>         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.catalina.startup.Bootstrap.start(Bootstrap.java:284)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422)
> Caused by: java.lang.SecurityException: User name or password is invalid.
>         at
> org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:84)
>         at
> org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:82)
>         at
> org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:92)
>         at
> org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:690)
>         at
> org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:121)
>         at
> org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:287)
>         at
> org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:178)
>         at
> org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:95)
>         at
> org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:65)
>         at
> org.apache.activemq.transport.vm.VMTransport.syncOneWay(VMTransport.java:96)
>         at
> org.apache.activemq.transport.vm.VMTransport.oneway(VMTransport.java:83)
>         at
> org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:43)
>         at
> org.apache.activemq.transport.ResponseCorrelator.asyncRequest(ResponseCorrelator.java:69)
>         at
> org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:74)
>         at
> org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1185)
>         ... 57 more
> Caused by: javax.security.auth.login.LoginException:
> java.lang.NullPointerException
>         at java.util.Hashtable.get(Hashtable.java:336)
>         at java.util.Properties.getProperty(Properties.java:774)
>         at
> org.apache.activemq.jaas.PropertiesLoginModule.login(PropertiesLoginModule.java:112)
>         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
> javax.security.auth.login.LoginContext.invoke(LoginContext.java:769)
>         at
> javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
>         at
> javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at
> javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
>         at
> javax.security.auth.login.LoginContext.login(LoginContext.java:579)
>         at
> org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:77)
>         at
> org.apache.activemq.broker.BrokerFilter.addConnection(BrokerFilter.java:82)
>         at
> org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:92)
>         at
> org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:690)
>         at
> org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:121)
>         at
> org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:287)
>         at
> org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:178)
>         at
> org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:95)
>         at
> org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:65)
>         at
> org.apache.activemq.transport.vm.VMTransport.syncOneWay(VMTransport.java:96)
>         at
> org.apache.activemq.transport.vm.VMTransport.oneway(VMTransport.java:83)
>         at
> org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:43)
>         at
> org.apache.activemq.transport.ResponseCorrelator.asyncRequest(ResponseCorrelator.java:69)
>         at
> org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:74)
>         at
> org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1185)
>         at
> org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1273)
>         at
> org.apache.activemq.ActiveMQConnection.start(ActiveMQConnection.java:449)
>         at
> org.apache.activemq.broker.util.CommandAgent.getConnection(CommandAgent.java:145)
>         at
> org.apache.activemq.broker.util.CommandAgent.start(CommandAgent.java:55)
>         at
> org.apache.activemq.broker.util.CommandAgent.afterPropertiesSet(CommandAgent.java:100)
>         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:287)
>         at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:348)
>         at
> org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:88)
>         at
> org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:76)
>         at
> org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:72)
>         at
> org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:68)
>         at
> org.apache.activemq.xbean.BrokerFactoryBean.afterPropertiesSet(BrokerFactoryBean.java:84)
>         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:287)
>         at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:348)
>         at
> org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
>         at
> org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
>         at
> org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
>         at
> org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
>         at
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
>         at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4343)
>         at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
>         at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
>         at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
>         at
> org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:277)
>         at
> org.apache.catalina.core.StandardHost.install(StandardHost.java:832)
>         at
> org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:617)
>         at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:431)
>         at
> org.apache.catalina.startup.HostConfig.start(HostConfig.java:968)
>         at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
>         at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
>         at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
>         at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
>         at
> org.apache.catalina.core.StandardService.start(StandardService.java:480)
>         at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
>         at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
>         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.catalina.startup.Bootstrap.start(Bootstrap.java:284)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422)
> 
>         at
> javax.security.auth.login.LoginContext.invoke(LoginContext.java:872)
>         at
> javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
>         at
> javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at
> javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
>         at
> javax.security.auth.login.LoginContext.login(LoginContext.java:579)
>         at
> org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:77)
>         ... 71 more
> 
> 

-- 
View this message in context: http://www.nabble.com/ActiveMQ-4.1-war-with-jaas-tf2757900.html#a7691192
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message