com.capstone.codegum.Codegum.Objects.BusinessRole["usersId"]->com.capstone.codegum.Codegum.Objects.User_$$_jvst2fa_8["handler"])BusinessRole.javaimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;import javax.persistence.*;@Entity@Table(name="Business_Roles")@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"}public class BusinessRole {@Id@GeneratedValue(strategy =GenerationType.AUTO)private Long..." />

Failed to write HTTP message: no properties discovered to create BeanSerializer

I am getting error 500 on this one. I have already added in my java but still can't get any data from the java @JsonIgnoreProperties({"hibernateLazyInitializer", "handler"}

This is the error

Failed to write HTTP message: org.springframework.http.converter.HttpMessageNotWritableException: Could not write JSON: No serializer found for class org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS); nested exception is com.fasterxml.jackson.databind.JsonMappingException: No serializer found for class org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain: java.util.ArrayList[0]->com.capstone.codegum.Codegum.Objects.BusinessRole["usersId"]->com.capstone.codegum.Codegum.Objects.User_$$_jvst2fa_8["handler"])

BusinessRole.java

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import javax.persistence.*;

@Entity

@Table(name="Business_Roles")

@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"}

public class BusinessRole {

@Id

@GeneratedValue(strategy =GenerationType.AUTO)

private Long...

Read More »

By: StackOverFlow - Tuesday, 13 March

Related Posts