This is a packaging problem.
Most likely, you have javax/transaction classes in two
places and the linker is getting confused between
the two versions of the classes.
Thanks a lot Adrian. You were right. The class javax.transaction.UserTransaction was also in the sonic_XA.jar. I removed sonic jars from the lib directory and moved elsewhere with references in the classpath. That did it. Thanks a lot again.