Questions tagged [dropwizard]

Dropwizard is a Java framework for developing ops-friendly, high-performance, RESTful web services.

Dropwizard is a Java framework for developing ops-friendly, high-performance, RESTful web services.

Developed by Yammer to power their JVM-based backend services, Dropwizard pulls together stable, mature libraries from the Java ecosystem into a simple, light-weight package that lets you focus on getting things done.

Dropwizard has out-of-the-box support for sophisticated configuration, application metrics, logging, operational tools, and much more, allowing you and your team to ship a production-quality HTTP+JSON web service in the shortest time possible.

Integration with many well-established libraries, frameworks and technologies is provided with additional official modules and community supported modules.

2009 questions
18
votes
3 answers

Can I have multiple configuration files in DropWizard?

I want to have several yaml files for DropWizard. One of them contain sensitive info and one non sensitive. Can you point me to any docs or example how to have multiple configurations in DropWizard?
Victor Ronin
  • 22,758
  • 18
  • 92
  • 184
18
votes
2 answers

Dropwizard - organizing your project, understanding terminology, etc

I am learning to use Dropwizard. I was able to follow the quickstart guide and run basic REST APIs. In this documentation, there is a section called "Organizing your project". It recommends to organize your project in following parts: project-api,…
Sun
  • 559
  • 2
  • 9
  • 30
16
votes
1 answer

Difference between Codahale metrics and Dropwizard metrics

I'm new to Java. While exploring the ways of monitoring Cassandra, I found out(https://cassandra.apache.org/doc/latest/operating/metrics.html) that "Metrics in Cassandra are managed using the Dropwizard Metrics library". However, at several places…
Vishal Sharma
  • 1,670
  • 20
  • 55
16
votes
1 answer

Difference between Application and Service in Dropwizard

I'm new to Dropwizard. In the newest documentation, it refers to "Service" as the main entry point of any application. But in the example code, it actually uses "Application". I'm assuming that "Application" is a new name for "Service", since I…
etang
  • 730
  • 8
  • 23
16
votes
2 answers

How to do Basic Authentication of a resource in Dropwizard

I believe I have basic authentication working but I'm not sure how to protect resources so that they can only be accessed when the user is signed in. public class SimpleAuthenticator implements Authenticator { UserDAO…
birdy
  • 9,286
  • 24
  • 107
  • 171
16
votes
2 answers

How can I create triggers for a postgreSQL db using liquibase?

I'm using the dropwizard-migrations module for liquibase db refactoring. See the guide here: http://dropwizard.codahale.com/manual/migrations/ When I run java -jar my_project.jar db migrate my_project.yml I get the following error: ERROR…
Ann Kilzer
  • 1,266
  • 3
  • 16
  • 39
16
votes
7 answers

Looking for a dropwizard example

Looking for a dropwizard example I found: https://github.com/codahale/dropwizard/tree/master/dropwizard-example But I am interested in a more complete example with at least: a 1:n relationship like customer - account a html gui represenation at…
Wolfgang Fahl
  • 15,016
  • 11
  • 93
  • 186
15
votes
3 answers

Dropwizard: java.lang.IllegalStateException: Unable to acquire the logger context

I have a project which is having multiple modules within it. One of the module, say "main", is having my service class, "MyService.class". Dropwizard has a jar - dropwizard-core. I want this jar in more than one module, so I was thinking of keeping…
Akshi Garg
  • 159
  • 1
  • 4
15
votes
2 answers

Using Transaction with JDBI / IDBI / Dropwizard -- rollback problems

I'm having a lot of trouble getting transactions to work with IDBI. We're using the dropwizard framework and simple inserts, updates, selects, and deletes have worked find but now we cannot seem to get the transactions to work correctly. Here is…
jcity
  • 826
  • 1
  • 9
  • 13
15
votes
6 answers

Can DropWizard serve assets from outside the jar file?

In looking at the documentation, it appears that DropWizard is only able to serve static content living in src/main/resources. I'd like to keep my static files in a separate directory outside the jar file. Is that possible? Or do most people use…
zslayton
  • 51,416
  • 9
  • 35
  • 50
14
votes
4 answers

Liquibase create Schema for postgres

I'm using Dropwizard (1.0.0) and Liquibase to create a database if it's not existing. Problem here is that I'm using a different Postgres schema (not public). It seems like Liquibase is not able to create this schema before is it? I was expecting…
Christian
  • 6,961
  • 10
  • 54
  • 82
14
votes
4 answers

How to deploy an angularjs application frontend with Nginx and dropwizard

I'm developing an application using angularjs application frontend having as backend dropwizard. I'm planning to use Nginx as gateway for the backend dropwizard server and as an asset server (images and maybe the angularjs application). My question…
Master Mind
  • 3,014
  • 4
  • 32
  • 63
14
votes
2 answers

Dropwizard ScheduledExecutorService

In my case I need to run some scheduled tasks (e.g. every minute) doing some checks in DB and if needed some subtasks. This should be no DB health-check! DW documentation says: "It should be noted that Environment has built-in factory methods for …
user3280180
  • 1,393
  • 1
  • 11
  • 27
14
votes
1 answer

Unsupported media type for REST POST

I have this VO public class myVO { private final String latitude; private final String longtitude; private final String meterRadius; public myVO(String latitude, String longtitude, String meterRadius) { this.latitude =…
StephenNYC
  • 1,234
  • 3
  • 12
  • 29
13
votes
2 answers

Dropwizard Metric Annotations @Timed not working

I'm trying to automatically publish metrics to my MetricRegistry using annotations like @Timed (http://metrics.dropwizard.io/3.1.0/apidocs/com/codahale/metrics/annotation/package-summary.html). This doesn't work out of the box. On searching for…
user2158382
  • 4,430
  • 12
  • 55
  • 97