Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 5.6.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Used pax-exam based tests to verify that broker works in Karaf environment.

        Activity

        Hide
        Jean-Baptiste Onofré added a comment -

        I will add new itests using Pax Exam in order to bootstrap a Karaf distribution, deploy ActiveMQ features on it and check the behaviour.

        Show
        Jean-Baptiste Onofré added a comment - I will add new itests using Pax Exam in order to bootstrap a Karaf distribution, deploy ActiveMQ features on it and check the behaviour.
        Hide
        Dejan Bosanac added a comment -

        So, leveldb store and mqtt and amqp transports should be working fine now.

        Show
        Dejan Bosanac added a comment - So, leveldb store and mqtt and amqp transports should be working fine now.
        Hide
        Dejan Bosanac added a comment -

        Did some initial work on leveldb stuff. I introduced back uber jar and managed to basically add it to the activemq-osgi, but it still needs some work. Ideally I'd love to install it through activemq-extra feature (like it was in the previous version), so there's still some work to be done.

        Show
        Dejan Bosanac added a comment - Did some initial work on leveldb stuff. I introduced back uber jar and managed to basically add it to the activemq-osgi, but it still needs some work. Ideally I'd love to install it through activemq-extra feature (like it was in the previous version), so there's still some work to be done.
        Hide
        Hiram Chirino added a comment -

        websocket transports fail to start:

                    <transportConnector name="ws" uri="ws://0.0.0.0:61683"/>
                    <transportConnector name="wss" uri="wss://0.0.0.0:61684"/>
        
        2013-01-25 12:15:32,553 | ERROR | 44-8921e2dbcc43) | BrokerService                    | he.activemq.broker.BrokerService  556 | 54 - org.apache.activemq.activemq-osgi - 5.8.0.SNAPSHOT | Failed to start Apache ActiveMQ (amq-broker, ID:chirino-retina.chirino-53911-1359132513820-0:2). Reason: java.io.IOException: Transport Connector could not be registered in JMX: org/eclipse/jetty/server/HandlerContainer
        java.io.IOException: Transport Connector could not be registered in JMX: org/eclipse/jetty/server/HandlerContainer
        	at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:27)[54:org.apache.activemq.activemq-osgi:5.8.0.SNAPSHOT]
        	at org.apache.activemq.broker.BrokerService.registerConnectorMBean(BrokerService.java:1970)[54:org.apache.activemq.activemq-osgi:5.8.0.SNAPSHOT]
        	at org.apache.activemq.broker.BrokerService.startTransportConnector(BrokerService.java:2431)[54:org.apache.activemq.activemq-osgi:5.8.0.SNAPSHOT]
        	at org.apache.activemq.broker.BrokerService.startAllConnectors(BrokerService.java:2349)[54:org.apache.activemq.activemq-osgi:5.8.0.SNAPSHOT]
        	at org.apache.activemq.broker.BrokerService.doStartBroker(BrokerService.java:650)[54:org.apache.activemq.activemq-osgi:5.8.0.SNAPSHOT]
        	at org.apache.activemq.broker.BrokerService.startBroker(BrokerService.java:617)[54:org.apache.activemq.activemq-osgi:5.8.0.SNAPSHOT]
        	at org.apache.activemq.broker.BrokerService.start(BrokerService.java:553)[54:org.apache.activemq.activemq-osgi:5.8.0.SNAPSHOT]
        	at org.apache.activemq.osgi.ActiveMQServiceFactory.updated(ActiveMQServiceFactory.java:97)[54:org.apache.activemq.activemq-osgi:5.8.0.SNAPSHOT]
        	at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceFactoryHelper.provide(ConfigurationManager.java:1326)[5:org.apache.felix.configadmin:1.4.0]
        	at org.apache.felix.cm.impl.ConfigurationManager$UpdateConfiguration.run(ConfigurationManager.java:1712)[5:org.apache.felix.configadmin:1.4.0]
        	at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:103)[5:org.apache.felix.configadmin:1.4.0]
        	at java.lang.Thread.run(Thread.java:722)[:1.7.0_07]
        Caused by: java.lang.NoClassDefFoundError: org/eclipse/jetty/server/HandlerContainer
        	at org.apache.activemq.transport.ws.WSTransportFactory.doBind(WSTransportFactory.java:41)[54:org.apache.activemq.activemq-osgi:5.8.0.SNAPSHOT]
        	at org.apache.activemq.transport.TransportFactorySupport.bind(TransportFactorySupport.java:24)[54:org.apache.activemq.activemq-osgi:5.8.0.SNAPSHOT]
        	at org.apache.activemq.broker.TransportConnector.createTransportServer(TransportConnector.java:307)[54:org.apache.activemq.activemq-osgi:5.8.0.SNAPSHOT]
        	at org.apache.activemq.broker.TransportConnector.getServer(TransportConnector.java:139)[54:org.apache.activemq.activemq-osgi:5.8.0.SNAPSHOT]
        	at org.apache.activemq.broker.TransportConnector.asManagedConnector(TransportConnector.java:106)[54:org.apache.activemq.activemq-osgi:5.8.0.SNAPSHOT]
        	at org.apache.activemq.broker.BrokerService.registerConnectorMBean(BrokerService.java:1965)[54:org.apache.activemq.activemq-osgi:5.8.0.SNAPSHOT]
        	... 10 more
        Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.server.HandlerContainer not found by org.apache.activemq.activemq-osgi [54]
        	at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1460)[org.apache.felix.framework-4.0.3.jar:]
        	at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:72)[org.apache.felix.framework-4.0.3.jar:]
        	at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1843)[org.apache.felix.framework-4.0.3.jar:]
        	at java.lang.ClassLoader.loadClass(ClassLoader.java:356)[:1.7.0_07]
        	... 16 more
        
        Show
        Hiram Chirino added a comment - websocket transports fail to start: <transportConnector name= "ws" uri= "ws: //0.0.0.0:61683" /> <transportConnector name= "wss" uri= "wss: //0.0.0.0:61684" /> 2013-01-25 12:15:32,553 | ERROR | 44-8921e2dbcc43) | BrokerService | he.activemq.broker.BrokerService 556 | 54 - org.apache.activemq.activemq-osgi - 5.8.0.SNAPSHOT | Failed to start Apache ActiveMQ (amq-broker, ID:chirino-retina.chirino-53911-1359132513820-0:2). Reason: java.io.IOException: Transport Connector could not be registered in JMX: org/eclipse/jetty/server/HandlerContainer java.io.IOException: Transport Connector could not be registered in JMX: org/eclipse/jetty/server/HandlerContainer at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:27)[54:org.apache.activemq.activemq-osgi:5.8.0.SNAPSHOT] at org.apache.activemq.broker.BrokerService.registerConnectorMBean(BrokerService.java:1970)[54:org.apache.activemq.activemq-osgi:5.8.0.SNAPSHOT] at org.apache.activemq.broker.BrokerService.startTransportConnector(BrokerService.java:2431)[54:org.apache.activemq.activemq-osgi:5.8.0.SNAPSHOT] at org.apache.activemq.broker.BrokerService.startAllConnectors(BrokerService.java:2349)[54:org.apache.activemq.activemq-osgi:5.8.0.SNAPSHOT] at org.apache.activemq.broker.BrokerService.doStartBroker(BrokerService.java:650)[54:org.apache.activemq.activemq-osgi:5.8.0.SNAPSHOT] at org.apache.activemq.broker.BrokerService.startBroker(BrokerService.java:617)[54:org.apache.activemq.activemq-osgi:5.8.0.SNAPSHOT] at org.apache.activemq.broker.BrokerService.start(BrokerService.java:553)[54:org.apache.activemq.activemq-osgi:5.8.0.SNAPSHOT] at org.apache.activemq.osgi.ActiveMQServiceFactory.updated(ActiveMQServiceFactory.java:97)[54:org.apache.activemq.activemq-osgi:5.8.0.SNAPSHOT] at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceFactoryHelper.provide(ConfigurationManager.java:1326)[5:org.apache.felix.configadmin:1.4.0] at org.apache.felix.cm.impl.ConfigurationManager$UpdateConfiguration.run(ConfigurationManager.java:1712)[5:org.apache.felix.configadmin:1.4.0] at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:103)[5:org.apache.felix.configadmin:1.4.0] at java.lang. Thread .run( Thread .java:722)[:1.7.0_07] Caused by: java.lang.NoClassDefFoundError: org/eclipse/jetty/server/HandlerContainer at org.apache.activemq.transport.ws.WSTransportFactory.doBind(WSTransportFactory.java:41)[54:org.apache.activemq.activemq-osgi:5.8.0.SNAPSHOT] at org.apache.activemq.transport.TransportFactorySupport.bind(TransportFactorySupport.java:24)[54:org.apache.activemq.activemq-osgi:5.8.0.SNAPSHOT] at org.apache.activemq.broker.TransportConnector.createTransportServer(TransportConnector.java:307)[54:org.apache.activemq.activemq-osgi:5.8.0.SNAPSHOT] at org.apache.activemq.broker.TransportConnector.getServer(TransportConnector.java:139)[54:org.apache.activemq.activemq-osgi:5.8.0.SNAPSHOT] at org.apache.activemq.broker.TransportConnector.asManagedConnector(TransportConnector.java:106)[54:org.apache.activemq.activemq-osgi:5.8.0.SNAPSHOT] at org.apache.activemq.broker.BrokerService.registerConnectorMBean(BrokerService.java:1965)[54:org.apache.activemq.activemq-osgi:5.8.0.SNAPSHOT] ... 10 more Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.server.HandlerContainer not found by org.apache.activemq.activemq-osgi [54] at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1460)[org.apache.felix.framework-4.0.3.jar:] at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:72)[org.apache.felix.framework-4.0.3.jar:] at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1843)[org.apache.felix.framework-4.0.3.jar:] at java.lang. ClassLoader .loadClass( ClassLoader .java:356)[:1.7.0_07] ... 16 more
        Hide
        Hiram Chirino added a comment -

        When you add the AMQP transport in the activemq.xml like:

        <transportConnector name="amqp" uri="amqp://0.0.0.0:5672?maximumConnections=1000&amp;wireformat.maxFrameSize=104857600"/>
        

        And then you connect to it via AMQP, the following exception is generated:

        Exception in thread "ActiveMQ Transport Server Thread Handler: amqp://0.0.0.0:5672?maximumConnections=1000&wireformat.maxFrameSize=104857600" java.lang.NoClassDefFoundError: org/apache/qpid/proton/jms/JMSVendor
        	at org.apache.activemq.transport.amqp.AmqpTransportFilter.<init>(AmqpTransportFilter.java:52)
        	at org.apache.activemq.transport.amqp.AmqpTransportFactory.compositeConfigure(AmqpTransportFactory.java:44)
        	at org.apache.activemq.transport.TransportFactory.serverConfigure(TransportFactory.java:246)
        	at org.apache.activemq.transport.amqp.AmqpTransportFactory.serverConfigure(AmqpTransportFactory.java:56)
        	at org.apache.activemq.transport.tcp.TcpTransportServer.handleSocket(TcpTransportServer.java:415)
        	at org.apache.activemq.transport.tcp.TcpTransportServer$1.run(TcpTransportServer.java:348)
        	at java.lang.Thread.run(Thread.java:722)
        Caused by: java.lang.ClassNotFoundException: org.apache.qpid.proton.jms.JMSVendor not found by org.apache.activemq.activemq-osgi [54]
        	at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1460)
        	at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:72)
        	at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1843)
        	at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
        
        Show
        Hiram Chirino added a comment - When you add the AMQP transport in the activemq.xml like: <transportConnector name= "amqp" uri= "amqp: //0.0.0.0:5672?maximumConnections=1000&amp;wireformat.maxFrameSize=104857600" /> And then you connect to it via AMQP, the following exception is generated: Exception in thread "ActiveMQ Transport Server Thread Handler: amqp: //0.0.0.0:5672?maximumConnections=1000&wireformat.maxFrameSize=104857600" java.lang.NoClassDefFoundError: org/apache/qpid/proton/jms/JMSVendor at org.apache.activemq.transport.amqp.AmqpTransportFilter.<init>(AmqpTransportFilter.java:52) at org.apache.activemq.transport.amqp.AmqpTransportFactory.compositeConfigure(AmqpTransportFactory.java:44) at org.apache.activemq.transport.TransportFactory.serverConfigure(TransportFactory.java:246) at org.apache.activemq.transport.amqp.AmqpTransportFactory.serverConfigure(AmqpTransportFactory.java:56) at org.apache.activemq.transport.tcp.TcpTransportServer.handleSocket(TcpTransportServer.java:415) at org.apache.activemq.transport.tcp.TcpTransportServer$1.run(TcpTransportServer.java:348) at java.lang. Thread .run( Thread .java:722) Caused by: java.lang.ClassNotFoundException: org.apache.qpid.proton.jms.JMSVendor not found by org.apache.activemq.activemq-osgi [54] at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1460) at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:72) at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1843) at java.lang. ClassLoader .loadClass( ClassLoader .java:356)
        Hide
        Hiram Chirino added a comment -

        Feature installs and works great on Karaf 2.3.0, but on Karaf 3.0.0-SNAPSHOT (aka trunk) the feature fails to install due to spring31 feature being missing.

        Show
        Hiram Chirino added a comment - Feature installs and works great on Karaf 2.3.0, but on Karaf 3.0.0-SNAPSHOT (aka trunk) the feature fails to install due to spring31 feature being missing.
        Hide
        Hiram Chirino added a comment - - edited

        activemq.xml /w a leveldb store configured fails to startup in OSGi. For example:

                <persistenceAdapter>
                  <levelDB directory="${data}/leveldb"/>  
                </persistenceAdapter>
        

        Error message is:

        Caused by: java.lang.ClassNotFoundException: scala.LowPriorityImplicits
        Show
        Hiram Chirino added a comment - - edited activemq.xml /w a leveldb store configured fails to startup in OSGi. For example: <persistenceAdapter> <levelDB directory= "${data}/leveldb" /> </persistenceAdapter> Error message is: Caused by: java.lang.ClassNotFoundException: scala.LowPriorityImplicits
        Hide
        Dejan Bosanac added a comment -

        I finished an initial implementation of the new osgi integration. Now we have a single "uber" jar with all necessary classes and resources (and a corresponding feature). Also, there's a service factory for creating and configuring brokers. The service factory handles "org.apache.activemq.server" pid and expects from it broker name, configuration location and other configuration properties.

        An example can be found at

        https://svn.apache.org/repos/asf/activemq/trunk/activemq-karaf-itest/src/test/resources/org/apache/activemq/karaf/itest/org.apache.activemq.server-default.cfg

        and corresponding activemq.xml

        https://svn.apache.org/repos/asf/activemq/trunk/activemq-karaf-itest/src/test/resources/org/apache/activemq/karaf/itest/activemq.xml

        You can test it agains current trunk by doing

        karaf@root> features:addUrl mvn:org.apache.activemq/activemq-karaf/5.8-SNAPSHOT/xml/features
        karaf@root> features:install activemq-broker 

        and then copying two files from above to the etc folder.

        Things left to be done:

        • cleanup features and commands as many of the old stuff is now obsolete
        • finish integration test
        • make web console configurable via config admin

        Feedback is more then welcomed.

        Show
        Dejan Bosanac added a comment - I finished an initial implementation of the new osgi integration. Now we have a single "uber" jar with all necessary classes and resources (and a corresponding feature). Also, there's a service factory for creating and configuring brokers. The service factory handles "org.apache.activemq.server" pid and expects from it broker name, configuration location and other configuration properties. An example can be found at https://svn.apache.org/repos/asf/activemq/trunk/activemq-karaf-itest/src/test/resources/org/apache/activemq/karaf/itest/org.apache.activemq.server-default.cfg and corresponding activemq.xml https://svn.apache.org/repos/asf/activemq/trunk/activemq-karaf-itest/src/test/resources/org/apache/activemq/karaf/itest/activemq.xml You can test it agains current trunk by doing karaf@root> features:addUrl mvn:org.apache.activemq/activemq-karaf/5.8-SNAPSHOT/xml/features karaf@root> features:install activemq-broker and then copying two files from above to the etc folder. Things left to be done: cleanup features and commands as many of the old stuff is now obsolete finish integration test make web console configurable via config admin Feedback is more then welcomed.

          People

          • Assignee:
            Jean-Baptiste Onofré
            Reporter:
            Dejan Bosanac
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:

              Development