This is an automated email from the ASF dual-hosted git repository.
jbonofre pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/karaf.git
The following commit(s) were added to refs/heads/main by this push:
new 9ba142b KARAF-7152 Fixing Narayana object store start
new 1057da8 Merge pull request #1377 from PiotrKlimczak/KARAF-7152
9ba142b is described below
commit 9ba142b35472f16894f62f2959d8c3b0d18bb7a8
Author: Piotr Klimczak <[email protected]>
AuthorDate: Sat May 15 08:31:27 2021 +0100
KARAF-7152 Fixing Narayana object store start
---
.../base/src/main/filtered-resources/resources/etc/config.properties | 4 ++++
.../org/apache/karaf/instance/resources/etc/config.properties | 3 +++
itests/test/src/test/java/org/apache/karaf/itests/XATest.java | 4 ++++
3 files changed, 11 insertions(+)
diff --git
a/assemblies/features/base/src/main/filtered-resources/resources/etc/config.properties
b/assemblies/features/base/src/main/filtered-resources/resources/etc/config.properties
index 88000a1..f07157e 100644
---
a/assemblies/features/base/src/main/filtered-resources/resources/etc/config.properties
+++
b/assemblies/features/base/src/main/filtered-resources/resources/etc/config.properties
@@ -182,12 +182,16 @@ eecap-1.8= osgi.ee; osgi.ee="OSGi/Minimum";
version:List<Version>="1.0,1.1,1.2",
# boot delegation of javax.transaction.xa is needed to avoid class loader
constraint violation when using javax.sql
# and this package is always complete in all JDKs
#
+# javax.security.cert is needed by pax-transx-tm-narayana as it uses
URLClassLoader and otherwise is unable to create
+# object store.
+#
org.osgi.framework.bootdelegation=\
com.sun.*, \
javax.transaction, \
javax.transaction.xa, \
javax.xml.crypto, \
javax.xml.crypto.*, \
+ javax.security.cert, \
jdk.nashorn.*, \
sun.*, \
jdk.internal.reflect, \
diff --git
a/instance/src/main/resources/org/apache/karaf/instance/resources/etc/config.properties
b/instance/src/main/resources/org/apache/karaf/instance/resources/etc/config.properties
index 63df24d..fa496f7 100644
---
a/instance/src/main/resources/org/apache/karaf/instance/resources/etc/config.properties
+++
b/instance/src/main/resources/org/apache/karaf/instance/resources/etc/config.properties
@@ -183,6 +183,8 @@ eecap-1.8= osgi.ee; osgi.ee="OSGi/Minimum";
version:List<Version>="1.0,1.1,1.2",
# provide only 3 exception classes in this package, so full JTA bundles should
always try first the bootdelegation
# javax.transaction.xa is needed to avoid class loader constraint violation
when using javax.sql and this package
# is always complete in JDK8, earlier and older ones (including JPMS JDKs,
a.k.a. "Jigsaw")
+# javax.security.cert is needed by pax-transx-tm-narayana as it uses
URLClassLoader and otherwise is unable to create
+# object store.
#
org.osgi.framework.bootdelegation = \
com.sun.*, \
@@ -190,6 +192,7 @@ org.osgi.framework.bootdelegation = \
javax.transaction.xa, \
javax.xml.crypto, \
javax.xml.crypto.*, \
+ javax.security.cert, \
jdk.nashorn.*, \
sun.*, \
jdk.internal.reflect, \
diff --git a/itests/test/src/test/java/org/apache/karaf/itests/XATest.java
b/itests/test/src/test/java/org/apache/karaf/itests/XATest.java
index 1ab4ee3..bf9d37c 100644
--- a/itests/test/src/test/java/org/apache/karaf/itests/XATest.java
+++ b/itests/test/src/test/java/org/apache/karaf/itests/XATest.java
@@ -22,6 +22,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.ops4j.pax.exam.Configuration;
+import org.ops4j.pax.exam.CoreOptions;
import org.ops4j.pax.exam.MavenUtils;
import org.ops4j.pax.exam.Option;
import org.ops4j.pax.exam.junit.PaxExam;
@@ -34,6 +35,7 @@ import java.util.EnumSet;
import java.util.LinkedList;
import java.util.List;
+import static org.junit.Assert.assertNotNull;
import static
org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFilePut;
import static
org.ops4j.pax.exam.karaf.options.KarafDistributionOption.replaceConfigurationFile;
@@ -105,7 +107,9 @@ public class XATest extends BaseTest {
featureService.installFeature("camel-sql", NO_AUTO_REFRESH);
featureService.installFeature("camel-jms", NO_AUTO_REFRESH);
+ System.out.println("== Starting Narayana TX Manager == ");
featureService.installFeature("transaction-manager-narayana");
+
assertNotNull(getOsgiService("org.jboss.narayana.osgi.jta.ObjStoreBrowserService",
null, 30000l));
Bundle bundle =
bundleContext.installBundle("blueprint:file:etc/xa-test-camel.xml");
bundle.start();