Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fault Tolerance 2.1: org.eclipse.microprofile.faulttolerance cannot be resolved #12567

Closed
Azquelt opened this issue Jun 10, 2020 · 0 comments · Fixed by #12620
Closed

Fault Tolerance 2.1: org.eclipse.microprofile.faulttolerance cannot be resolved #12567

Azquelt opened this issue Jun 10, 2020 · 0 comments · Fixed by #12620
Labels
bug This bug is not present in a released version of Open Liberty release bug This bug is present in a released version of Open Liberty release:20007

Comments

@Azquelt
Copy link
Member

Azquelt commented Jun 10, 2020

Describe the bug

The bug seems to be caused by the Fault Tolerance 2.1 API feature not having a dependency on the Fault Tolerance 2.1 API jar

The corresponding 2.0 API feature does have this dependency (as do all the other openliberty feature in maven central I looked at)

Steps to Reproduce

  1. Add the following in the server.xml:
<feature>mpFaultTolerance-2.1</feature>

(or <feature>microProfile-3.3</feature>)

  1. Add the following in the pom.xml:
<dependency>
    <groupId>io.openliberty.features</groupId>
    <artifactId>mpFaultTolerance-2.1</artifactId>
    <type>esa</type>
    <scope>provided</scope>
</dependency>

(or <artifactId>microProfile-3.3</artifactId>)

  1. import a FT feature, i.e.
import org.eclipse.microprofile.faulttolerance.Retry;

The microprofile-fault-tolerance-api-2.1.1.jar does not built, and hence the following error message will appear: The import org.eclipse.microprofile.faulttolerance cannot be resolved

Expected behavior
Adding <feature>mpFaultTolerance-2.1</feature> should import the dependency, and the FT features should be resolved

Diagnostic information:

  • OpenLiberty Version:
Open Liberty 20.0.0.6/wlp-1.0.41.cl200620200528-0414) on Eclipse OpenJ9 VM, version 13.0.2+8 (en_GB)
  • Java Version:
openjdk 13.0.2 2020-01-14
OpenJDK Runtime Environment AdoptOpenJDK (build 13.0.2+8)
Eclipse OpenJ9 VM AdoptOpenJDK (build openj9-0.18.0, JRE 13 Mac OS X amd64-64-Bit 20200118_155 (JIT enabled, AOT enabled)
OpenJ9   - 6968c18d7
OMR      - 7a1b0239a
JCL      - 9c5a41bd5f based on jdk-13.0.2+8)
  • server.xml configuration:
  <featureManager>
    <feature>jpa-2.2</feature>
    <feature>jdbc-4.2</feature>
    <feature>jndi-1.0</feature>
	<feature>microProfile-3.3</feature>
  </featureManager>

Additional context
The error seems to be caused by the feature not being correctly linked to the fault tolerance api in maven central.

Adding the following dependency resolves the issue:

<dependency>
    <groupId>org.eclipse.microprofile.fault-tolerance</groupId>
    <artifactId>microprofile-fault-tolerance-api</artifactId>
    <version>2.1.1</version>
    <scope>provided</scope>
</dependency>
@Azquelt Azquelt added the bug This bug is not present in a released version of Open Liberty label Jun 10, 2020
@Azquelt Azquelt added this to Other in MicroProfile UK (Old) via automation Jun 10, 2020
@Azquelt Azquelt moved this from Other to Fault Tolerance in MicroProfile UK (Old) Jun 10, 2020
@Azquelt Azquelt added the release bug This bug is present in a released version of Open Liberty label Jun 10, 2020
@Joseph-Cass Joseph-Cass changed the title Fault Tolerance 2.1 API feature missing dependency on API artifact in maven Fault Tolerance 2.1: org.eclipse.microprofile.faulttolerance cannot be resolved Jun 10, 2020
MicroProfile UK (Old) automation moved this from Fault Tolerance to Done Jun 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This bug is not present in a released version of Open Liberty release bug This bug is present in a released version of Open Liberty release:20007
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants