Custom AbstractParams "Missing dependency for method"

94 views
Skip to first unread message

Benjamin Black

unread,
Jun 6, 2014, 8:43:59 PM6/6/14
to dropwiz...@googlegroups.com
I'm trying to use custom AbstractParams in 0.7.0 and can't get past this error. Things worked fine when last I tried this in 0.6. Simple code to reproduce the problem at https://github.com/b/dropwizard-test . Something obvious I am doing wrong?

INFO  [2014-06-07 00:42:58,875] io.dropwizard.server.ServerFactory: Starting DropwizardTestApplication
INFO  [2014-06-07 00:42:58,934] org.eclipse.jetty.setuid.SetUIDListener: Opened application@367e4144{HTTP/1.1}{0.0.0.0:9000}
INFO  [2014-06-07 00:42:58,935] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@1aeef34f{HTTP/1.1}{0.0.0.0:9001}
INFO  [2014-06-07 00:42:58,937] org.eclipse.jetty.server.Server: jetty-9.0.7.v20131107
INFO  [2014-06-07 00:42:59,032] com.sun.jersey.server.impl.application.WebApplicationImpl: Initiating Jersey application, version 'Jersey: 1.18.1 02/19/2014 03:28 AM'
INFO  [2014-06-07 00:42:59,094] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources:

    GET     / (us.b3k.test.resources.TestResource)

ERROR [2014-06-07 00:42:59,324] com.sun.jersey.spi.inject.Errors: The following errors and warnings have been detected with resource and/or provider classes:
  SEVERE: Missing dependency for method public javax.ws.rs.core.Response us.b3k.test.resources.TestResource.test(us.b3k.test.core.TestThingParam) at parameter at index 0


Benjamin Black

unread,
Jun 11, 2014, 4:22:59 AM6/11/14
to dropwiz...@googlegroups.com
Answering my own question for posterity: AbstractParam implementations must have a public constructor. The one IntelliJ generates by default for AbstractParam is protected. End result is the error below.

Julián Suárez

unread,
Nov 3, 2020, 2:40:48 PM11/3/20
to dropwizard-user
I lost 3 hours today because of this, until I found your answer. Thank you for answering your own question!
Reply all
Reply to author
Forward
0 new messages