Questions tagged [micronaut]
Micronaut is a JVM framework for building web applications with a strong focus on microservice applications.
1,363
questions
0
votes
0
answers
10
views
Flyway to update two databases
I have micrnaut based java application. which uses two databases, i have set up the two datasources
but how can i use flyway to load different data into the two databases
directory is as follows, ...
0
votes
0
answers
30
views
Bearer Token Validation In Micronaut
I am writing a new microservice in micronaut which will accept the JWT(Bearer) token sent by user in request, validate that token is not expired and has all the required claims. If all these criteria'...
0
votes
1
answer
99
views
Controller returning reactive paged result from total item count as Mono, items as Flux
I've got 2 endpoints returning the same data in two different JSON-formats.
The first endpoint returns a JSON-array, and starts the response right away.
@Get("/snapshots-all")
fun ...
0
votes
1
answer
35
views
What's micronaut-cli.yml for?
When I generate a new Micronaut project using the mn CLI tool or Micronaut Launch, it comes with a micronaut-cli.yml file specifying an applicationType, defaultPackage, testFramework, sourceLanguage, ...
0
votes
1
answer
37
views
How to implement micronaut dependency in grails gradle?
I'm trying to add micronaut dependency in grails build.gradle. And I found no proper solution. And getting the following error.
build.gradle file
dependencies {
*these are the dependencies I ...
0
votes
1
answer
31
views
Constant "Read Timeout" exception from Micronaut Declarative client
I have two declarative Clients in my Micronaut app which I'm collecting their results in a non-blocking manner (alongside with some other async methods). But every once in a while they produce io....
0
votes
0
answers
36
views
How to run micronaut app with jni for native method communication
i have an app built using micronaut, jni & mqtt. To create a c/c++ header file to communicate with hardware, how to run or create .h file dynamically while its running on the Raspberry Pi.
i use ...
0
votes
1
answer
49
views
Problem with bean instantiation using @Repository micronaut data annotation
I'm approaching Micronaut framework to create a program to interact with a database.
I'm new to gradle project configuration etc. so it could be a problem related to this.
I divided my project in two ...
0
votes
1
answer
37
views
How to integrate Micronaut (GraalVM) with JNI?
Does micronaut supports JNI. our requirement is like from micronaut app we need to communicate to embedded c/cpp. Can someone pls let me know if its possible or any Reference will help. Thanks in ...
0
votes
0
answers
49
views
javax.crypto.BadPaddingException: Decryption error on decrypting with RSA and Base64 encoding
I have following program for encrypting and decrypting data.
import org.apache.commons.codec.binary.Base64;
import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto....
0
votes
0
answers
39
views
How can I update properties at run time from a distributed configuration property source in Micronaut
I've created a ConfigurationClient which loads properties from Azure App Config during the bootstrap phase. This works correctly and my classes annotated with @ConfigurationProperties get the proper ...
1
vote
0
answers
46
views
Delete all not supported for entities with no ID - Groovy and JPA
I have an issue with a very simple application I'm writing.
The persistence is handled with micronaut-data /w JPA, the DB is H2 for now.
I have a Comment model which looks like this:
package cloud....
0
votes
0
answers
48
views
Micronaut not picking thread from separate event-loop group for client call while calling using RXHttpClient?
I was trying to understand, how the Micronaut/Netty thread model working under the hood. I create a simple project in which i have two service product-service and recommendation-service. I call the ...
0
votes
0
answers
48
views
Micronaut Hibernate Second Level Cache
I am trying to enable Hibernate Second Level Cache with using of hazelcast in client server mode.
but when i run the application i get this exception
Caused by: java.lang.ClassNotFoundException: Could ...
2
votes
0
answers
45
views
Does micronaut/Netty create separate thread for Client call?
I am unable to understand the micronaut documentation when they as if your interactions with an HTTP client involve CPU-intensive work, it may be worthwhile configuring a separate EventLoopGroup for ...
0
votes
0
answers
41
views
Failed to convert argument [obj] for value [null] due to: Cannot deserialize value of type `java.time.LocalDate` from String
Micronaut 1.3
Jackson 2.13.1
I am passing the date in the format 'dd.MM.yyyy'
My class field looks like this
@JsonInclude
@Column(name = "moving_date")
@JsonView(JsonViewSimple....
0
votes
1
answer
29
views
Too many RxCachedScheduler Thread and okHttp Task runner thread in Waiting state
We have our service developed using the micronaut framework. Earlier we had default configuration for EventLoop with 20 threads. We were noticing a lot of thread were going in blocking state. As we ...
0
votes
3
answers
82
views
How i can get values in body request?
i'm newbie with micronaut and can't get value in a body request.
I'm using "x-www-form-urlencoded", and i need get some values for use on authentication.
Controller:
@Controller
@Secured(...
0
votes
0
answers
38
views
Truststore system property value not taking into effect with micronaut, openjdk 17 - 'Inaccessible trust store'
I want to use custom truststore with open jdk 17 and micronaut.
I want to access link similar to - https://gitlab.com/api/v4/feature_flags/unleash/42
I have added certificate belonging to the host to ...
0
votes
2
answers
47
views
Is there a way to make a generic AttributeConverter in Micronaut Data?
I have a lot of value objects that basically represent UUIDs as the primary identifier of the entity / aggregate:
@Singleton
class FooIdConverter : AttributeConverter<FooId, UUID> {
override ...
0
votes
1
answer
57
views
JPA/Hibernate & Micronaut, Uppercased Table Name Not Found
Summary:
Micronaut/JPA/Hibernate is lowercasing the name of my database table and throwing an error on startup saying the table can't be found. The table is there, but it's named in uppercase. How ...
0
votes
0
answers
52
views
Multiple records inserted on one request - App Engine / Cloud Datastore
I have deployed an application to GAE that uses the Cloud Datastore (Cloud Firestore in Datastore mode). It is a fairly simple API that creates, updates, and gets a pretty simple record.
When I POST ...
0
votes
0
answers
25
views
Micronaut and Nuxt Basic Auth
I am trying to implement basic authentication using Micronaut in the back-end and Nuxt in the front-end. I am following the documentation from Micronaut (https://guides.micronaut.io/latest/micronaut-...
-2
votes
1
answer
54
views
Methods signature got changed while compiling the gradle java application and referencing to other project
I have two projects known as (Common and ApiGateway).The common is a Gradle java project and ApiGateway is a Micronaut java application. In the common project, I am keeping all the common things and ...
0
votes
1
answer
40
views
How to get db information using Spring JdbcTemplate and plain SQL (Micronaut)
I am trying to create a web application using Micronaut and need to get information from travelLog table using Spring JdbcTemplate and plain
SQL. I was using this tutorial https://www.greggbolinger....
0
votes
2
answers
56
views
Internal Server Error: No backing RepositoryOperations configured for repository
"I am new to micronaut assist me out here what could be the issue. I have also done the annotation processor enable on my eclipse for this project. my java version is JavaSE-1.8 and eclipse ...
0
votes
0
answers
39
views
How to return ObjectNode from Controller in Micronaut?
I have following code
@Controller()
public class TestController {
@Get(value = "test", produces = MediaType.APPLICATION_JSON)
public MyDto fetch() throws Exception {
return new ...
0
votes
1
answer
69
views
Micronaut returns the empty body
In my "Hello World" native(GraalVM) AWS Lambda application Micronaut returns the empty body instead of serializing a map as JSON. Here is the code
@Controller
public class BookController {
...
0
votes
0
answers
43
views
Problems in mocking a factory in micronaut
I am fairly new to micronaut and currently i am stuck in a strange situation where i am unable to mock a factory for a value.
So i have an interface
@Qualifier
@Retention(RUNTIME)
public @interface ...
0
votes
0
answers
44
views
Access micronaut cache through metrics endpoints
I am new to micronaut and trying to access the cache.
Using following dependencies:
implementation "io.micronaut.cache:micronaut-cache-core"
implementation "io.micronaut.cache:...
0
votes
1
answer
28
views
micronaut yaml properties list
I have a list with configurations for producers:
myproject:
process:
article:
topic: masterdata.product
detail:
supplier:
topic: masterdata.supplier
detail:
...
0
votes
1
answer
17
views
Micronaut Kafka Listener multi topic
I want to create a KakfaListener for several topics. All topics start with "masterdata", for example:
masterdata.product
masterdata.supplier
I try to implement a topic pattern but it doesn'...
0
votes
0
answers
87
views
Error starting Micronaut server: Unable to start Micronaut server on port: 8080
After creating Micronaut project with Gradle and Java, when I start the server with the command ./gradlew run I receive this error.
The command result for lsoft -i :8080 is empty.
ruannawe@MACBOOK-PRO-...
0
votes
1
answer
35
views
Micronaut test change kafka port using testcontainers
I'm trying to run a Micronaut test including kafka with testcontainers.
For my test I need that my code and the kafka server share the same port but I can not configure the port in kafka:
@Container
...
0
votes
1
answer
30
views
Bitbucket test step failed when micronaut discovery client dependency is added in build.gradle
I have Micronauts service which is up and running, now I want to change my data source values into the config map, added below lines in build.gradle.
implementation("io.micronaut.kubernetes:...
0
votes
1
answer
217
views
How do I use @Query in a Micronaut Data repository to do an aggregation query where the results have more than one column?
I completed this tutorial: https://guides.micronaut.io/latest/micronaut-data-jdbc-repository-gradle-java.html
I then added code to the completed, working tutorial to try to do a custom SQL query for a ...
0
votes
0
answers
45
views
Micronaut application memory issue with httpcall
There was already an issue https://github.com/micronaut-projects/micronaut-core/issues/6623 related to the HTTP call for Micronaut application, which was closed and the suggested solution was to ...
0
votes
0
answers
60
views
Mapped the Yaml configuration to Micronaut swagger open API security configuration
I have the below YAML configuration for OAuth
OAuth:
authorizationUrl: https://localhost:5001/connect/authorize
tokenUrl: https://localhost:5001/connect/token
scopes:
- name: openid
...
1
vote
1
answer
71
views
How do I commit a transaction when using JdbcRepository?
I have two @JdbcRepository annotated repositories, which represent two Postgresql schemas. Each schema is in a separate datasource, which means each Repository has its own transaction manager. In ...
0
votes
1
answer
84
views
HttpClientResponseException: Error decoding HTTP response body: Error decoding stream for type S3EventNotification
I am trying to create an AWS Lambda Function using micronaut which will be triggered bt s3 events.
However, when I test the function using console, I am receiving the following error :
Caused by: ...
0
votes
0
answers
54
views
Is there a way to generate feign client for Microservice in Micronaut with Kotlin?
I am trying to generate feign client for my Microservice.
I have tried all the options but could not find any specific solution for this in tech stack I am working with.
Using following tech stack:
...
0
votes
1
answer
77
views
org.graalvm.compiler.java: UnsupportedFeatureException: No instances of org.bson.BsonDocument are allowed in the image heap
Trying to create native image on micronaut application with Graal VM 22.1.0.r17 using gradle command as
./gradlew nativeCompile
but getting an exception as
Caused by: org.graalvm.compiler.java....
1
vote
1
answer
60
views
micronaut controller returning empty json in nativeimage
I have a controller in micronaut
package com.mascix.controller;
import java.time.LocalDate;
import javax.ws.rs.core.Response;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com....
0
votes
1
answer
66
views
How to break down a Java Micronaut application into multiple java modules?
I am from .net background and new to java. I have started exploring java micronaut framework and started building a mid size application using it. I want to break down functionality into following ...
0
votes
1
answer
40
views
How to disable reading from configuration from bootstrap.yml in micronaut project?
I have a Micronauts application with bootstrap.yml configuration that wan to read-only while running in the k8 cluster, but now when the test running from the bitbucket pipeline it is reading from ...
1
vote
1
answer
38
views
Braintree webhooks: Error: payload contains illegal characters
I am trying to consume Braintree webhooks in a java microservice (Micronaut fwiw).
The issue that I'm having is that when I try to parse the webhook body, I get an error: " Error: payload ...
1
vote
1
answer
38
views
Get Connection from injected DataSource throws exception with multiple datasources in Micronaut Data JDBC
Couldn't get connection from injected DataSource like spring and as written in documentation(Configuring Multiple Data Sources) https://micronaut-projects.github.io/micronaut-sql/latest/guide/#:~:text=...
1
vote
2
answers
92
views
setting micronaut configuration location
I have an existing groovy micronaut app I'm trying to change where it loads its config from. I don't understand what code to write so I can set the location of the micronaut configuration. I know you ...
0
votes
0
answers
79
views
Commit/rollback transactions manually with multiple datasources in Micronaut
I need to commit/rollback transactions manually with multiple datasources in micronaut-data. But when commits second transaction(db2TransactionManager.commit(db2Transaction)) it throws below exception....
0
votes
1
answer
71
views
Micronaut GCP global pubsub endpoint
I've searched the Micronaut docs for a solution how to define GCP topic endpoint globally, but with no luck. Right now, I'll have to do the below config in every publisher.
Any advice will be highly ...