agree, this is a problem. I think we can remove the dependency on geronimo-jta_1.0.1B_spec from activemq-core altogether, need to do a build to validate. in any event, as it is already an optional dependency, there is no good reason to include it in activemq-all. can you raise a jira to track this.
On 26 April 2012 22:36, RJ7bb <rjaam...@parasoft.com> wrote: > The following classes and interfaces are included in activemq-all-5.5.1.jar > despite them being available in the 1.6 JRE (which is now required as a > minimum anyway): > > javax.transaction.xa.XAException > javax.transaction.xa.XAResource > javax.transaction.xa.Xid > > Aside from them being redundant, this has actually caused the following > problem in my eclipse-based application which includes some JBoss jars using > a different class loader and can possibly have other jars with similar > classes/interfaces (JBoss might just be one example): > > java.lang.LinkageError: loader constraint violation in interface itable > initialization: when resolving method > "org.jboss.mq.SpySession.getXAResource()Ljavax/transaction/xa/XAResource;" > the class loader (instance of [name a custom class loader we are using]) > of the current class, org/jboss/mq/SpyQueueSession, > and the class loader (instance of > org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) for interface > javax/jms/XASession have different Class objects for the type > javax/transaction/xa/XAResource used in the signature > > The only way I was able to solve the problem is to remove the > javax.transaction.xa package from the activemq-all-5.5.1.jar. > > Aside from my specific needs, this poses a question whether > activemq-all-*.jar (and any of the other ActiveMQ jars) should include these > packages in the first place. They are redundant at best, and cause class > loading problems at worst. Thanks. > > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/Problems-with-including-javax-transaction-xa-and-possibly-other-JDK-packages-in-activemq-all-5-5-1-jr-tp4591048p4591048.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. -- http://fusesource.com http://blog.garytully.com