Vertx-Infinispan artifact issue with OpenJDK11 and Vert.x 3.6.3

Solution In Progress - Updated -

Environment

  • Openshift Container Platform (OCP) 3.11
  • OpenJDK 11 container (registry.access.redhat.com/openjdk/openjdk-11-rhel7:1.0)

Issue

  • NoClassDefFound error Could not initialize class org.infinispan.commons.marshall.jboss.ExtendedRiverMarshaller when trying to run a clustered application on OpenShift with vertx-infinispan 3.6.3.redhat-00010.

Resolution

This is a known issue being tracked via https://issues.jboss.org/browse/ENTVTX-236. The NoClassDefFound error occurs when running a clustered application on OpenShift using the vertx-infinispan 3.6.3.redhat-00010 artifact included with Eclipse Vert.x 3.6.3.redhat-00009.

To workaround this issue:
- Update Infinispan to the 9.4.6.Final-redhat-00002 version available in the Red Hat Maven Repository.
- Modify the pom.xml file for an application to exclude the version of Infinispan provided with Eclipse Vert.x 3.6.3.redhat-00009 and include the downloaded version of Infinispan.

The pom.xml file example below shows the exclusion of the vertx-infinispan artifact and the inclusion of the org.infinispan artifact:

  <dependencies>
    ...

    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-infinispan</artifactId>
      <exclusions>
        <exclusion>
          <groupId>org.infinispan</groupId>
          <artifactId>infinispan-*</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>org.infinispan</groupId>
      <artifactId>infinispan-core</artifactId>
      <version>${infinispan.version}</version>
      <exclusions>
        <exclusion>
          <groupId>io.reactivex.rxjava2</groupId>
          <artifactId>rxjava</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.infinispan</groupId>
      <artifactId>infinispan-multimap</artifactId>
      <version>${infinispan.version}</version>
    </dependency>
    <dependency>
      <groupId>org.infinispan</groupId>
      <artifactId>infinispan-clustered-lock</artifactId>
      <version>${infinispan.version}</version>
    </dependency>
    <dependency>
      <groupId>org.infinispan</groupId>
      <artifactId>infinispan-clustered-counter</artifactId>
      <version>${infinispan.version}</version>
    </dependency>

    ...
  </dependencies>

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments