Description
With recent updates we are now loading some transaction classes from the system bundle and others from the transaction spec bundle. This is causing a linkage error as follows:
java.lang.LinkageError: loader constraint violation: when resolving interface method "javax.transaction.Transaction.enlistResource(Ljavax/transaction/xa/XAResource;)Z" the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) of the current class, org/apache/aries/transaction/jdbc/ConnectionWrapper, and the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) for resolved class, javax/transaction/Transaction, have different Class objects for the type javax/transaction/xa/XAResource used in the signature
at org.apache.aries.transaction.jdbc.ConnectionWrapper.<init>(ConnectionWrapper.java:67)
To avoid the error we need to add org.osgi.framework.system.packages entries that include a mandatory attribute on the transaction packages so that our bundles do not wire to the system bundle which only includes a subset of the necessary classes.