Skip to content
Advertisement

Tag: dropwizard

java.lang.NullPointerException at io.dropwizard.testing.junit5.DropwizardExtensionsSupport.beforeEach

I am trying to test a Dropwizard resource. My test looks like this: However, this gives the error message: which is frankly uninformative. Can someone point out what is wrong here? P/S Here is the CommonObjects constructor: which also explains why I am creating the resource extension before each test case. Answer In the end, instead of using mocks, I

Use a list of strings in IN clause with JDBI

I’m using JDBI / Dropwizard for a project and would like to run some simple queries. I have a query like so: private static final String GET_STUFF = “SELECT * FROM myTable WHERE state IN (:desiredState)” I bind the variable in my method like so: However, I get the following error when running: I’m passing in states as an ArrayList

Advertisement