wso2activemq-classicwso2-as

How to get WSO2 Application Server to use Activemq


I have wasted 2 days on this and now given up after trashing a working WSO system to go back to basics, just WSO2 AS + Activemq.

I just cannot get the jms transport to work.

I keep getting this error

TID: [0] [AS] [2015-06-01 13:20:12,179] ERROR {org.apache.axis2.engine.ListenerManager} - Couldn't initialize the jmstransport listener {org.apache.axis2.engine.ListenerManager} {org.apache.axis2.transport.base.BaseTransportException: JNDI lookup of name TopicConnectionFactory returned a org.apache.activemq.ActiveMQConnectionFactory while a interface javax.jms.ConnectionFactory was expected}

I have tried the installation instructions that came with WSO2 AS and the banking sample that comes with the AS.

I have googled far too many solutions that have included not putting the geronimo libraries in the AS lib directory all the way to unpacking the activemq-all jar to remove the jms class from it and repackage but still the same problem.

The last thing I read from the banking sample was that this error is caused by having multiple copies of the geronimo class in my classpath but I have scoured the path and that is not true, unless it is embedded in other class packages.

The previous versions of AS and activemq I worked with last year worked out of the box, but this is just impossible.

Can anyone tell me how to get WSO2 products to work with activemq before I ditch the whole architecture and go with something else that does work out of the box?


Solution

  • Finally found the problem after multiple re-installs.

    Turns out the original problem is caused by the acvtivemq-all jar, which can be resolved by repackaging without the jms package, as I previously did.

    However, after a final desparate scrape across the fs, I noticed the original activemq-all jar had been copied from the wso2as/repository/components/lib directory in to the wso2as/repository/components/dropin directory and so was still in the classpath. I hate systems that do this :)

    After removing that jar from the dropin directory, the server booted without the error.