I am getting a java.lang.IllegalArgumentException similar to the link given below.To solve it I tried to change the field type from Integer to Long. But still I am getting:
Caused by: java.lang.IllegalArgumentException: Parameter value [5] was not matching type [com.buddhiedge.server.entity.StudyplanCategory]
StudyplanCategory is the entity class.
The problem is similar to the one in the below link. Hibernate - Parameter value [2011] was not matching type [java.lang.Integer]. How to solve? My entity Class is:
@JsonIgnoreProperties({ "studyplanCategoryList", "dropboxzipfile",
"parentCategory", "createdDate", "updatedDate" })
@JsonPropertyOrder({ "id", "name", "status", "sptTutorialsList" })
@Entity
@Table(name = "studyplan_category", catalog = "buddhiedgeserver_db", schema = "", uniqueConstraints = { @UniqueConstraint(columnNames = { "dropboxzipfile" }) })
@NamedQueries({
@NamedQuery(name = "StudyplanCategory.findSubStudyPlanById", query = "SELECT s FROM StudyplanCategory s WHERE s.parentCategory=:parentCategory order by updatedDate DESC")})
public class StudyplanCategory implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
@NotNull
@Column(name = "id", nullable = false)
private Long id;
}