You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have found this error in the Wildfly server logs while deploying my application. Finally, I was able to create a simple test that reproduces this issue. Note that I use Lombok in my project, so it is likely that this is not an issue of Jandex per se, but it might be a problem of Lombok code generation, or some other problem.
To demonstrate, let's assume we have the following class:
where the @TypeAnnotation is just an empty annotation. The test project is avaliable here: jandex-sample-project.zip. A simple test I have created just tries to index this class by Jandex.
When running mvn clean verify, the following exception occurs:
java.lang.IllegalArgumentException: Not a parameterized type!
at org.jboss.jandex.Type.asParameterizedType(Type.java:228)
at org.jboss.jandex.Indexer.resolveTypePath(Indexer.java:767)
at org.jboss.jandex.Indexer.resolveTypeAnnotation(Indexer.java:727)
at org.jboss.jandex.Indexer.resolveTypeAnnotations(Indexer.java:612)
at org.jboss.jandex.Indexer.index(Indexer.java:1604)
at sk.tosix.sample.IndexerTest.test(IndexerTest.java:17)
I have played a bit with this, and it seems that the following causes the error to disappear:
I have let Lombok to delombok the source of this Lombok-annotated class; Jandexing the generated class goes without issues.
Removing the @TypeAnnotation from the userRoles declaration makes the error disappear.
Removing the @AllArgsConstructor annotation and creating the constructor by hand (basically the same as delomboking the class) makes the error disappear.
opening this project in Eclipse and compiling it there (not by javac, but by ecj) makes the error disappear.
It is possible that it is Lombok to blame here, but as I am no expert in bytecode interpretation and as it is Jandex that throws the error, I am asking you guys for help :)
The text was updated successfully, but these errors were encountered:
I have found this error in the Wildfly server logs while deploying my application. Finally, I was able to create a simple test that reproduces this issue. Note that I use Lombok in my project, so it is likely that this is not an issue of Jandex per se, but it might be a problem of Lombok code generation, or some other problem.
To demonstrate, let's assume we have the following class:
where the
@TypeAnnotation
is just an empty annotation. The test project is avaliable here: jandex-sample-project.zip. A simple test I have created just tries to index this class by Jandex.When running
mvn clean verify
, the following exception occurs:I have played a bit with this, and it seems that the following causes the error to disappear:
@TypeAnnotation
from the userRoles declaration makes the error disappear.@AllArgsConstructor
annotation and creating the constructor by hand (basically the same as delomboking the class) makes the error disappear.It is possible that it is Lombok to blame here, but as I am no expert in bytecode interpretation and as it is Jandex that throws the error, I am asking you guys for help :)
The text was updated successfully, but these errors were encountered: