Skip to content
Advertisement

Tag: spring

get the id from an exception message spring boot

hello guys i hope you’re doing well, I’m catching an exception (DataIntegrityViolationException) where the specified id can’t be deleted because it’s still in the parent entity. I want to know if there is any way to get that specified id from the caught exception. Answer DataIntegrityViolationException just wraps the exception thrown by the underlying JDBC driver. So it depends on

Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled. How can I solved Problem?

Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled. pom.xml 4.0.0 org.springframework.boot spring-boot-starter-parent 2.6.6 kodlamaio northwind 0.0.1-SNAPSHOT northwind Demo project for Spring Boot <java.version>11</java.version> org.springframework.boot spring-boot-starter-data-jpa org.springframework.boot spring-boot-starter-web Answer According to your error.log So please resolve the NullPointerException in your PatternsRequestCondition

Parametrized query request postgresql

I want to get data from my DB where is LocalDateTime equals to LocalDateTime in get request. Timeslot table code: Controller code: But when I did this request result in console is: org.postgresql.util.PSQLException: ERROR: syntax error at end of input. How do i change sql request code to fix this error? Should I use PrepareStatement or something else? Answer I

Why do I get a “io.jsonwebtoken.ExpiredJwtException”?

I have a problem with my Spring Security JWT Application. I am getting an error because my JWT is expired, but I can’t find, where it gets the 2022-04-12 as an expiration date. I can’t find a single piece of code, which says that the expiration date is the 2022-04-12. After my understanding, it is creating a new token, each

how to combine two List<Map> [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 10 months ago. Improve this question There are these two List<Map<String,Object>> in java List<Map<String,Object>> voListResult = new ArrayList<Map<String,Object>>(); voListResult: List<Map<String, Object>> productLikeRenew = likeDAO.SumProductLike(); productLikeRenew: How can I update likecheck based

Spring Security – How to mix xml and Java SecurityFilterChain declaration configurations?

Working on an application that was using XML Schema-based Spring configuration only, I’m slowly introducing Java based configuration. Unfortunately I’m not able to use Spring Security html xml element and Java based SecurityFilterChain configuration at the same time. When I inspect the filterChains list in the FilterChainProxy, it only contains the filter chains from the xml configuration. Despite the Java

Java Scheduler to Mail

Given that I have two scheduled component classes uploading files respectively. I created a sending email method for each of them in order to send a reminder email to myself in case any uploading exceptions happened. the flow like this: Scheduler One — if exception during uploading —> sending a email after exception Scheduler Two — if exception during uploading

management.endpoint.health.group.readiness.include=* bug – Spring Boot Actuator

A bug in Spring Boot Actuator exists whereby if certain properties are used, management.endpoint.health.probes.add-additional-paths=true doesn’t work in exposing the readiness endpoint at /readyz and the liveness endpoint at /livez. You get a whitelabel error page. This application has no explicit mapping for /error, so you are seeing this as a fallback. Those properties include: I need to use the management

Hibernate 5 and JPA: select table without his children but maintain persistence on save

I have two models: Ordine and DettaglioOrdine. I would like that, when I save an object of type “Ordine”, hibernate also save his child “DettaglioOrdine” (and this works). But, if I do a select query, the query is very very slow because hibernate retrieve also DettaglioOrdine. So, I would like the “Ordine” object without “DettaglioOrdine” object. “Ordine” model: DettaglioOrdine Model:

Advertisement