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

Unable to create Problem using the ProblemBuilder #357

Open
tinolazreg opened this issue Jan 10, 2022 · 0 comments
Open

Unable to create Problem using the ProblemBuilder #357

tinolazreg opened this issue Jan 10, 2022 · 0 comments
Labels

Comments

@tinolazreg
Copy link
Contributor

Description

We are using this library with Java 9 modules. When attempting to create a Problem using the ProblemBuilder we encounter an exception.
Example:

var outOfStockProblem = Problem.builder()
        .withType(URI.create("https://example.org/out-of-stock"))
        .withTitle("Out of Stock")
        .withStatus(Status.BAD_REQUEST)
        .withDetail("Item B00027Y5QG is no longer available")
        .build();

Throws an exception:

java.util.ServiceConfigurationError: org.zalando.problem.spi.StackTraceProcessor: module org.zalando.problem does not declare `uses`

Expected Behavior

A problem should be created.

Actual Behavior

Exception is thrown.

Possible Fix

Based on the StackTrace, it seems like uses org.zalando.problem.spi.StackTraceProcessor; is missing from org.zalando.problem's module-info.

Steps to Reproduce

Context

Your Environment

  • Version used: 0.27.1
  • Link to your project:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant