eclipse-ee4j / eclipse-ee4j/jersey

Jersey should specify what constitutes a "suitable constructor"

Open
#2,390 6 comments 2 reactions 0 assignees View on GitHub
Component: core Priority: Major Type: Improvement
Dominant language
Java
Stars
730
Forks
382
PR merge metrics
No merged PRs in 30d

Description

Jersey throws the following exception:

```
java.lang.NoSuchMethodException: Could not find a suitable constructor in com.mycompany.jersey2guice.JerseyApplication class.
at org.glassfish.jersey.internal.inject.JerseyClassAnalyzer.getConstructor(JerseyClassAnalyzer.java:189)
[...]
```

Expected behavior: explain what constitutes a "suitable constructor" in the exception message so developers know what needs to get fixed. Either link to a more detailed explanation or describe it inline.

Also, it would be useful if you provided more contextual information, such as "Found constructors X, Y, Z. Was looking for A, B or C"
#### Affected Versions
[2.2]

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.