Skip to main content

All Questions

0 votes
1 answer
62 views

What could be the issue with this composite key and query setup in Spring Data JPA?

I'm working on a Spring Boot project using JPA and trying to query an entity that uses a composite primary key with @IdClass, but I can't get the repository method to work. I've double-checked that: ...
Kubra's user avatar
  • 1
0 votes
1 answer
33 views

Can't create a data source via config method, can only create via properties

If I only set up the data source via spring.datasource values in application.properties, e.g.: [email protected] spring.datasource.driverClassName=net.snowflake.client.jdbc....
John Little's user avatar
  • 12.5k
0 votes
0 answers
61 views

How can I determine if my service uses a DB connection?

I have a Spring Boot app using Hibernate and Spring Data JPA. In order to manage DB transactions, I use the org.springframework.transaction.annotation.Transactional annotation around services. In some ...
Kevin's user avatar
  • 1,747
-2 votes
0 answers
25 views

How to efficiently fetch user avatar from another microservice in Spring Boot? [closed]

I’m building a microservices-based system with order-service and user-service. Each order is created by a user, and in the order list I want to display the user’s avatar. Avatars are stored in MinIO. ...
Azamat's user avatar
  • 7
-2 votes
1 answer
35 views

How can I use JPA Repository without RequestMappings [closed]

I am using Java 24, and Spring 3.4.4. I have a local postgres DB Currently I am trying to call a method that has an @autowired repository I know the problem is I am using "new" which means ...
user30200080's user avatar
0 votes
2 answers
43 views

Child class entity is not deleting in many to many relationship

@Entity @Table(name = "product") public class Product implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType....
Neeraj Kumar's user avatar
0 votes
1 answer
42 views

Table is a subclass in a 'SINGLE_TABLE' hierarchy and may not be annotated '@Table'

I have this old Hibernate table in Spring Boot application: @Entity @Table(name = "accounts") @Inheritance(strategy = InheritanceType.SINGLE_TABLE) public class Account { @Id @Column(...
Peter Penzov's user avatar
  • 1,620
-1 votes
0 answers
34 views

Can we use Spring Data JPA and Spring JDBC in the same Spring Boot application?

Can we use Spring Data JPA and Spring JDBC in the same Spring Boot application? Also Let us say we have very complex sql queries written in an old app and we need to migrate them to Spring Boot app. I ...
Alok Kumar's user avatar
0 votes
1 answer
35 views

We are migrating from Spring 2.x.x(Hibernate 5) to Spring 3.x.x (Hibernate 6). Test case we using H2. But getting unique key constraint issue

Entity class @Getter @Setter @NoArgsConstructor @Entity @ToString @Table(name = "category_config") public class CategoryConfig extends BaseEntity { @Id @GeneratedValue(strategy = ...
PAMPA ROY's user avatar
0 votes
0 answers
51 views

Java springboot application does not "see" dependency unless that dependency's plugin is compiled with specific info

I have a Java Springboot application which I have added as a dependency. Lets call this application A. This dependant project is a API making use of controller classes (@RestController annotation). In ...
Derik's user avatar
  • 1
0 votes
0 answers
42 views

How to let JPA know what it has to do when you configure DataSource manually

I am configuring my spring boot app to have a second datasource for some reason, the main one which is annotated as @Primary looks like this @Configuration @EnableJpaRepositories(basePackages = "...
Bahram's user avatar
  • 1,662
1 vote
3 answers
129 views

Unable to save the model object in the spring boot which is having the enum property

we are using spring boot version 3.4.3 + spring data jpa project hibernate version 6+ AND spring security version 6+. Databae is postgres. my model class TestModel is like this: @Getter @...
java developer's user avatar
2 votes
1 answer
73 views

Spring Boot and Apache Derby - IllegalStateException: Cannot load driver class: EmbeddedDriver

After verifying with several tutorials and Stack Overflow questions for similar errors, I am not able to solve the below issue. I want to use Apache Derby DB in embedded mode and below is how I ...
KCK's user avatar
  • 2,055
0 votes
0 answers
39 views

When deleting the cart by id, all the cartItems get rovmved correctly, but the cart still holds its data until I add another item to the cart

I'm working on e-commerce APIs, I have this service that is responsible for the cart operation: @Service @AllArgsConstructor public class CartService implements ICartService { private final ...
Omer Elkhalifa's user avatar
0 votes
1 answer
150 views

"A column has been specified more than once in the order by list. Columns in the order by list must be unique" when using ORDER BY

I am using blaze persistence (version 1.6.14) for fetching entities from my database. An SqlGrammarExcepion is thrown with the message com.microsoft.sqlserver.jdbc.SQLServerException: A column has ...
skorpyo's user avatar
  • 117

15 30 50 per page
1
2 3 4 5
718