Jersey returns 500 when trying to return an XML response

前端 未结 4 1204
闹比i
闹比i 2021-01-20 03:56

I\'m trying to create my own RESTful WS application using Jersey 2.12 based from this article. I want to return an XML representation of a class depending on the id been pas

4条回答
  •  北荒
    北荒 (楼主)
    2021-01-20 04:33

    To the ones with the same problem, I had something like it but in my case it was a List that i wanted in my response. The source of the problem was that the object had a lazy load relationship and when I used GenericEntity> to return my list the same problem as occurred to me. Just change to null the relationship or bring the lazy load relation to the object before create GenericEntity> and it will be fine.

提交回复
热议问题