All Questions
1,757 questions
1
vote
0
answers
97
views
HikariPool-1 - Failed to validate connection in Spring Boot Data Jpa with mysql
I know there are already similar questions and answers on the topic. I tried all the suggestions but nothing worked for me. I decided to post this question because my case seems slightly different.
I ...
0
votes
1
answer
156
views
Use of MySQL8Dialect for MySQL 9.1.0 correct?
What is the correct Hibernate dialect for MySQL 9.1.0 set in the application.properties of a Java Spring application? For MySQL 8 I would have used org.hibernate.dialect.MySQL8Dialect, but it seems ...
0
votes
0
answers
34
views
setIdleTimeout and setKeepaliveTime are not working with MySQL wait_timeout
Scenario 1:
Spring Boot 2.6.3
HikariConfig hikariConfig = new HikariConfig();
hikariConfig.setDriverClassName(dataSourceProperties.getDriver());
hikariConfig.setUsername(dataSourceProperties....
0
votes
0
answers
54
views
How to setup a Spring Boot app connecting to MySQL Cloud with IAM authentication with MySQL cloud using PSC endpoint
In GCP, I was able to successfully set up a Spring Boot test app to connect to MySQL Cloud that uses PSC (Private service connect) endpoint using IAM authentication, but it uses the standard MySQL ...
0
votes
0
answers
89
views
Fuzzy search logic using JpaSpecificationExecutor
I have a column c1 (varchar(400)) in table t1 in MYSql database. This column can contain data in plain text and json format like "abcd","12345.6",{"key1":"value1&...
2
votes
0
answers
137
views
How to define a UUID identity column that satisfies both MySQL 8.4 and H2
I'm trying to implement a table that uses UUID instead of long as its identity column.
The long id implementation works perfectly, including end-to-end Spring MVC tests:
@Getter
@Setter
@Entity
@Table(...
-1
votes
1
answer
106
views
Spring boot Bcrypt Password in application.properties
I want to store a BCrypt-hashed password in application.properties for datasource.password and establish a MySQL database connection. Is this feasible? Is there any way to configure Spring so that I ...
0
votes
0
answers
44
views
How to handle frequently changing group counts?
I am facing a problem, don't know the best practice.
The Problem: When new data is created, one of its field either be group X or group Z. Group counts must be balanced after some time. Like we can ...
0
votes
0
answers
15
views
Hibernate Envers: custom RevisionEntity for specific database/schema only (multi database setup, multi datasource setup)
Goal:
I want to delete an entry in the database, but protocol it in the (existing) history.
Row from main table gets deleted, but in the _audit table the history is readable. In addition I want to ...
0
votes
0
answers
21
views
How to Handle Missing Data in LEFT JOIN for Custom Fallback Message in JPA Query?
I'm building a Spring Boot application where I need to fetch data from an AuditLog table. This table is connected to several other entities through LEFT JOIN, and one of those entities is ...
0
votes
1
answer
100
views
Exception MysqlDataTruncation when parsing a String 1899-12-30
public Timestamp convertFromDate(String fromDate) throws ParseException {
String[] possibleFormats = { "dd/MM/yyyy", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd" };
...
0
votes
1
answer
84
views
Java JPA Repository One To One Join Table Wrong Join Variable and Unknown Column Error
I am struggling to get a one to one join relationship JPA repository call to work.
I have two tables product and display_name so I made the follow entities
@Entity
@Table(name = "product")
...
-3
votes
2
answers
69
views
Spring Boot project and React project integration problem
I am developing this project using Spring Boot for backend and react for frontend, I connected this front end and back end. Then Sign Up and Sign in is working without any error but when I am going to ...
1
vote
0
answers
39
views
GeneratedKeyHolder not returning generated id for Column created using UUID() in MySQL table
My table def in MySQL looks like this :
create table if not exists CUSTOMER (
CUSTOMER_ID CHAR(36) DEFAULT (UUID()) primary key,
...
1
vote
1
answer
48
views
How is JPA's Sort.by() is able to access nested fields of entity?
I am getting a surprising output in my GET API built in springboot,
I have two related entities, say A and B. Here A has @OneToOne mapping with B.
@Entity
class A {
....
@OneToOne
@...