activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eddie Yee <eddieyeew...@hotmail.com>
Subject trying to secure web console
Date Fri, 10 Oct 2008 15:53:00 GMT
Hi,
I'm in the middle of trying to secure the web console for AMQ5.1.  I've done the following,
but am getting an error when trying to start AMQ:
 
In conf/activemq.xml
 
    <jetty xmlns="http://mortbay.com/schemas/jetty/1.0">      <Set name="UserRealms">
       <Array type="org.mortbay.jetty.security.UserRealm">          <Item>   
        <New class="org.mortbay.jetty.security.HashUserRealm">              <Set
name="name">ActiveMQ</Set>              <Set name="config">/fs/activemq/app-a/apache-activemq-5.1.0/conf/amqrealm.properties</Set>
              </New>             </Item>           </Array>         </Set>
        <connectors>            <nioConnector port="8161"/>        </connectors>
        <handlers>            <webAppContext contextPath="/admin" resourceBase="${activemq.base}/webapps/admin"
logUrlOnStart="true"/>            <webAppContext contextPath="/demo" resourceBase="${activemq.base}/webapps/demo"
logUrlOnStart="true"/>            <webAppContext contextPath="/fileserver" resourceBase="${activemq.base}/webapps/fileserver"
logUrlOnStart="true"/>        </handlers>    </jetty>
 
In webapps/admin/WEB-INF/web.xml:
  .....
  ....
  <description>    Apache ActiveMQ Web Console  </description>  <display-name>ActiveMQ
Console</display-name>
  <security-constraint>    <web-resource-collection>      <web-resource-name>Web
Console</web-resource-name>      <url-pattern>/*</url-pattern>    </web-resource-collection>
   <auth-constraint>      <role-name>admins</role-name>    </auth-constraint>
 </security-constraint>
  <login-config>    <auth-method>BASIC</auth-method>    <realm-name>ActiveMQ</realm-name>
 </login-config>
 
 
In conf/amqrealm.properties
    myAdmin: secret,admins
 
 
When I try to start activemq, I get the following error:
 
ERROR: java.lang.RuntimeException: Failed to execute start task. Reason: org.springframework.beans.factory.BeanDefinitionStoreException:
Unrecognized xbean element mapping: Array in namespace http://mortbay.com/schemas/jetty/1.0java.lang.RuntimeException:
Failed to execute start task. Reason: org.springframework.beans.factory.BeanDefinitionStoreException:
Unrecognized xbean element mapping: Array in namespace http://mortbay.com/schemas/jetty/1.0
       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:129)
       at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
       at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:79)    
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)        at org.apache.activemq.console.Main.runTaskClass(Main.java:222)
       at org.apache.activemq.console.Main.main(Main.java:106)Caused by: org.springframework.beans.factory.BeanDefinitionStoreException:
Unrecognized xbean element mapping: Array in namespace http://mortbay.com/schemas/jetty/1.0
       at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parseBeanFromExtensionElement(XBeanNamespaceHandler.java:266)
       at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parse(XBeanNamespaceHandler.java:157)
       at org.apache.xbean.spring.context.v2.XBeanNamespaceHandler.parse(XBeanNamespaceHandler.java:49)
       at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1246)
       at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1236)
       at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parseChildExtensionBean(XBeanNamespaceHandler.java:756)
       at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parseNestedPropertyViaIntrospection(XBeanNamespaceHandler.java:592)
       at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.tryParseNestedPropertyViaIntrospection(XBeanNamespaceHandler.java:561)
       at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.addNestedPropertyElements(XBeanNamespaceHandler.java:528)
       at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parseBeanFromExtensionElement(XBeanNamespaceHandler.java:219)
       at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parseBeanFromExtensionElement(XBeanNamespaceHandler.java:264)
       at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parse(XBeanNamespaceHandler.java:157)
       at org.apache.xbean.spring.context.v2.XBeanNamespaceHandler.parse(XBeanNamespaceHandler.java:49)
       at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1246)
       at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1236)
       at org.apache.xbean.spring.context.v2.XBeanBeanDefinitionDocumentReader.parseBeanDefinitions(XBeanBeanDefinitionDocumentReader.java:84)
       at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92)
       at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:488)
       at org.apache.xbean.spring.context.v2.XBeanXmlBeanDefinitionReader.registerBeanDefinitions(XBeanXmlBeanDefinitionReader.java:79)
       at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:383)
       at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:327)
       at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:295)
       at org.apache.xbean.spring.context.ResourceXmlApplicationContext.loadBeanDefinitions(ResourceXmlApplicationContext.java:111)
       at org.apache.xbean.spring.context.ResourceXmlApplicationContext.loadBeanDefinitions(ResourceXmlApplicationContext.java:104)
       at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:97)
       at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:411)
       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:338)
       at org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:64)
       at org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:52)
       at org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:96)
       at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:52)
       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:111)  
     at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:73)   
    ... 10 moreERROR: java.lang.Exception: org.springframework.beans.factory.BeanDefinitionStoreException:
Unrecognized xbean element mapping: Array in namespace http://mortbay.com/schemas/jetty/1.0java.lang.Exception:
org.springframework.beans.factory.BeanDefinitionStoreException: Unrecognized xbean element
mapping: Array in namespace http://mortbay.com/schemas/jetty/1.0        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:129)
       at org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
       at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.java:79)    
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)        at org.apache.activemq.console.Main.runTaskClass(Main.java:222)
       at org.apache.activemq.console.Main.main(Main.java:106)Caused by: org.springframework.beans.factory.BeanDefinitionStoreException:
Unrecognized xbean element mapping: Array in namespace http://mortbay.com/schemas/jetty/1.0
       at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parseBeanFromExtensionElement(XBeanNamespaceHandler.java:266)
       at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parse(XBeanNamespaceHandler.java:157)
       at org.apache.xbean.spring.context.v2.XBeanNamespaceHandler.parse(XBeanNamespaceHandler.java:49)
       at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1246)
       at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1236)
       at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parseChildExtensionBean(XBeanNamespaceHandler.java:756)
       at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parseNestedPropertyViaIntrospection(XBeanNamespaceHandler.java:592)
       at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.tryParseNestedPropertyViaIntrospection(XBeanNamespaceHandler.java:561)
       at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.addNestedPropertyElements(XBeanNamespaceHandler.java:528)
       at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parseBeanFromExtensionElement(XBeanNamespaceHandler.java:219)
       at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parseBeanFromExtensionElement(XBeanNamespaceHandler.java:264)
       at org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parse(XBeanNamespaceHandler.java:157)
       at org.apache.xbean.spring.context.v2.XBeanNamespaceHandler.parse(XBeanNamespaceHandler.java:49)
       at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1246)
       at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1236)
       at org.apache.xbean.spring.context.v2.XBeanBeanDefinitionDocumentReader.parseBeanDefinitions(XBeanBeanDefinitionDocumentReader.java:84)
       at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92)
       at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:488)
       at org.apache.xbean.spring.context.v2.XBeanXmlBeanDefinitionReader.registerBeanDefinitions(XBeanXmlBeanDefinitionReader.java:79)
       at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:383)
       at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:327)
       at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:295)
       at org.apache.xbean.spring.context.ResourceXmlApplicationContext.loadBeanDefinitions(ResourceXmlApplicationContext.java:111)
       at org.apache.xbean.spring.context.ResourceXmlApplicationContext.loadBeanDefinitions(ResourceXmlApplicationContext.java:104)
       at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:97)
       at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:411)
       at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:338)
       at org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:64)
       at org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:52)
       at org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:96)
       at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:52)
       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:111)  
     at org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:73)   
    ... 10 more
 
Anybody have an idea what I may be doing wrong?
 
Thanks!!
 
_________________________________________________________________
See how Windows Mobile brings your life together—at home, work, or on the go.
http://clk.atdmt.com/MRT/go/msnnkwxp1020093182mrt/direct/01/
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message