2017-06-09 10 views
-1

我已經在NetbeansIDE8.2中編寫了一個安靜的界面,並且我已經用PostMan App以chorme進行了調試,然後出現了一個異常,我將在這裏顯示圖像: the HTTP ERROR 500當我使用Jeddic時如何解析http 500

,我的代碼是在這裏,我有一個arryList返回到瀏覽器

@Path("/getStu") 
@GET 
public List<TfFreshstudent> queryStudentNoDomitory() 
{ 
    List<TfFreshstudent> studentList= cq.queryFreshstudentNoDomitory(); 
    if (studentList.isEmpty()) { 
     return studentList; 
    } 
    return null; 
} 

,我已經嘗試了自動創建代碼的其他子,誤差也發生了:

@GET 
public List<TfDormitory> getAllTfDormitories() { 
    log.debug("REST request to get all TfDormitories"); 
    List<TfDormitory> tfDormitories = tfDormitoryFacade.findAll(); 
    return tfDormitories; 
} 

我也認爲這也許是返回類型錯誤也許ArryList不能顯示在瀏覽器中,也許我必須將它解析爲JSON類型或響應

+0

a * 500 *是服務器端錯誤消息。事實上,您發佈的「圖片」清楚地表明某些課程缺失 –

回答

0

這是Jeddic是創建實體

package com.freshV3.cart.model; 
import javax.persistence.Basic; 
import javax.persistence.Column; 
import javax.persistence.Entity; 
import javax.persistence.Id; 
import javax.persistence.Table; 
@Entity 
@Table(name = "tf_dormitory") 
public class TfDormitory { 
@Column(name = "id", table = "tf_dormitory", nullable = false, length = 22) 
@Id 
private String id; 

@Column(name = "buildName", table = "tf_dormitory", length = 50) 
@Basic 
private String buildName; 

@Column(name = "comment", table = "tf_dormitory") 
@Basic 
private String comment; 

@Column(name = "freshStudentId", table = "tf_dormitory", length = 22) 
@Basic 
private String freshStudentId; 

@Column(name = "isDelete", table = "tf_dormitory") 
@Basic 
private Integer isDelete; 

@Column(name = "operator", table = "tf_dormitory", length = 20) 
@Basic 
private String operator; 

@Column(name = "roomCode", table = "tf_dormitory", length = 32) 
@Basic 
private String roomCode; 

@Column(name = "roomId", table = "tf_dormitory") 
@Basic 
private String roomId; 

public String getId() { 
    return this.id; 
} 

public void setId(String id) { 
    this.id = id; 
} 

public String getBuildName() { 
    return this.buildName; 
} 

public void setBuildName(String buildName) { 
    this.buildName = buildName; 
} 

public String getComment() { 
    return this.comment; 
} 

public void setComment(String comment) { 
    this.comment = comment; 
} 

public String getFreshStudentId() { 
    return this.freshStudentId; 
} 

public void setFreshStudentId(String freshStudentId) { 
    this.freshStudentId = freshStudentId; 
} 

public Integer getIsDelete() { 
    return this.isDelete; 
} 

public void setIsDelete(Integer isDelete) { 
    this.isDelete = isDelete; 
} 

public String getOperator() { 
    return this.operator; 
} 

public void setOperator(String operator) { 
    this.operator = operator; 
} 

public String getRoomCode() { 
    return this.roomCode; 
} 

public void setRoomCode(String roomCode) { 
    this.roomCode = roomCode; 
} 

public String getRoomId() { 
    return this.roomId; 
} 

public void setRoomId(String roomId) { 
    this.roomId = roomId; 
} 

}

相關問題