From 2090bef08eebcb64733b64db2f20a692b3647550 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Fri, 2 Jun 2017 13:47:00 +0100 Subject: [PATCH] Configure Glassfish sample to use parent-last class loader delegation Glassfish bundles an old and incomplete version of Glassfish. By default, this leads to some of Jackson's classes being loaded from inside the war file and others being loaded from Glassfish itself. This mixture of versions does not end well and the application fails to deploy. This commit adds a Glassfish-specific deployment descriptor to invert the web app class loader's delegation model. Rather than preferring classes available from its parent, it will now prefer those packaged inside the war file. Closes gh-9391 --- .../src/main/webapp/WEB-INF/glassfish-web.xml | 4 ++++ spring-boot-starters/spring-boot-starter-json/pom.xml | 4 ++++ 2 files changed, 8 insertions(+) create mode 100644 spring-boot-deployment-tests/spring-boot-deployment-test-glassfish/src/main/webapp/WEB-INF/glassfish-web.xml diff --git a/spring-boot-deployment-tests/spring-boot-deployment-test-glassfish/src/main/webapp/WEB-INF/glassfish-web.xml b/spring-boot-deployment-tests/spring-boot-deployment-test-glassfish/src/main/webapp/WEB-INF/glassfish-web.xml new file mode 100644 index 00000000000..ba769821114 --- /dev/null +++ b/spring-boot-deployment-tests/spring-boot-deployment-test-glassfish/src/main/webapp/WEB-INF/glassfish-web.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/spring-boot-starters/spring-boot-starter-json/pom.xml b/spring-boot-starters/spring-boot-starter-json/pom.xml index 99d1d7c51ea..1129d86bf25 100644 --- a/spring-boot-starters/spring-boot-starter-json/pom.xml +++ b/spring-boot-starters/spring-boot-starter-json/pom.xml @@ -22,6 +22,10 @@ com.fasterxml.jackson.core jackson-databind + + com.fasterxml.jackson.datatype + jackson-datatype-jdk8 + com.fasterxml.jackson.datatype jackson-datatype-jsr310