Questions tagged [micronaut-data]

210 questions
1
vote
0 answers

Java Micronaut - throws "javax.net.ssl.SSLHandshakeException" after I hit the endpoint more than once

I have a simple micronaut app. I have two separate endpoints where the method that executes will call an API using a client (I've tried both the http client from "java.net.http.HttpClient" and "io.micronaut.http.client.RxHttpClient" but the same…
jpz
  • 11
  • 1
1
vote
1 answer

Micronaut - No bean of type [io.micronaut.transaction.SynchronousTransactionManager] exists

I'm migrating one of my Microservices from Spring to Micronaut and this is a problem I'm facing while calling a controller to load one entity. The error I get is: { "message": "Internal Server Error: No bean of type…
Vitor Villar
  • 1,855
  • 18
  • 35
1
vote
2 answers

How to determine if a string can be used as a MongoDB ObjectID?

I am using Micronaut framework with JAVA and trying to validate the objectId with the below string. 60236833af6a1d49478d2bef // Valid mongo ObjectId 60236833a46a1d49478d2bef // Invalid mongo ObjectId How can I perform either the string has…
San Jaisy
  • 15,327
  • 34
  • 171
  • 290
1
vote
1 answer

Micronaut-data with hibernate: Aborted transaction still modifies database

I currently encounter issues trying to get micronaut-data to work with transactions. To the best of my understanding, a flow of: start transaction perform write 1 throw exception Should yield an unmodified database, i.e. the transaction should be…
Spellmaker
  • 11
  • 1
1
vote
1 answer

Problems with Micronaut Data

I am currently in the process of upgrading an existing Micronaut application from version 1.2.x to 2.2.1 (latest) and I thought that it would also be a good idea to start using micronaut-data to perform whatever database interactions are required. I…
akortex
  • 5,067
  • 2
  • 25
  • 57
1
vote
1 answer

Validating the POJO record with Micronaut not working

Using Micronaut bean validation for the record class is not working compile 'io.micronaut:micronaut-validation:2.2.1' Record class @Introspected public record ProductViewModel ( @JsonProperty("id") String…
San Jaisy
  • 15,327
  • 34
  • 171
  • 290
1
vote
1 answer

Limit jdbc connection pool fixed amount

Hi i use micronaut data together with various jdbc connection pools. I first had hikari and also tried the tomcat one. What i was assuming that setting the datasource to maximum-pool-size: 10 results in max 10 open connections. But it seems that…
IEE1394
  • 1,181
  • 13
  • 33
1
vote
1 answer

Error starting Micronaut server: Bean definition [org.hibernate.SessionFactory] could not be loaded

I want to use io.micronaut.data.repository.CrudRepository. In IntelliJ, even after I added the dependencies I get a complain: Unresolved reference CrudRepository As far as I can see I added the io.micronaut.data:micronaut-data-hibernate-jpa as…
Jim C
  • 3,957
  • 25
  • 85
  • 162
1
vote
1 answer

"Internal Server Error: Could not obtain transaction-synchronized Session for current thread" even after added @Transaction

I created a very simple micronaut-data project and I am getting the erro mentioned in this question topic when I try post a very simple json. I found few similar questions always pointing to add @Transaction. Well, in my case it is already…
Jim C
  • 3,957
  • 25
  • 85
  • 162
1
vote
1 answer

Micronaut Data (JDBC) w/Postgres Generates SQL with backtics `

My application runs great with the H2 test database, but when I run it with Postgresql, it creates sql with backticks. What am I missing? Edit This was an Environment problem. I had a test Repository that extended the repository below but used the…
1
vote
1 answer

How to create a TextFree search in mongoDB with Micronaut

I am using reactive MongoDb, and trying to implement Free Text search based on the weight implementation("io.micronaut.mongodb:micronaut-mongo-reactive") on below POJO public class Product { @BsonProperty("_id") @BsonId private ObjectId…
San Jaisy
  • 15,327
  • 34
  • 171
  • 290
1
vote
1 answer

Creating TextIndex in Micronaut with reactive mongoDB

I am using reactive mongoDB with Micronaut application implementation("io.micronaut.mongodb:micronaut-mongo-reactive") Trying to create a TextIndex and search Free text functionality public class Product { @BsonProperty("id") private…
San Jaisy
  • 15,327
  • 34
  • 171
  • 290
1
vote
1 answer

Reactive mongoDB in Micronaut

I am using the mongoDb with Micronaut and trying to insert, get, delete and update the record. I have followed the guideline from here https://github.com/ilopmar/micronaut-mongo-reactive-sample Since I don't have a database created in the…
San Jaisy
  • 15,327
  • 34
  • 171
  • 290
1
vote
0 answers

javax.lang.model.element.UnknownElementException: Unknown element: "repository"

Record dependency injection using the java 15 preview feature with micronaut using java 15 jdk causing the error public record ProductListener(GenericRepository repository) { public Flowable> findByFreeText(String text) { …
San Jaisy
  • 15,327
  • 34
  • 171
  • 290
1
vote
1 answer

Micronaut not connecting to db in yml

I have created a new environment for my application and called it docker. I'm trying stuff out so I set it like this: application-docker.yml micronaut: application: name: time server: netty: access-logger: enabled: true …
coconut
  • 1,074
  • 4
  • 12
  • 30