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.

1905 questions
17
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
  • 603
  • 2
  • 8
  • 25
16
votes
1 answer

IllegalStateException within method with Response paramether

I wrote a simple class to test response reading entity method (if it works as I expect). But it didn't worked well. When I launch my class I get following error at response.readEntity(): Exception in thread "main" java.lang.IllegalStateException:…
VanDavv
  • 726
  • 2
  • 10
  • 30
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
  • 720
  • 8
  • 22
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
  • 8,476
  • 22
  • 98
  • 170
16
votes
1 answer

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,146
  • 1
  • 13
  • 36
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
  • 12,097
  • 9
  • 75
  • 150
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
  • 746
  • 1
  • 7
  • 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
  • 45,810
  • 9
  • 33
  • 48
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
  • 2,746
  • 3
  • 26
  • 56
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,373
  • 1
  • 10
  • 26
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,100
  • 11
  • 47
  • 94
13
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
  • 139
  • 1
  • 4
13
votes
2 answers

How do I log SQL Statements in Dropwizard

How do I turn on SQL query logging for a Dropwizard application? I would like it to only log SQL in certain environments.
th3morg
  • 3,782
  • 28
  • 44
13
votes
5 answers

Dropwizard: How to stop service programmatically

To start the service, I know one uses new MyService().run(args). How to stop it? I need to start and stop programmatically for setUp() and tearDown() in my tests.
Neo
  • 2,905
  • 5
  • 22
  • 35
12
votes
5 answers

Using @Transaction in JDBI / Dropwizard application

I hava two jdbi dao like these: public interface dao1 { @Query("insert into table1 ...") findByid(myBean1); } public interface dao2 { @Query("insert into table2 ...) save(myBean2; } } i want to execute save of two dao in one transaction…
LucaA
  • 603
  • 2
  • 7
  • 18