vifeng / TicketToTheMoon

WIP: Ticket office website. back office for venues to operate their shows and front office to buy tickets for the public.
1 stars 0 forks source link

Reading database or Json converting request #19

Closed vifeng closed 9 months ago

vifeng commented 11 months ago

The errors aren't MapStruct related. Spring is complaining that it's getting some String which is supposed to be converted into a Ticket_ReservationKey. This kind of message typically originates either when reading from the database or converting an incoming JSON request.

2023-12-14T13:17:02.037+01:00  WARN 10238 --- [nio-8080-exec-1] .m.m.a.ExceptionHandlerExceptionResolver : Resolved [org.springframework.http.converter.HttpMessageNotWritableException: Could not write JSON: Infinite recursion (StackOverflowError)]
2023-12-14T13:17:07.931+01:00  WARN 10238 --- [nio-8080-exec-3] .m.m.a.ExceptionHandlerExceptionResolver : Resolved [org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [java.lang.String] to type [com.vf.tickettothemoon_BackEnd.domain.model.Ticket_ReservationKey]]
2023-12-14T13:17:08.365+01:00  WARN 10238 --- [nio-8080-exec-5] .m.m.a.ExceptionHandlerExceptionResolver : Resolved [org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [java.lang.String] to type [com.vf.tickettothemoon_BackEnd.domain.model.Ticket_ReservationKey]]
vifeng commented 11 months ago

I couldn't make The composite key from baeldung works so I changed it to this one : https://www.codejava.net/frameworks/spring/spring-data-jpa-composite-primary-key-examples

If time it would be interesting to go back to this version and try to make it work