Questions tagged [dropwizard]
Dropwizard is a Java framework for developing ops-friendly, high-performance, RESTful web services.
2,011
questions
0
votes
1
answer
17
views
Morphia datastore.find() query yields 0 results but it works fine with aggregate
I am making code changes to upgrade to MongoDB 5 for a java dropwizard application.
Upgraded versions
mongodb-driver-sync : 4.10.2
morphia-core: 2.3.8
For test case setup I have used this code :
...
0
votes
0
answers
6
views
Special Expression Support in Annotation In Dropwizard
I have an application developed Using Dropwizard framework.I have created an custom Annotation lets say "RateLimited" which has 2 argument lets say "limit" and "ttl" . ...
0
votes
1
answer
23
views
Adding custom header in dropwizard access logs
How can we customise dropwizard's default access log format. I want to include a header that comes in request to my access log file.
0
votes
0
answers
16
views
Handle batching of requests inside an endpoint method
I have a use case to collect requests from clients , batch them and then the combined request is to be sent for processing, with the result of processing to be having sent back to each of the clients....
0
votes
1
answer
14
views
stop liqibasew from logging migration results in prod
Stack:
Java 21
dropwizard
slf4j
How do I stop liquibase logging out of the migration (nothing changed)?
I use dropwizard YAML for the config
so far tried:
set the logger : off (in the yaml)
magic env ...
0
votes
0
answers
14
views
Dropwizard Migrations DB Dump permission denied
I'm trying to add dropwizard-migrations to an existing project. It is already using dropwizard-hibernate for the database. I attempted a "db dump" as suggested by the documentation, and got ...
0
votes
1
answer
49
views
How can I better monitor my Dropwizard threads/request queue via a Metric registry?
So I have this dropwizard application with all of the standard config yaml stuff like:
server:
maxQueuedRequests: 256
maxThreads: 256
I'd like to instrument this thread info. I.e. I'd like to ...
0
votes
0
answers
25
views
Prometheus Absent Metric on Labels
I have an application that consumes messages from a kafka topic. The liveliness of the consuming loop is check by a Yammer guage called llcPartitionConsuming which is set to 1 whenever the consumption ...
1
vote
0
answers
106
views
Jackson blackbird module 2.15.2 always throws error at runtime for Java 17 and dropwizard
I am running jackson blackbird module in my project with java 17 and recently updated dropwizard from 2.0.x to 4.0.1
I also added this in my gradle run step
doFirst {
// Add the --add-opens ...
0
votes
0
answers
17
views
How to obtain query arg from Dropwizard's /healthcheck HTTP call?
Dropwizard's doc shows how a service can define a healthcheck that can be called with :
https://<hostname>:<port>/health-check?type=<type>&name=<name>
But I can not find in ...
0
votes
0
answers
23
views
Tried to use DataSourceFactory for setting up datebase in the configuration but import io.dropwizard.db not working which has DataSourceFactory class
I tried using DataSourceFactory class for setting up my database in my dropwizard application.But i am not able to import io.dropwizard.db.DatasourceFactory because .db is not installed as dependency....
1
vote
0
answers
58
views
Can't find Javax class in latest Jersey/Dropwizard version in Maven project
As I understand it, Jakarta replaced the Javax namespace a bit ago, and Jersey did the necessary work to support this change as of v3.0. I've got a legacy project that I've been trying to drag from ...
0
votes
0
answers
148
views
Jackson Databind from 2.10.2 to 2.13.5 , Replace deprecated method Issue
I am upgrading Jackson Databind in my project from 2.10.2 to 2.13.5 in Groovy project.
Due to upgradation there is a problem in deserialisation.
It's found that deprecation of method getGenericType() ...
0
votes
0
answers
42
views
Receiving "Unable to create injector [Guice/MissingImplementation]: No implementation for Producer<String, String> was bound."
Im trying to bind a producer in a java aplication on the following code on my appModule:
protected void configure() {
try {
Environment environment = environment();
...
0
votes
0
answers
25
views
How can I override GET/ok ELB-HealthChecker/2.0 in dropwizard?
I have a use case where I want to override the default behavior of ELB healthchecker. It currently succeeds in all scenarios but I want to check if the DB has no available connections or an external ...
0
votes
0
answers
42
views
Dropwizard Jersey Configuration to group resources to specific rootPaths
I'm working on a project with many existing API endpoints define across many resource classes. Currently we have a urlPattern defined as /api/* but want to add another set of resources for internal ...
0
votes
0
answers
48
views
How do I do proper Structured Logging in Dropwizard
I have a Dropwizard service and I am migrating it to use structured logging. I was able to get json layout to work using the library io.dropwizard:dropwizard-json-logging and the configuration:
...
3
votes
0
answers
197
views
How to set Dropwizard's ViewBundle root URL
I tried a lot, but I couldn't find how to choose the root URL for all Dropwizard's ViewBundle resources.
I have my REST endpoints served from /rest, because I have set it with environment.jersey()....
0
votes
1
answer
187
views
In dropwizard configuration am I allowed to use environment variable as default?
I couldn't find any documentation for this. For example, I know this is possible:
defaultSetting: ${DW_DEFAULT_SETTING:-default value}
But what if I want logic to say if DW_DEFAULT_SETTING is not ...
0
votes
0
answers
28
views
Dropwizard upgrade to 2.1.4 - requests and responses are not logged
I have upgraded most of the project libraries, mainly Java from 8 to 17, Spark from 1.6 to 3.3, and Dropwizard from 1.1.3 to 2.1.4 and related. However, after the upgrade, HTTP requests are not logged ...
0
votes
1
answer
132
views
Native SQL approach for Quarkus applications
Coming from Dropwizard, I’d like to give Quarkus a try.
My question is how to set up a SQL central approach, like JDBI, that benefits from the features Quarkus offers: reactive, connection pool ...
1
vote
2
answers
272
views
SSL peer shut down incorrectly Error | Java Backend Application
I am working on Java dropwizard backend applicaton. I need to call an external API (https://example.com) from my Java backend API.
I am successfully able to call the external API from my local machine:...
0
votes
1
answer
40
views
Dropwizard conf file automatically convert value to custom object
I have a dropwizard application that parses conf files to construct the application's configuration.
base.conf file has:
country: USA
in the configuration java file:
@NotNull
private MyObject country;...
0
votes
1
answer
287
views
How to build Signalapp Server v9+
I am trying to build and self host Signal Server
While trying building the latest version (v9.89.0) from the GitHub repository (Signal Server) i faced no main manifest attribute issue.
Steps i follow ...
0
votes
0
answers
75
views
'Element enableLazyInitialization is not allowed here' when I add plugin for bytecode enhancement
I am trying to enable bytecode enhancement so that I can do lazy loading for the OneToOne mappings in my entity class.
This is the plugin I have added in my pom:
<plugin>
<groupId>org....
0
votes
0
answers
100
views
Is there a way to pass Dropwizard configuration from application to Guice Module?
I am creating a Dropwizard application. I am using Guice for dependency injection as following.
public class NexusServiceApplication extends Application<NexusServiceConfiguration> {
public ...
0
votes
1
answer
279
views
@OneToOne Problem after Dropwizard (and Hibernate) Update
I'm struggling with a Dropwizard update. Mainly with a resulting Hibernate problem.
I have several @OneToOne relations in my model. Really simple. But after the upgrade to DropWizard 4 (from 2.x) ...
-1
votes
1
answer
97
views
how to access kafka metrics data using dropwizard library
Can somebody provide an example of how to access kafka metrics using dropwizard lib?
Below code uses yammer metrica to access the metric with the given metric Name
MetricName metricName = new ...
0
votes
0
answers
63
views
Unrecognized field at: "database.flyway" in Dropwizard application with flyway bundle
I'm working in a dropwizard application with a config.yml of
database:
driverClass: org.postgresql.Driver
user: ...
password: ...
url: jdbc:postgresql://localhost:5432/postgres
properties:
...
0
votes
1
answer
126
views
How can I manually trigger a job via dropwizard-jobs
We have jobs set up for our dropwizard project via the dropwizard jobs library. We want to add some functionality to allow to us to trigger these jobs manually. Does anyone know how to do this?
If ...
0
votes
0
answers
150
views
java.lang.IllegalArgumentException: org.glassfish.hk2.api.ProxyCtl referenced from a method is not visible from class loader
I am currently working on a project to upgrade from Java 8 to Java 17. Along with Java, I am also upgrading other libraries like Dropwizard, Hibernate, and Swagger. I am using https://github.com/...
0
votes
0
answers
55
views
WriterInterceptorExecutor: MessageBodyWriter not found for media type=text/csv
I am getting the following error
org.glassfish.jersey.message.internal.WriterInterceptorExecutor: MessageBodyWriter not found for media type=text/csv, type=class java.io.PrintWriter, genericType=class ...
0
votes
0
answers
916
views
Unable to initialize 'javax.el.ExpressionFactory'. Check that you have the EL dependencies on the classpath
I am currently upgrading my project from Java 8 to Java 18, along with upgraded bunch of libraries like Apache Spark, Dropwizard, Hibernate, Swagger etc. Right now, my application is coming up in my ...
0
votes
1
answer
62
views
Liquidbase Migrations in a clustered environment?
For background, we utilize dropwizard and liquibase for a project. This project deploys in multiple instances when going to production.
We've run into rare instances where a new database insert script ...
0
votes
0
answers
62
views
How to set HTTP Strict Transport Security in Dropwizard
Using latest Dropwizard how I can set HTTP Strict Transport Security? I was thinking of something like the following:
FilterRegistration.Dynamic htstFilter = environment.servlets().addFilter("...
0
votes
0
answers
31
views
Dropwizard fallback request filter
We have a Java Dropwizard application that currently uses a custom authentication filter.
We need to add a new authentication filter that will be executed only if the old one fails.
Is there any way ...
0
votes
0
answers
117
views
Dropwizard Kotlin JSON logging
I'm trying to integrate my Dropwizard Kotlin app with DataDog, and DataDog requires JSON logs for JVM apps: https://docs.datadoghq.com/logs/log_collection/java/?tab=log4j
Now this is how currently my ...
0
votes
1
answer
183
views
Regex in @Path matches only only 1 of 2 two routes specified, resulting in 404
Here is what dropwizard logs to the console in terms configured resources and their paths:
INFO [07:07:13.741] i.d.jersey.DropwizardResourceConfig: The following paths were found for the configured ...
0
votes
3
answers
196
views
Nested json type won't serialize in jersey
I'm running a dropwizard/jersey java restful web app.
I have an endpoint that is defined like this in api.yaml:
swagger: '2.0'
info:
version: 0.0.1
basePath: /
schemes:
- https
- http
consumes:
-...
0
votes
0
answers
229
views
@Auth and @valid annotation not working together in java 17
I am trying to use @auth and @valid annotation together in one of the APIs in my resource class and it is not being intialized and gives following error at runtime :
Caused by: org.glassfish.jersey....
0
votes
0
answers
56
views
Spring boot equivalent of DropwizardAppExtension?
I'm currently porting my app from Drop Wizard to Spring Boot. But, I cant find a equivalent for DropwizardAppExtension.
For example:
private static final ResourceExtension resource = ResourceExtension....
2
votes
1
answer
2k
views
Java 8 to 17 upgrade issue : java.lang.IllegalAccessError
I am trying to upgrade a project from Java 8 to Java 17. I am getting following error when to trying to bring up the service and not sure how to fix it. I have searched for java.lang....
0
votes
0
answers
89
views
How to define object from 3rd party library in .proto file?
How can I define an object from 3rd party library in .proto file ?
ex -
syntax = 'proto3';
package com.example;
service StorageController {
rpc storePatient(Patient) returns (ResponseStatus) { };
}...
0
votes
0
answers
366
views
How to configure swagger with java api using dropwizard? Need to get past SwaggerUIConfiguration undefined
Struggling getting Swagger implemented with a Java api using dropwizard (I come from .net world, and still learning the java architecture). Followed the swagger docs and samples. When I hit my /...
1
vote
0
answers
89
views
Require form-urlencoded request body with swagger-core
Using Dropwizard with swagger-core and swagger-jaxrs2 2.2.6, how can you mark the requestBody of a x-www-form-urlencoded request as required?
@POST
@Path("/do-something")
@...
0
votes
1
answer
228
views
Swagger UI - How to protect swagger UI access with Auth
I have integrated swagger bundle for my dropwizard(v2) app. Now I want to protect my app with the Auth means before accessing the swagger UI username and password show be mandatory. I tried a lot but ...
0
votes
0
answers
66
views
Invalid argument (400) - Cannot find key of appropriate type to decrypt AP REP - AES256 CTS mode with HMAC SHA1-96
The issue is observed with "curl --service-name test --negotiate:u http://localhost:8080/api". The command is used to test an API running in the same host protected by Kerberos.
SPN = "...
1
vote
0
answers
101
views
Authorization/API key text box not appearing on Swagger Page
I have upgraded the dropwizard swagger version in my code. Now after upgrading the same I am not able to see the API_KEY textbox on swagger page.
I have changed the maven dependency From
<...
0
votes
1
answer
224
views
How to configure sending Dropwizard metrics to Prometheus?
I am calculating dropwizard metrics and I am using the "meter" metric of DW to calculate how many number of times in a second a particular API was hit. and I want to send this "rate ...
2
votes
2
answers
222
views
Jersey. EOF on upoad operation : java.lang.IllegalStateException: Unable to perform operation: resolve on xxx.UploadFileData
In general, not so long ago we encountered a problem, for some reason, all attempts to upload a file for a client fail. On the back we get an exception:
Jersey 2.33
Dropwizard 2.0.28
MultiException ...