I'm working on upgrading ServiceMix to Karaf right now. The work is done in a ServiceMix sandbox [1].
The issue you hit is a known issue (at least from me). The very reason is that OSGi has this concept of package which can not be easily split. If you look at the javax.transaction package in the JVM, you'll see it only includes a few classes, not the full JTA spec as specified by JEE. This means that if the system bundle exports this package, everything will be wired to that one instead of the one from the geronimo jta spec. There are multiple solutions to this problem, but the easiest one is to make sure that the system bundle does not export those packages. That's what i've done at [2] where you can see that the javax.transaction packages are commented, thus not exported. Hopes this help! [1] https://svn.apache.org/repos/asf/servicemix/sandbox/karaf/ [2] https://svn.apache.org/repos/asf/servicemix/sandbox/karaf/nmr/assembly/src/main/filtered-resources/etc/config.properties On Fri, Sep 4, 2009 at 15:17, J Aaron Farr <fa...@apache.org> wrote: > > I just got ActiveMQ running on Karaf (lastest svn). It was not very > easy, so I'm sharing what I did and I'm looking for suggestions. > > After checking out and building karaf from scratch, I started with these > instructions: > > http://activemq.apache.org/osgi-integration.html > > Of course, they're old and don't help much. But it did point me to the > service document [1] that let me download most of the bundles by hand: > > osgi:install mvn:org.apache.activemq/activemq-core/5.2.0 > osgi:install mvn:org.apache.activemq/activemq-ra/5.2.0 > ... > > I did this for all the bundles in the `activemq` and `connector` > features expect for `org.apache.servicemix.activemq.commands`. > > It was the 'transactions' feature that got me stuck. I installed the > 'felix-transaction' [2] plugin and most of the Spring Framework osgi > bundles [3] by hand. But the place I kept getting stuck was with starting > the felix-transaction bundle. I kept getting: > > java.lang.ClassNotFoundException: javax.transaction.TransactionManager > > The problem was the same as described in [4] and [5], namely, I had > these packages in my system that were overriding the geronimo jta bundle > I had: > > System Bundle (0): javax.transaction; version=1.5.0 > System Bundle (0): javax.transaction.xa; version=1.5.0 > > After hours of wrestling with this, I cracked open the felix framework > jar, deleted all references to `javax.transaction` and then put it back > together again. > > Once this was done, I could take a simple activemq configuration file > and drop it in `deploy/localhost-broker.xml` and everything worked. > > Surely there must be a better way... > > I'm not sure if this info is useful on the felix list, or the activemq > list or the servicemix list or even the geronimo list, so feel free to > forward (me or the message) as necessary. > > -- > J. Aaron Farr > 馮傑仁 > www.cubiclemuses.com > > [1] > http://repo2.maven.org/maven2/org/apache/servicemix/apache-servicemix/4.0.0/apache-servicemix-4.0.0-features.xml > [2] > https://svn.apache.org/repos/asf/felix/trunk/transaction/org.apache.felix.transaction/ > [3] http://www.springsource.org/osgi > [4] http://www.mail-archive.com/d...@geronimo.apache.org/msg70777.html > [5] > http://mail-archives.apache.org/mod_mbox/felix-users/200902.mbox/%3c499ed895.20...@ungoverned.org%3e > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@felix.apache.org > For additional commands, e-mail: users-h...@felix.apache.org > > -- Cheers, Guillaume Nodet ------------------------ Blog: http://gnodet.blogspot.com/ ------------------------ Open Source SOA http://fusesource.com