您的位置:首页 > 移动开发

【jackson 异常】com.fasterxml.jackson.databind.JsonMappingException异常处理

2016-08-24 17:42 190 查看
项目中,父层是Gene.java【基因实体】 子层是Corlib.java【文集库实体】,一种基因对用多个文集库文章

但是在查询文集库这个实体的时候报错:【com.fasterxml.jackson.databind.JsonMappingException】

package com.agen.entity;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;

/**
* Corlib entity. @author MyEclipse Persistence Tools
*/
@Entity
@Table(name = "corlib", catalog = "biologyinfo")
public class Corlib implements java.io.Serializable {

// Fields

private String corlibId;
private Gene gene;
private String corlibContext;
private String corlibCre;
private Timestamp createDate;
private Timestamp updateDate;
private String transPerson;

// Constructors

/** default constructor */
public Corlib() {
}

/** minimal constructor */
public Corlib(Gene gene) {
this.gene = gene;
}

/** full constructor */
public Corlib(Gene gene, String corlibContext, String corlibCre,
Timestamp createDate, Timestamp updateDate, String transPerson) {
this.gene = gene;
this.corlibContext = corlibContext;
this.corlibCre = corlibCre;
this.createDate = createDate;
this.updateDate = updateDate;
this.transPerson = transPerson;
}

// Property accessors
@GenericGenerator(name = "generator", strategy = "uuid.hex")
@Id
@GeneratedValue(generator = "generator")
@Column(name = "corlibId", unique = true, nullable = false, length = 36)
public String getCorlibId() {
return this.corlibId;
}

public void setCorlibId(String corlibId) {
this.corlibId = corlibId;
}

@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "geneID", nullable = false)
public Gene getGene() {
return this.gene;
}

public void setGene(Gene gene) {
this.gene = gene;
}

@Column(name = "corlibContext", length = 65535)
public String getCorlibContext() {
return this.corlibContext;
}

public void setCorlibContext(String corlibContext) {
this.corlibContext = corlibContext;
}

@Column(name = "corlibCre", length = 500)
public String getCorlibCre() {
return this.corlibCre;
}

public void setCorlibCre(String corlibCre) {
this.corlibCre = corlibCre;
}

@Column(name = "createDate", length = 19)
public Timestamp getCreateDate() {
return this.createDate;
}

public void setCreateDate(Timestamp createDate) {
this.createDate = createDate;
}

@Column(name = "updateDate", length = 19)
public Timestamp getUpdateDate() {
return this.updateDate;
}

public void setUpdateDate(Timestamp updateDate) {
this.updateDate = updateDate;
}

@Column(name = "transPerson", length = 36)
public String getTransPerson() {
return this.transPerson;
}

public void setTransPerson(String transPerson) {
this.transPerson = transPerson;
}

}


View Code
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐