dropwizard: org.glassfish.jersey.internal.Errors Parameter 1 of type FooResource is not resolvable to a concrete type
This is a kotlin project using dropwizard 1.3.0 I have some resources with constructors with abstract parameters.
FooResource(private val repository: Repository<String,ByteArray>){
\\...
}
Where Repository is an Interface
I get a bunch of warnings like:
5:09:40.108 [main] [] WARN org.glassfish.jersey.internal.Errors - The following warnings have been detected: WARNING: Parameter 1 of type com.foo.Repository<? su
per java.lang.String, byte[]> from public com.foo.FooResource(com.foo.Repository<? super java.lang.String, byte[]>) is n
ot resolvable to a concrete type.
But the program works fine. I assume this warning has something to do with the supported DI framework / IoC containers, but I use manual injection and don’t care about this.
Why is this warning being logged? How do I disable this check?
UPDATE: I think this has to do with kotlin adding a wildcard to String
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 24 (6 by maintainers)
I see the same warning as @hheg, in a plain Java project. Here is a minimal test project that uses the same code found in the Authentication chapter of the documentation.
dropwizard-test1.zip
./gradlew installDist./build/install/dw-test/bin/dw-testYou shoud see the warning in the logs.
I’m getting almost the same problem. WARN [22:06:12.763] [main] o.g.j.i.Errors - The following warnings have been detected: WARNING: Parameter authFilterClass of type java.lang.Class<? extends javax.ws.rs.container.ContainerRequestFilter> from private final java.lang.Class<? extends javax.ws.rs.container.ContainerRequestFilter> io.dropwizard.auth.AuthDynamicFeature.authFilterClass is not resolvable to a concrete type. Dropwizard 1.3.0 and Oracle java 9.0.4+12