Upgrade to Java 11

In Bloomreach Experience Manager 15.0, the Java version was upgraded from Java 8 to Java 11, and therefore Java 11 is required both in local development environments and in server environments.

Since Java 9 some EE modules that used to be part of the SDK were annotated as deprecated, and they were finally removed in version 11 and are now standalone dependencies. See JEP 320. Now these dependencies need to be manually (or transitively) deployed in the project, for that reason, in existing projects created before Bloomreach Experience Manager 15.0, the following dependencies should be added in the main pom of your project:

  • In the profile cargo.run:
    <profile>
      <id>cargo.run</id>
      [...]
      <dependencies>
        <dependency>
          <groupId>jakarta.xml.bind</groupId>
          <artifactId>jakarta.xml.bind-api</artifactId>
          <scope>compile</scope>
        </dependency>
        <dependency>
          <groupId>jakarta.xml.ws</groupId>
          <artifactId>jakarta.xml.ws-api</artifactId>
          <scope>compile</scope>
        </dependency>
        <dependency>
          <groupId>javax.annotation</groupId>
          <artifactId>javax.annotation-api</artifactId>
          <scope>compile</scope>
        </dependency>
        <dependency>
          <groupId>jakarta.activation</groupId>
          <artifactId>jakarta.activation-api</artifactId>
          <scope>runtime</scope>
        </dependency>
        <dependency>
          <groupId>org.glassfish.jaxb</groupId>
          <artifactId>jaxb-runtime</artifactId>
          <scope>runtime</scope>
        </dependency>
      </dependencies>
    </profile>
  • In the profile dist:
    <profile>
      <id>dist</id>
      <dependencies>
        <dependency>
          <groupId>jakarta.xml.bind</groupId>
          <artifactId>jakarta.xml.bind-api</artifactId>
          <scope>provided</scope>
        </dependency>
        <dependency>
          <groupId>jakarta.xml.ws</groupId>
          <artifactId>jakarta.xml.ws-api</artifactId>
          <scope>provided</scope>
        </dependency>
        <dependency>
          <groupId>javax.annotation</groupId>
          <artifactId>javax.annotation-api</artifactId>
          <scope>provided</scope>
        </dependency>
        <dependency>
          <groupId>jakarta.activation</groupId>
          <artifactId>jakarta.activation-api</artifactId>
          <scope>provided</scope>
        </dependency>
        <dependency>
          <groupId>org.glassfish.jaxb</groupId>
          <artifactId>jaxb-runtime</artifactId>
          <scope>provided</scope>
        </dependency>
        [...]
      </dependencies>
      [...]
    </profile>

If you are using Docker, you must update the JVM garbage collector options for Java 11.

In the file src/main/docker/scripts/tomcat/setenv.sh, find the comment "# JVM garbage Collector options" and update the line below it that starts with VGC_OPTS= with the following:

# JVM garbage Collector options
VGC_OPTS="-Xlog:gc+ergo*:file=${CATALINA_BASE}/logs/gc.log:time:filecount=5,filesize=2048k"
Did you find this page helpful?
How could this documentation serve you better?
On this page
    Did you find this page helpful?
    How could this documentation serve you better?

    We rely on cookies

    to optimize our communication and to enhance your customer experience. By clicking on the Accept and Close button, you agree to the collection of cookies. You can also adjust your preferences by clicking on Manage Preferences. For more information please see our Privacy policy.

    Manage cookies
    Accept & close

    Cookies preferences

    Accept & close
    Back