-
|
In one of our projects, I get the following error using the SmallRye Maven plugin: It's kind of hard to see where the problem is if no class is shown in the error. Can anyone tell me what the problem is and how I could find the class in question? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
|
@cristalp this happens when the annotation scanner is attempting to resolve a generic type argument, but finds itself in a place where the inherited type is un-parameterized. This is most likely a bug in the scanner. You can guess what my next question is - can you provide a small reproducer? 😄 |
Beta Was this translation helpful? Give feedback.
-
|
Ok, so I could boil it down to this: @Path("foo")
public class MyResource {
@GET
@Path("bar")
public Tuple2<Integer, String> deliverByIndex() {
return null;
}
}Note that this is a |
Beta Was this translation helpful? Give feedback.
-
|
Thanks a lot for the annotation, that solved the problem. |
Beta Was this translation helpful? Give feedback.
There are a few things going on. First, it looks like
jool-java-8may not be included in the Jandex index used by the scanner. Second, even if it were included, the resulting schema would be an array ofObject(since the baseTupleis anIterable<Object>), so I don't think you would want the default generated schema.You should be able to get a good schema by adding something like the following to the REST method. This example results in a string array, so adjust as needed for your case. You'll need to make sure the method has a JAX-RS
@Produces, otherwise the response type won't be found as expected.I'll add a to-do to imp…