Juan Hernandez has uploaded a new change for review. Change subject: core: Replace JAXB version provided by JBoss ......................................................................
core: Replace JAXB version provided by JBoss The version of the JAXB implementation provided by the application server is 2.2.4, and it contains a bug that can cause a NPE: https://java.net/jira/browse/JAXB-860 Luckily this bug isn't currently triggered by the engine, but it will be once the following patch is merged: http://gerrit.ovirt.org/30189 To avoid this issue this patch upgrades the version used by the engine and adds a module that replaces the one provided by the application server with a newer version of JAXB that isn't affected by the bug. Change-Id: I3780ed6f54316482eb5e4cb77fd58b3ec2f59847 Signed-off-by: Juan Hernandez <[email protected]> --- M backend/manager/dependencies/pom.xml A backend/manager/dependencies/src/main/modules/com/sun/xml/bind/main/module.xml M backend/manager/modules/restapi/jaxrs/pom.xml M pom.xml 4 files changed, 85 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/13/30713/1 diff --git a/backend/manager/dependencies/pom.xml b/backend/manager/dependencies/pom.xml index 6822c08..6e3bb6b 100644 --- a/backend/manager/dependencies/pom.xml +++ b/backend/manager/dependencies/pom.xml @@ -321,6 +321,32 @@ <version>${batik.version}</version> </dependency> + <!-- This version of the JAXB implementation replaces the default + version 2.2.4 provided by JBoss AS 7.1.1, and is needed to avoid + the following bug: + + https://java.net/jira/browse/JAXB-860 + + It can be removed once we update to WildFly 8, as it uses + version 2.2.5, where the bug is fixed. --> + <dependency> + <groupId>com.sun.xml.bind</groupId> + <artifactId>jaxb-core</artifactId> + <version>${jaxb-impl.version}</version> + </dependency> + + <dependency> + <groupId>com.sun.xml.bind</groupId> + <artifactId>jaxb-impl</artifactId> + <version>${jaxb-impl.version}</version> + </dependency> + + <dependency> + <groupId>com.sun.xml.bind</groupId> + <artifactId>jaxb-xjc</artifactId> + <version>${jaxb-impl.version}</version> + </dependency> + </dependencies> <build> @@ -634,6 +660,24 @@ <moduleName>org.apache.xmlgraphics.batik</moduleName> </module> + <module> + <groupId>com.sun.xml.bind</groupId> + <artifactId>jaxb-core</artifactId> + <moduleName>com.sun.xml.bind</moduleName> + </module> + + <module> + <groupId>com.sun.xml.bind</groupId> + <artifactId>jaxb-impl</artifactId> + <moduleName>com.sun.xml.bind</moduleName> + </module> + + <module> + <groupId>com.sun.xml.bind</groupId> + <artifactId>jaxb-xjc</artifactId> + <moduleName>com.sun.xml.bind</moduleName> + </module> + </modules> </configuration> </plugin> diff --git a/backend/manager/dependencies/src/main/modules/com/sun/xml/bind/main/module.xml b/backend/manager/dependencies/src/main/modules/com/sun/xml/bind/main/module.xml new file mode 100644 index 0000000..372fe06 --- /dev/null +++ b/backend/manager/dependencies/src/main/modules/com/sun/xml/bind/main/module.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- This version of the JAXB implementation replaces the default + version 2.2.4 provided by JBoss AS 7.1.1, and is needed to avoid + the following bug: + + https://java.net/jira/browse/JAXB-860 + + It can be removed once we update to WildFly 8, as it uses + version 2.2.5, where the bug is fixed. --> + +<module xmlns="urn:jboss:module:1.1" name="com.sun.xml.bind"> + + <resources> + <resource-root path="jaxb-core.jar"/> + <resource-root path="jaxb-impl.jar"/> + <resource-root path="jaxb-xjc.jar"/> + </resources> + + <dependencies> + <module name="javax.api" /> + <module name="javax.xml.bind.api" /> + <module name="javax.xml.stream.api" /> + </dependencies> + +</module> diff --git a/backend/manager/modules/restapi/jaxrs/pom.xml b/backend/manager/modules/restapi/jaxrs/pom.xml index 968515d..0003726 100644 --- a/backend/manager/modules/restapi/jaxrs/pom.xml +++ b/backend/manager/modules/restapi/jaxrs/pom.xml @@ -120,6 +120,20 @@ <artifactId>slf4j-api</artifactId> </dependency> + <dependency> + <groupId>com.sun.xml.bind</groupId> + <artifactId>jaxb-core</artifactId> + <version>${jaxb-impl.version}</version> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>com.sun.xml.bind</groupId> + <artifactId>jaxb-impl</artifactId> + <version>${jaxb-impl.version}</version> + <scope>test</scope> + </dependency> + </dependencies> <build> diff --git a/pom.xml b/pom.xml index 3dfb866..588ee55 100644 --- a/pom.xml +++ b/pom.xml @@ -87,7 +87,7 @@ <jackson-mapper-asl.version>1.9.9</jackson-mapper-asl.version> <commons-configuration.version>1.6</commons-configuration.version> <commons-jxpath.version>1.3</commons-jxpath.version> - <jaxb-impl.version>2.2</jaxb-impl.version> + <jaxb-impl.version>2.2.7</jaxb-impl.version> <jbosssx-bare.version>2.0.4</jbosssx-bare.version> <log4j.version>1.2.16</log4j.version> <infinispan.version>5.2.5.Final</infinispan.version> -- To view, visit http://gerrit.ovirt.org/30713 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3780ed6f54316482eb5e4cb77fd58b3ec2f59847 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Juan Hernandez <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
