I haven't tried this.... but I think it should work. It should be a
lot easier in g. 3.0.
I think you need to build another geronimo plugin that has the jars
you need for xmpp transport as dependencies and a gbean that sets up
the transport. Make sure the broker plugin is also a parent.
If the xmpp activemq classes are in a separate jar we aren't using in
2.2, this is most of what you;ll need. If they are included in the
broker, and just the underlying xmpp support jars are missing, then
you'll have to play around with more fine-grained classloader
configuration in the new plugin and use hidden-classes to make the amq
xmpp classes load from the new plugin.
Alternatively, and probably easier, you can copy our amq broker plugin
and add the necessary dependencies for xmpp and rebuild it.
This is kind of sketchy, let us know if you need more instructions.
thanks
david jencks
On Feb 17, 2010, at 9:03 PM, Maan Najjar wrote:
Hello,
I've been trying to set XMPP transport connector for ActiveMQ in
Geronimo. What I did is modify var/activemq/conf/activemq.xml and
uncomment this line
<transportConnector name="xmpp" uri="xmpp://${ServerHostname}:
${61222 + ${PortOffset}}"/>
However, I'm getting the following exception when geronimo tries to
load activemq-broker module
Module 63/74 org.apache.geronimo.configs/activemq-broker/2.2/car
2010-02-17 23:59:27,595 ERROR [BrokerService] Failed to start
ActiveMQ JMS Message Broker. Reason: java.io.IOException: Transport
Connector could not be registered in JMX: Transport scheme NOT
recognized: [xmpp]
java.io.IOException: Transport Connector could not be registered in
JMX: Transport scheme NOT recognized: [xmpp]
at
org
.apache
.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:27)
at
org
.apache
.activemq
.broker.BrokerService.registerConnectorMBean(BrokerService.java:1546)
at
org
.apache
.activemq
.broker.BrokerService.startTransportConnector(BrokerService.java:1958)
at
org
.apache
.activemq.broker.BrokerService.startAllConnectors(BrokerService.java:
1911)
at
org.apache.activemq.broker.BrokerService.start(BrokerService.java:471)
at
org
.apache
.geronimo
.activemq.BrokerServiceGBeanImpl.<init>(BrokerServiceGBeanImpl.java:
104)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun
.reflect
.NativeConstructorAccessorImpl
.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun
.reflect
.DelegatingConstructorAccessorImpl
.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.apache.xbean.recipe.ReflectionUtil
$ConstructorFactory.create(ReflectionUtil.java:952)
at
org
.apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java:
276)
at
org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:96)
at
org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:61)
at
org
.apache
.geronimo
.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:911)
at
org
.apache
.geronimo
.gbean
.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:
269)
at
org
.apache
.geronimo
.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:103)
at
org
.apache
.geronimo
.gbean
.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:
125)
at
org
.apache
.geronimo
.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:539)
at
org
.apache
.geronimo
.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:377)
at
org
.apache
.geronimo
.kernel
.config
.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:
456)
at
org
.apache
.geronimo
.kernel
.config
.KernelConfigurationManager.start(KernelConfigurationManager.java:190)
at
org
.apache
.geronimo
.kernel
.config
.SimpleConfigurationManager
.startConfiguration(SimpleConfigurationManager.java:546)
at sun.reflect.GeneratedMethodAccessor22.invoke(Unknown Source)
at
sun
.reflect
.DelegatingMethodAccessorImpl
.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org
.apache
.geronimo
.gbean
.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:
34)
at
org
.apache
.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:130)
at
org
.apache
.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:816)
at
org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:
57)
at
org
.apache
.geronimo
.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
at
org
.apache
.geronimo
.kernel
.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:
96)
at org.apache.geronimo.gbean.GBeanLifecycle$$EnhancerByCGLIB$
$13c953f6.startConfiguration(<generated>)
at
org
.apache
.geronimo.system.main.EmbeddedDaemon.doStartup(EmbeddedDaemon.java:
161)
at
org
.apache
.geronimo.system.main.EmbeddedDaemon.execute(EmbeddedDaemon.java:78)
at
org
.apache
.geronimo
.kernel
.util
.MainConfigurationBootstrapper
.main(MainConfigurationBootstrapper.java:45)
at
org.apache.geronimo.cli.AbstractCLI.executeMain(AbstractCLI.java:65)
at org.apache.geronimo.cli.daemon.DaemonCLI.main(DaemonCLI.java:
30)
Caused by: java.io.IOException: Transport scheme NOT recognized:
[xmpp]
at
org
.apache
.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:27)
at
org
.apache
.activemq
.transport
.TransportFactory.findTransportFactory(TransportFactory.java:204)
at
org
.apache
.activemq.transport.TransportFactory.bind(TransportFactory.java:123)
at
org
.apache
.activemq
.broker
.TransportConnector.createTransportServer(TransportConnector.java:304)
at
org
.apache
.activemq
.broker.TransportConnector.getServer(TransportConnector.java:133)
at
org
.apache
.activemq
.broker
.TransportConnector.asManagedConnector(TransportConnector.java:96)
at
org
.apache
.activemq
.broker.BrokerService.registerConnectorMBean(BrokerService.java:1541)
... 36 more
Caused by: java.io.IOException: Could not find factory class for
resource: META-INF/services/org/apache/activemq/transport/xmpp
at
org
.apache
.activemq
.util.FactoryFinder.doFindFactoryProperies(FactoryFinder.java:92)
at
org
.apache.activemq.util.FactoryFinder.newInstance(FactoryFinder.java:52)
at
org
.apache.activemq.util.FactoryFinder.newInstance(FactoryFinder.java:42)
at
org
.apache
.activemq
.transport
.TransportFactory.findTransportFactory(TransportFactory.java:201)
... 41 more
2010-02-17 23:59:29,626 ERROR [GBeanInstanceState] Error while
starting; GBean is now in the FAILED state:
abstractName="org.apache.geronimo.configs/activemq-broker/2.2/car?
ServiceModule=org.apache.geronimo.configs/activemq-broker/2.2/
car,j2eeType=JMSServer,name=DefaultActiveMQBroker"
java.io.IOException: Transport Connector could not be registered in
JMX: Transport scheme NOT recognized: [xmpp]
at
org
.apache
.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:27)
at
org
.apache
.activemq
.broker.BrokerService.registerConnectorMBean(BrokerService.java:1546)
at
org
.apache
.activemq
.broker.BrokerService.startTransportConnector(BrokerService.java:1958)
at
org
.apache
.activemq.broker.BrokerService.startAllConnectors(BrokerService.java:
1911)
at
org.apache.activemq.broker.BrokerService.start(BrokerService.java:471)
at
org
.apache
.geronimo
.activemq.BrokerServiceGBeanImpl.<init>(BrokerServiceGBeanImpl.java:
104)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun
.reflect
.NativeConstructorAccessorImpl
.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun
.reflect
.DelegatingConstructorAccessorImpl
.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.apache.xbean.recipe.ReflectionUtil
$ConstructorFactory.create(ReflectionUtil.java:952)
at
org
.apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java:
276)
at
org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:96)
at
org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:61)
at
org
.apache
.geronimo
.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:911)
at
org
.apache
.geronimo
.gbean
.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:
269)
at
org
.apache
.geronimo
.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:103)
at
org
.apache
.geronimo
.gbean
.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:
125)
at
org
.apache
.geronimo
.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:539)
at
org
.apache
.geronimo
.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:377)
at
org
.apache
.geronimo
.kernel
.config
.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:
456)
at
org
.apache
.geronimo
.kernel
.config
.KernelConfigurationManager.start(KernelConfigurationManager.java:190)
at
org
.apache
.geronimo
.kernel
.config
.SimpleConfigurationManager
.startConfiguration(SimpleConfigurationManager.java:546)
at sun.reflect.GeneratedMethodAccessor22.invoke(Unknown Source)
at
sun
.reflect
.DelegatingMethodAccessorImpl
.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org
.apache
.geronimo
.gbean
.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:
34)
at
org
.apache
.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:130)
at
org
.apache
.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:816)
at
org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:
57)
at
org
.apache
.geronimo
.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
at
org
.apache
.geronimo
.kernel
.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:
96)
at org.apache.geronimo.gbean.GBeanLifecycle$$EnhancerByCGLIB$
$13c953f6.startConfiguration(<generated>)
at
org
.apache
.geronimo.system.main.EmbeddedDaemon.doStartup(EmbeddedDaemon.java:
161)
at
org
.apache
.geronimo.system.main.EmbeddedDaemon.execute(EmbeddedDaemon.java:78)
at
org
.apache
.geronimo
.kernel
.util
.MainConfigurationBootstrapper
.main(MainConfigurationBootstrapper.java:45)
at
org.apache.geronimo.cli.AbstractCLI.executeMain(AbstractCLI.java:65)
at org.apache.geronimo.cli.daemon.DaemonCLI.main(DaemonCLI.java:
30)
Caused by: java.io.IOException: Transport scheme NOT recognized:
[xmpp]
at
org
.apache
.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:27)
at
org
.apache
.activemq
.transport
.TransportFactory.findTransportFactory(TransportFactory.java:204)
at
org
.apache
.activemq.transport.TransportFactory.bind(TransportFactory.java:123)
at
org
.apache
.activemq
.broker
.TransportConnector.createTransportServer(TransportConnector.java:304)
at
org
.apache
.activemq
.broker.TransportConnector.getServer(TransportConnector.java:133)
at
org
.apache
.activemq
.broker
.TransportConnector.asManagedConnector(TransportConnector.java:96)
at
org
.apache
.activemq
.broker.BrokerService.registerConnectorMBean(BrokerService.java:1541)
... 36 more
Caused by: java.io.IOException: Could not find factory class for
resource: META-INF/services/org/apache/activemq/transport/xmpp
at
org
.apache
.activemq
.util.FactoryFinder.doFindFactoryProperies(FactoryFinder.java:92)
at
org
.apache.activemq.util.FactoryFinder.newInstance(FactoryFinder.java:52)
at
org
.apache.activemq.util.FactoryFinder.newInstance(FactoryFinder.java:42)
at
org
.apache
.activemq
.transport
.TransportFactory.findTransportFactory(TransportFactory.java:201)
... 41 more
Server Startup failed
Apparently ActiveMQ-XMPP was not included in Geroinmo (it's in
optional libraries in activemq), Stomp transport-connector worked
however. It's really frustrating, I really need XMPP. I would
appreciate someone help, I'm using Geronimo 2.2
Thanks