title: Integration of Apache ActiveMQ to Windows Server 2012 R2 Active Directory
body: <p>For <strong>Apache ActiveMQ</strong>
  I have one <strong>CentOS 7 VM</strong>. In this VM I installed <strong>Apache ActiveMQ v5.13.3</strong>.
  My <strong>Apache ActiveMQ admin URL</strong> is <strong><a href="http://192.168.1.186:8161/admin" rel="nofollow">http://192.168.1.186:8161/admin</a></strong></p>
  
  <p>For <strong>Active Directory</strong>
  I have <strong>Windows Server 2012 R2 VM</strong>. In this VM I have <strong>Active Directory</strong>.
  <strong>IP Address 192.168.1.101/testlabserver.testlab.local</strong></p>
  
  <p><strong>I want to login in ActiveMQ admin URL "<a href="http://192.168.1.186:8161/admin" rel="nofollow">http://192.168.1.186:8161/admin</a>" using my Active Directory users</strong>.</p>
  
  <p>For this i follow 
  <a href="http://steamingpileofsoftware.blogspot.in/2013/10/secure-your-jetty-activemq-web-console.html" rel="nofollow">http://steamingpileofsoftware.blogspot.in/2013/10/secure-your-jetty-activemq-web-console.html</a></p>
  
  <p><strong>conf/activemq.xml</strong> file content</p>
  
  <pre><code>&lt;beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
    http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd"&gt;
      &lt;bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"&gt;
          &lt;property name="locations"&gt;
              &lt;value&gt;file:${activemq.conf}/credentials.properties&lt;/value&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
      &lt;bean id="logQuery" class="io.fabric8.insight.log.log4j.Log4jLogQuery"
            lazy-init="false" scope="singleton"
            init-method="start" destroy-method="stop"&gt;
      &lt;/bean&gt;
      &lt;broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.data}"&gt;
          &lt;destinationPolicy&gt;
              &lt;policyMap&gt;
                &lt;policyEntries&gt;
                  &lt;policyEntry topic="&gt;"&gt;
                    &lt;pendingMessageLimitStrategy&gt;
                      &lt;constantPendingMessageLimitStrategy limit="1000"/&gt;
                    &lt;/pendingMessageLimitStrategy&gt;
                  &lt;/policyEntry&gt;
                &lt;/policyEntries&gt;
              &lt;/policyMap&gt;
          &lt;/destinationPolicy&gt;
          &lt;managementContext&gt;
              &lt;managementContext createConnector="true"/&gt;
          &lt;/managementContext&gt;
          &lt;persistenceAdapter&gt;
              &lt;kahaDB directory="${activemq.data}/kahadb"/&gt;
          &lt;/persistenceAdapter&gt;
            &lt;systemUsage&gt;
              &lt;systemUsage&gt;
                  &lt;memoryUsage&gt;
                      &lt;memoryUsage percentOfJvmHeap="70" /&gt;
                  &lt;/memoryUsage&gt;
                  &lt;storeUsage&gt;
                      &lt;storeUsage limit="100 gb"/&gt;
                  &lt;/storeUsage&gt;
                  &lt;tempUsage&gt;
                      &lt;tempUsage limit="50 gb"/&gt;
                  &lt;/tempUsage&gt;
              &lt;/systemUsage&gt;
          &lt;/systemUsage&gt;
          &lt;transportConnectors&gt;
              &lt;transportConnector name="openwire" uri="tcp://0.0.0.0:61616?maximumConnections=1000&amp;amp;wireFormat.maxFrameSize=104857600"/&gt;
              &lt;transportConnector name="amqp" uri="amqp://0.0.0.0:5672?maximumConnections=1000&amp;amp;wireFormat.maxFrameSize=104857600"/&gt;
              &lt;transportConnector name="stomp" uri="stomp://0.0.0.0:61613?maximumConnections=1000&amp;amp;wireFormat.maxFrameSize=104857600"/&gt;
              &lt;transportConnector name="mqtt" uri="mqtt://0.0.0.0:1883?maximumConnections=1000&amp;amp;wireFormat.maxFrameSize=104857600"/&gt;
              &lt;transportConnector name="ws" uri="ws://0.0.0.0:61614?maximumConnections=1000&amp;amp;wireFormat.maxFrameSize=104857600"/&gt;
          &lt;/transportConnectors&gt;
          &lt;shutdownHooks&gt;
              &lt;bean xmlns="http://www.springframework.org/schema/beans" class="org.apache.activemq.hooks.SpringContextHook" /&gt;
          &lt;/shutdownHooks&gt;
      &lt;/broker&gt;
      &lt;import resource="jetty.xml"/&gt;
  &lt;/beans&gt;
  </code></pre>
  
  <p><strong>conf/jetty.xml</strong> file content</p>
  
  <pre><code>&lt;beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"&gt;
      &lt;bean id="securityLoginService" class="org.eclipse.jetty.security.HashLoginService"&gt;
          &lt;property name="name" value="ActiveMQRealm" /&gt;
          &lt;property name="config" value="${activemq.conf}/jetty-realm.properties" /&gt;
      &lt;/bean&gt;
      &lt;bean id="securityConstraint" class="org.eclipse.jetty.util.security.Constraint"&gt;
          &lt;property name="name" value="BASIC" /&gt;
          &lt;property name="roles" value="user,admin" /&gt;
          &lt;property name="authenticate" value="true" /&gt;
      &lt;/bean&gt;
      &lt;bean id="adminSecurityConstraint" class="org.eclipse.jetty.util.security.Constraint"&gt;
          &lt;property name="name" value="BASIC" /&gt;
          &lt;property name="roles" value="ActiveMQAdmin" /&gt;
          &lt;property name="authenticate" value="true" /&gt;
      &lt;/bean&gt;
      &lt;bean id="securityConstraintMapping" class="org.eclipse.jetty.security.ConstraintMapping"&gt;
          &lt;property name="constraint" ref="securityConstraint" /&gt;
          &lt;property name="pathSpec" value="/api/*,/admin/*,*.jsp" /&gt;
      &lt;/bean&gt;
      &lt;bean id="adminSecurityConstraintMapping" class="org.eclipse.jetty.security.ConstraintMapping"&gt;
          &lt;property name="constraint" ref="adminSecurityConstraint" /&gt;
          &lt;property name="pathSpec" value="*.action" /&gt;
      &lt;/bean&gt;
      &lt;bean id="rewriteHandler" class="org.eclipse.jetty.rewrite.handler.RewriteHandler"&gt;
          &lt;property name="rules"&gt;
              &lt;list&gt;
                  &lt;bean id="header" class="org.eclipse.jetty.rewrite.handler.HeaderPatternRule"&gt;
                    &lt;property name="pattern" value="*"/&gt;
                    &lt;property name="name" value="X-FRAME-OPTIONS"/&gt;
                    &lt;property name="value" value="SAMEORIGIN"/&gt;
                  &lt;/bean&gt;
              &lt;/list&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
      &lt;bean id="secHandlerCollection" class="org.eclipse.jetty.server.handler.HandlerCollection"&gt;
          &lt;property name="handlers"&gt;
              &lt;list&gt;
                  &lt;ref bean="rewriteHandler"/&gt;
                  &lt;bean class="org.eclipse.jetty.webapp.WebAppContext"&gt;
                      &lt;property name="contextPath" value="/admin" /&gt;
                      &lt;property name="resourceBase" value="${activemq.home}/webapps/admin" /&gt;
                      &lt;property name="logUrlOnStart" value="true" /&gt;
                  &lt;/bean&gt;
                  &lt;bean class="org.eclipse.jetty.webapp.WebAppContext"&gt;
                      &lt;property name="contextPath" value="/api" /&gt;
                      &lt;property name="resourceBase" value="${activemq.home}/webapps/api" /&gt;
                      &lt;property name="logUrlOnStart" value="true" /&gt;
                  &lt;/bean&gt;
                  &lt;bean class="org.eclipse.jetty.server.handler.ResourceHandler"&gt;
                      &lt;property name="directoriesListed" value="false" /&gt;
                      &lt;property name="welcomeFiles"&gt;
                          &lt;list&gt;
                              &lt;value&gt;index.html&lt;/value&gt;
                          &lt;/list&gt;
                      &lt;/property&gt;
                      &lt;property name="resourceBase" value="${activemq.home}/webapps/" /&gt;
                  &lt;/bean&gt;
                  &lt;bean id="defaultHandler" class="org.eclipse.jetty.server.handler.DefaultHandler"&gt;
                      &lt;property name="serveIcon" value="false" /&gt;
                  &lt;/bean&gt;
              &lt;/list&gt;
          &lt;/property&gt;
      &lt;/bean&gt;    
      &lt;bean id="securityHandler" class="org.eclipse.jetty.security.ConstraintSecurityHandler"&gt;
          &lt;property name="loginService" ref="ldapLoginService" /&gt;
          &lt;property name="strict" value="false" /&gt;
          &lt;property name="identityService" ref="identityService" /&gt;
          &lt;property name="authenticator"&gt;
              &lt;bean class="org.eclipse.jetty.security.authentication.BasicAuthenticator" /&gt;
          &lt;/property&gt;
          &lt;property name="constraintMappings"&gt;
              &lt;list&gt;
                  &lt;ref bean="adminSecurityConstraintMapping" /&gt;
                  &lt;ref bean="securityConstraintMapping" /&gt;
              &lt;/list&gt;
          &lt;/property&gt;
          &lt;property name="handler" ref="secHandlerCollection" /&gt;
      &lt;/bean&gt;
      &lt;bean id="contexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection"&gt;
      &lt;/bean&gt;
      &lt;bean id="jettyPort" class="org.apache.activemq.web.WebConsolePort" init-method="start"&gt;
          &lt;property name="host" value="0.0.0.0"/&gt;
          &lt;property name="port" value="8161"/&gt;
      &lt;/bean&gt;
      &lt;bean id="Server" depends-on="jettyPort" class="org.eclipse.jetty.server.Server"
          destroy-method="stop"&gt;
          &lt;property name="handler"&gt;
              &lt;bean id="handlers" class="org.eclipse.jetty.server.handler.HandlerCollection"&gt;
                  &lt;property name="handlers"&gt;
                      &lt;list&gt;
                          &lt;ref bean="contexts" /&gt;
                          &lt;ref bean="securityHandler" /&gt;
                      &lt;/list&gt;
                  &lt;/property&gt;
              &lt;/bean&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
      &lt;bean id="invokeConnectors" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean"&gt;
          &lt;property name="targetObject" ref="Server" /&gt;
          &lt;property name="targetMethod" value="setConnectors" /&gt;
          &lt;property name="arguments"&gt;
          &lt;list&gt;
              &lt;bean id="Connector" class="org.eclipse.jetty.server.ServerConnector"&gt;
                  &lt;constructor-arg ref="Server" /&gt;
                     &lt;property name="host" value="#{systemProperties['jetty.host']}" /&gt;
                     &lt;property name="port" value="#{systemProperties['jetty.port']}" /&gt;
                 &lt;/bean&gt;
              &lt;/list&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
      &lt;bean id="configureJetty" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean"&gt;
          &lt;property name="staticMethod" value="org.apache.activemq.web.config.JspConfigurer.configureJetty" /&gt;
          &lt;property name="arguments"&gt;
              &lt;list&gt;
                  &lt;ref bean="Server" /&gt;
                  &lt;ref bean="secHandlerCollection" /&gt;
              &lt;/list&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
      &lt;bean id="invokeStart" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean" 
          depends-on="configureJetty, invokeConnectors"&gt;
          &lt;property name="targetObject" ref="Server" /&gt;
          &lt;property name="targetMethod" value="start" /&gt;
      &lt;/bean&gt;
      &lt;bean id="ldapLoginService" class="org.eclipse.jetty.plus.jaas.JAASLoginService"&gt;
          &lt;property name="name" value="LdapRealm" /&gt;
          &lt;property name="loginModuleName" value="amqLdapLoginModule" /&gt;
      &lt;/bean&gt;
      &lt;bean id="identityService" class="org.eclipse.jetty.security.DefaultIdentityService"/&gt;
  &lt;/beans&gt;
  </code></pre>
  
  <p><strong>conf/ldap.conf</strong> file content</p>
  
  <pre><code>amqLdapLoginModule {
     org.eclipse.jetty.plus.jaas.spi.LdapLoginModule required
     debug="true"
     contextFactory="com.sun.jndi.ldap.LdapCtxFactory"
     hostname="192.168.1.101"
     port="636"
     authenticationMethod="simple"
     forceBindingLogin="true"
     userBaseDn="OU=TestUser,DC=TESTLAB,DC=local"
     userRdnAttribute="sAMAccountName"
     userIdAttribute="sAMAccountName"
     userPasswordAttribute="unicodePwd"
     userObjectClass="user"
     roleBaseDn="OU=TestUser,DC=TESTLAB,DC=local"
     roleNameAttribute="cn"
     roleMemberAttribute="member"
     roleObjectClass="group";
     };
  </code></pre>
  
  <p>After this configuration when i start my ActiveMQ it gives me error.
  <strong>My ActiveMQ logs are below</strong></p>
  
  <pre><code>2016-07-03 16:51:13,546 | INFO  | Listening for connections at: tcp://activemq.testlab.local:61616?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600 | org.apache.activemq.transport.TransportServerThreadSupport | main
  2016-07-03 16:51:13,549 | INFO  | Connector openwire started | org.apache.activemq.broker.TransportConnector | main
  2016-07-03 16:51:13,553 | INFO  | Listening for connections at: amqp://activemq.testlab.local:5672?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600 | org.apache.activemq.transport.TransportServerThreadSupport | main
  2016-07-03 16:51:13,556 | INFO  | Connector amqp started | org.apache.activemq.broker.TransportConnector | main
  2016-07-03 16:51:13,560 | INFO  | Listening for connections at: stomp://activemq.testlab.local:61613?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600 | org.apache.activemq.transport.TransportServerThreadSupport | main
  2016-07-03 16:51:13,562 | INFO  | Connector stomp started | org.apache.activemq.broker.TransportConnector | main
  2016-07-03 16:51:13,565 | INFO  | Listening for connections at: mqtt://activemq.testlab.local:1883?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600 | org.apache.activemq.transport.TransportServerThreadSupport | main
  2016-07-03 16:51:13,567 | INFO  | Connector mqtt started | org.apache.activemq.broker.TransportConnector | main
  2016-07-03 16:51:13,842 | WARN  | ServletContext@o.e.j.s.ServletContextHandler@62010f5c{/,null,STARTING} has uncovered http methods for path: / | org.eclipse.jetty.security.SecurityHandler | main
  2016-07-03 16:51:13,886 | INFO  | Listening for connections at ws://activemq.testlab.local:61614?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600 | org.apache.activemq.transport.ws.WSTransportServer | main
  2016-07-03 16:51:13,889 | INFO  | Connector ws started | org.apache.activemq.broker.TransportConnector | main
  2016-07-03 16:51:13,892 | INFO  | Apache ActiveMQ 5.13.3 (localhost, ID:activemq.testlab.local-33670-1467544873205-0:1) started | org.apache.activemq.broker.BrokerService | main
  2016-07-03 16:51:13,894 | INFO  | For help or more information please see: http://activemq.apache.org | org.apache.activemq.broker.BrokerService | main
  2016-07-03 16:51:13,897 | WARN  | Store limit is 102400 mb (current store usage is 20 mb). The data directory: /opt/apache-activemq-5.13.3/data/kahadb only has 33047 mb of usable space. - resetting to maximum available disk space: 33047 mb | org.apache.activemq.broker.BrokerService | main
  2016-07-03 16:51:13,899 | WARN  | Temporary Store limit is 51200 mb (current store usage is 0 mb). The data directory: /opt/apache-activemq-5.13.3/data only has 33027 mb of usable space. - resetting to maximum available disk space: 33027 mb | org.apache.activemq.broker.BrokerService | main
  2016-07-03 16:51:14,002 | WARN  | Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityHandler' defined in class path resource [jetty.xml]: Cannot resolve reference to bean 'ldapLoginService' while setting bean property 'loginService'; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.eclipse.jetty.plus.jaas.JAASLoginService] for bean with name 'ldapLoginService' defined in class path resource [jetty.xml]; nested exception is java.lang.ClassNotFoundException: org.eclipse.jetty.plus.jaas.JAASLoginService | org.apache.activemq.xbean.XBeanBrokerFactory$1 | main
  2016-07-03 16:51:14,007 | INFO  | Apache ActiveMQ 5.13.3 (localhost, ID:activemq.testlab.local-33670-1467544873205-0:1) is shutting down | org.apache.activemq.broker.BrokerService | main
  2016-07-03 16:51:14,011 | INFO  | Connector openwire stopped | org.apache.activemq.broker.TransportConnector | main
  2016-07-03 16:51:14,012 | INFO  | Connector amqp stopped | org.apache.activemq.broker.TransportConnector | main
  2016-07-03 16:51:14,013 | INFO  | Connector stomp stopped | org.apache.activemq.broker.TransportConnector | main
  2016-07-03 16:51:14,013 | INFO  | socketQueue interrupted - stopping | org.apache.activemq.transport.tcp.TcpTransportServer | ActiveMQ Transport Server Thread Handler: amqp://0.0.0.0:5672?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600
  2016-07-03 16:51:14,013 | INFO  | socketQueue interrupted - stopping | org.apache.activemq.transport.tcp.TcpTransportServer | ActiveMQ Transport Server Thread Handler: stomp://0.0.0.0:61613?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600
  2016-07-03 16:51:14,016 | INFO  | socketQueue interrupted - stopping | org.apache.activemq.transport.tcp.TcpTransportServer | ActiveMQ Transport Server Thread Handler: mqtt://0.0.0.0:1883?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600
  2016-07-03 16:51:14,023 | ERROR | Could not accept connection : java.lang.InterruptedException | org.apache.activemq.broker.TransportConnector | ActiveMQ Transport Server Thread Handler: mqtt://0.0.0.0:1883?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600
  2016-07-03 16:51:14,016 | INFO  | Connector mqtt stopped | org.apache.activemq.broker.TransportConnector | main
  2016-07-03 16:51:14,021 | ERROR | Could not accept connection : java.lang.InterruptedException | org.apache.activemq.broker.TransportConnector | ActiveMQ Transport Server Thread Handler: stomp://0.0.0.0:61613?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600
  2016-07-03 16:51:14,020 | ERROR | Could not accept connection : java.lang.InterruptedException | org.apache.activemq.broker.TransportConnector | ActiveMQ Transport Server Thread Handler: amqp://0.0.0.0:5672?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600
  2016-07-03 16:51:14,043 | INFO  | Connector ws stopped | org.apache.activemq.broker.TransportConnector | main
  2016-07-03 16:51:14,051 | INFO  | PListStore:[/opt/apache-activemq-5.13.3/data/localhost/tmp_storage] stopped | org.apache.activemq.store.kahadb.plist.PListStoreImpl | main
  2016-07-03 16:51:14,052 | INFO  | Stopping async queue tasks | org.apache.activemq.store.kahadb.KahaDBStore | main
  2016-07-03 16:51:14,053 | INFO  | Stopping async topic tasks | org.apache.activemq.store.kahadb.KahaDBStore | main
  2016-07-03 16:51:14,055 | INFO  | Stopped KahaDB | org.apache.activemq.store.kahadb.KahaDBStore | main
  2016-07-03 16:51:14,127 | INFO  | Apache ActiveMQ 5.13.3 (localhost, ID:activemq.testlab.local-33670-1467544873205-0:1) uptime 1.387 seconds | org.apache.activemq.broker.BrokerService | main
  2016-07-03 16:51:14,128 | INFO  | Apache ActiveMQ 5.13.3 (localhost, ID:activemq.testlab.local-33670-1467544873205-0:1) is shutdown | org.apache.activemq.broker.BrokerService | main
  2016-07-03 16:51:14,130 | INFO  | Closing org.apache.activemq.xbean.XBeanBrokerFactory$1@67b64c45: startup date [Sun Jul 03 16:51:08 IST 2016]; root of context hierarchy | org.apache.activemq.xbean.XBeanBrokerFactory$1 | main
  2016-07-03 16:51:14,138 | WARN  | Exception thrown from LifecycleProcessor on context close | org.apache.activemq.xbean.XBeanBrokerFactory$1 | main
  java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' before invoking lifecycle methods via the context: org.apache.activemq.xbean.XBeanBrokerFactory$1@67b64c45: startup date [Sun Jul 03 16:51:08 IST 2016]; root of context hierarchy
      at org.springframework.context.support.AbstractApplicationContext.getLifecycleProcessor(AbstractApplicationContext.java:357)[spring-context-4.1.9.RELEASE.jar:4.1.9.RELEASE]
      at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:884)[spring-context-4.1.9.RELEASE.jar:4.1.9.RELEASE]
      at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:843)[spring-context-4.1.9.RELEASE.jar:4.1.9.RELEASE]
      at org.apache.activemq.hooks.SpringContextHook.run(SpringContextHook.java:30)[activemq-spring-5.13.3.jar:5.13.3]
      at org.apache.activemq.broker.BrokerService.stop(BrokerService.java:873)[activemq-broker-5.13.3.jar:5.13.3]
      at org.apache.activemq.xbean.XBeanBrokerService.stop(XBeanBrokerService.java:122)[activemq-spring-5.13.3.jar:5.13.3]
      at org.apache.activemq.xbean.XBeanBrokerService.destroy(XBeanBrokerService.java:115)[activemq-spring-5.13.3.jar:5.13.3]
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_91]
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_91]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_91]
      at java.lang.reflect.Method.invoke(Method.java:498)[:1.8.0_91]
      at org.springframework.beans.factory.support.DisposableBeanAdapter.invokeCustomDestroyMethod(DisposableBeanAdapter.java:351)[spring-beans-4.1.9.RELEASE.jar:4.1.9.RELEASE]
      at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:274)[spring-beans-4.1.9.RELEASE.jar:4.1.9.RELEASE]
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:578)[spring-beans-4.1.9.RELEASE.jar:4.1.9.RELEASE]
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:554)[spring-beans-4.1.9.RELEASE.jar:4.1.9.RELEASE]
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingleton(DefaultListableBeanFactory.java:900)[spring-beans-4.1.9.RELEASE.jar:4.1.9.RELEASE]
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:523)[spring-beans-4.1.9.RELEASE.jar:4.1.9.RELEASE]
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingletons(DefaultListableBeanFactory.java:907)[spring-beans-4.1.9.RELEASE.jar:4.1.9.RELEASE]
      at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:915)[spring-context-4.1.9.RELEASE.jar:4.1.9.RELEASE]
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:493)[spring-context-4.1.9.RELEASE.jar:4.1.9.RELEASE]
      at org.apache.xbean.spring.context.ResourceXmlApplicationContext.&lt;init&gt;(ResourceXmlApplicationContext.java:64)[xbean-spring-3.18.jar:3.18]
      at org.apache.xbean.spring.context.ResourceXmlApplicationContext.&lt;init&gt;(ResourceXmlApplicationContext.java:52)[xbean-spring-3.18.jar:3.18]
      at org.apache.activemq.xbean.XBeanBrokerFactory$1.&lt;init&gt;(XBeanBrokerFactory.java:104)[activemq-spring-5.13.3.jar:5.13.3]
      at org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:104)[activemq-spring-5.13.3.jar:5.13.3]
      at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:67)[activemq-spring-5.13.3.jar:5.13.3]
      at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:71)[activemq-broker-5.13.3.jar:5.13.3]
      at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)[activemq-broker-5.13.3.jar:5.13.3]
      at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:87)[activemq-console-5.13.3.jar:5.13.3]
      at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:63)[activemq-console-5.13.3.jar:5.13.3]
      at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:154)[activemq-console-5.13.3.jar:5.13.3]
      at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:63)[activemq-console-5.13.3.jar:5.13.3]
      at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:104)[activemq-console-5.13.3.jar:5.13.3]
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_91]
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_91]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_91]
      at java.lang.reflect.Method.invoke(Method.java:498)[:1.8.0_91]
      at org.apache.activemq.console.Main.runTaskClass(Main.java:262)[activemq.jar:5.13.3]
      at org.apache.activemq.console.Main.main(Main.java:115)[activemq.jar:5.13.3]
  2016-07-03 16:51:14,146 | ERROR | Failed to load: class path resource [activemq.xml], reason: Error creating bean with name 'securityHandler' defined in class path resource [jetty.xml]: Cannot resolve reference to bean 'ldapLoginService' while setting bean property 'loginService'; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.eclipse.jetty.plus.jaas.JAASLoginService] for bean with name 'ldapLoginService' defined in class path resource [jetty.xml]; nested exception is java.lang.ClassNotFoundException: org.eclipse.jetty.plus.jaas.JAASLoginService | org.apache.activemq.xbean.XBeanBrokerFactory | main
  org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityHandler' defined in class path resource [jetty.xml]: Cannot resolve reference to bean 'ldapLoginService' while setting bean property 'loginService'; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.eclipse.jetty.plus.jaas.JAASLoginService] for bean with name 'ldapLoginService' defined in class path resource [jetty.xml]; nested exception is java.lang.ClassNotFoundException: org.eclipse.jetty.plus.jaas.JAASLoginService
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:359)[spring-beans-4.1.9.RELEASE.jar:4.1.9.RELEASE]
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)[spring-beans-4.1.9.RELEASE.jar:4.1.9.RELEASE]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1475)[spring-beans-4.1.9.RELEASE.jar:4.1.9.RELEASE]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1220)[spring-beans-4.1.9.RELEASE.jar:4.1.9.RELEASE]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)[spring-beans-4.1.9.RELEASE.jar:4.1.9.RELEASE]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)[spring-beans-4.1.9.RELEASE.jar:4.1.9.RELEASE]
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)[spring-beans-4.1.9.RELEASE.jar:4.1.9.RELEASE]
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)[spring-beans-4.1.9.RELEASE.jar:4.1.9.RELEASE]
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)[spring-beans-4.1.9.RELEASE.jar:4.1.9.RELEASE]
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)[spring-beans-4.1.9.RELEASE.jar:4.1.9.RELEASE]
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755)[spring-beans-4.1.9.RELEASE.jar:4.1.9.RELEASE]
      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:762)[spring-context-4.1.9.RELEASE.jar:4.1.9.RELEASE]
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)[spring-context-4.1.9.RELEASE.jar:4.1.9.RELEASE]
      at org.apache.xbean.spring.context.ResourceXmlApplicationContext.&lt;init&gt;(ResourceXmlApplicationContext.java:64)[xbean-spring-3.18.jar:3.18]
      at org.apache.xbean.spring.context.ResourceXmlApplicationContext.&lt;init&gt;(ResourceXmlApplicationContext.java:52)[xbean-spring-3.18.jar:3.18]
      at org.apache.activemq.xbean.XBeanBrokerFactory$1.&lt;init&gt;(XBeanBrokerFactory.java:104)[activemq-spring-5.13.3.jar:5.13.3]
      at org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:104)[activemq-spring-5.13.3.jar:5.13.3]
      at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:67)[activemq-spring-5.13.3.jar:5.13.3]
      at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:71)[activemq-broker-5.13.3.jar:5.13.3]
      at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)[activemq-broker-5.13.3.jar:5.13.3]
      at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:87)[activemq-console-5.13.3.jar:5.13.3]
      at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:63)[activemq-console-5.13.3.jar:5.13.3]
      at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:154)[activemq-console-5.13.3.jar:5.13.3]
      at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:63)[activemq-console-5.13.3.jar:5.13.3]
      at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:104)[activemq-console-5.13.3.jar:5.13.3]
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_91]
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_91]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_91]
      at java.lang.reflect.Method.invoke(Method.java:498)[:1.8.0_91]
      at org.apache.activemq.console.Main.runTaskClass(Main.java:262)[activemq.jar:5.13.3]
      at org.apache.activemq.console.Main.main(Main.java:115)[activemq.jar:5.13.3]
  </code></pre>
  
  <p>Please help me to resolved this issue.</p>