gpt4 book ai didi

java错误: inconsistent datatypes: expected NUMBER got BINARY

转载 作者:行者123 更新时间:2023-12-01 23:47:40 26 4
gpt4 key购买 nike

我在我的 java 项目中遇到了这个错误。你能帮我吗? Db 是一个预言机。我认为我设置了正确的值,但此外,我一次又一次地收到此错误。哪一行有问题我不明白。我多次更改了这些值并尝试过,但不幸的是它没有说哪一行是错误的?

2019-10-04 11:05:23.903  WARN 15556 --- [           main] o.h.engine.jdbc.spi.SqlExceptionHelper   : SQL Error: 932, SQLState: 42000
2019-10-04 11:05:23.907 ERROR 15556 --- [ main] o.h.engine.jdbc.spi.SqlExceptionHelper : ORA-00932: inconsistent datatypes: expected NUMBER got BINARY

创建方法:

@Test
public void create() throws ParseException {
String dateInString = "31-08-1982";
SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy");
Date date7 = sdf.parse(dateInString);

SemesterBeginningOperations data = new SemesterBeginningOperations();

data.setDtId(6494);
data.setAsonId(114);
data.setCrte(date7);
data.setStae(date7);
data.setEnte(date7);
data.setEage(9);
data.setClatage(9);
data.setPan(9);
data.setPadealGre(9);
data.setRessade(9);
data.setDation(9);
data.setDal(9);
data.setDaa(9);
data.setDtionta2(9);
data.setHal(9);
data.setHoota(9);
data.setHoQta2(9);
data.setDaiour(9);
data.setDaiuota(9);
data.setDaiAuota2(9);
data.setPrevId(183);
data.setPticctage(2);
data.setPatlaed(2);
data.setAntge(1);
data.setFalPge(1);
data.setMinit(2);
data.setStee(1);
data.setMinPa2(3);
data.setMinit2(5);
data.setMo(4);
data.setMinPasTp(3);
data.setPared(6);

semesterBeginningOperationsRepository.create(data);
}

我的 table :

 COLUMN_NAME   DATA_TYPE    NULLABLE 
HID NUMBER(10,0) No
BID NUMBER(10,0) No
AID NUMBER(10,0) No
YTARIHI DATE No
BTARIHI DATE Yes
BITARIHI DATE Yes
SE NUMBER(3,0) No
SDE NUMBER(3,0) No
GU NUMBER(3,0) No
GR NUMBER(3,0) No
BER NUMBER(3,0) No
GN NUMBER(4,0) No
GBER NUMBER(10,0) No
GMBER NUMBER(10,0) No
GUMBER NUMBER(10,0) No
SMBER NUMBER(10,0) No
SAR NUMBER(10,0) No
SAAR NUMBER(10,0) No
GUAT NUMBER(3,0) No
GUJAN NUMBER(3,0) No
GU2 NUMBER(3,0) No
ONCMID NUMBER(10,0) Yes
PARTIE NUMBER(3,0) No
BUTTU NUMBER(3,0) No
DEE NUMBER(3,0) No
FDE NUMBER(3,0) No
BUU NUMBER(3,0) No
OGRIN NUMBER(3,0) No
BUU NUMBER(3,0) Yes
BUGU NUMBER(3,0) Yes
MER NUMBER(3,0) Yes
BUP_TP NUMBER(1,0) No
PARUN NUMBER(1,0) No

SemesterBeginningOperations 类:

package prep.core.semester.definition.domain.model.semester;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
@Entity
@Table(name = "HAZ_DONEM", catalog = "", schema = "DBO")
public class SemesterBeginningOperations {
@Id
@Basic(optional = false)
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "HAZDONEMID")
private Integer semesterId;

@Basic(optional = false)
@Column(name = "BOLUMID")
private Integer departmentId;

@Column(name = "AKADEMIKSEZONID")
private Integer academicSeasonId;

@Temporal(TemporalType.DATE)
@Column(name = "YARATILISTARIHI")
private Date createDate;

@Column(name = "BASLAMATARIHI")
private Date startDate;

@Column(name = "BITISTARIHI")
private Date endDate;

@Column(name = "SINAV_YUZDE")
private Integer examPercentage;

@Column(name = "SINIFCALISMASI_YUZDE")
private Integer classStudyPercentage;

@Column(name = "GECME_MIN_BASARINOTU")
private Integer passGradeMin;

@Column(name = "GECME_MIN_FINALNOTU")
private Integer passGradeMinFinalGrade;

@Column(name = "BUT_MIN_BASARINOTU")
private Integer resitMinPassGrade;

@Column(name = "GUNLUK_PARTICIPATION")
private Integer dailyParticipation;

@Column(name = "GUN_TOPLAM")
private Integer dayTotal;

@Column(name = "GUN_TOPLAM_EKKONTENJAN")
private Integer dayTotalAdditionalQuota;

@Column(name = "GUN_TOPLAM_EKKONTENJAN2")
private Integer dayTotalAdditionalQuota2;

@Column(name = "SAAT_TOPLAM")
private Integer hourTotal;

@Column(name = "SAAT_TOPLAM_EKKONTENJAN")
private Integer hourTotalAdditionalQuota;

@Column(name = "SAAT_TOPLAM_EKKONTENJAN2")
private Integer hourTotalAdditionalQuota2;

@Column(name = "GUNLUK_SAAT")
private Integer dailyHour;

@Column(name = "GUNLUK_SAAT_EKKONTENJAN")
private Integer dailyHourAdditionalQuota;

@Column(name = "GUNLUK_SAAT_EKKONTENJAN2")
private Integer dailyHourAdditionalQuota2;

@Column(name = "ONCEKI_HAZDONEMID")
private Integer previousSemesterId;

@Column(name = "PARTICIPATION_YUZDE")
private Integer participationPercentage;

@Column(name = "BUT_GECMENOTU")
private Integer passGradeForResit;

@Column(name = "DEVAMSIZLIK_YUZDE")
private Integer absensePercentage;

@Column(name = "FINAL_YUZDE")
private Integer finalPercentage;

@Column(name = "BUT_MIN_FINALNOTU")
private Integer minFinalGradeForResit;

@Column(name = "OGRENCIGOREBILSIN")
private Integer studentCanSee;

@Column(name = "BUT2_MIN_BASARINOTU")
private Integer minPassGradeForResit2;

@Column(name = "BUT2_MIN_FINALNOTU")
private Integer minFinalGradeForResit2;

@Column(name = "MODUL")
private Integer module;

@Column(name = "BUT_GECMENOTU_HSP_TP")
private Integer minPassGradeForResitHspTp;

@Column(name = "PARTICIPATION_GORUNSUN")
private Integer participationTotalDisplayed;


public SemesterBeginningOperations() {

}


public SemesterBeginningOperations(Integer semesterId, Integer departmentId, Integer academicSeasonId, Date createDate,
Date startDate, Date endDate, Integer examPercentage, Integer classStudyPercentage, Integer passGradeMin,
Integer passGradeMinFinalGrade, Integer resitMinPassGrade, Integer dailyParticipation, Integer dayTotal,
Integer dayTotalAdditionalQuota, Integer dayTotalAdditionalQuota2, Integer hourTotal, Integer hourTotalAdditionalQuota,
Integer hourTotalAdditionalQuota2, Integer dailyHour, Integer dailyHourAdditionalQuota, Integer dailyHourAdditionalQuota2,
Integer previousSemesterId, Integer participationPercentage, Integer passGradeForResit, Integer absensePercentage,
Integer finalPercentage, Integer minFinalGradeForResit, Integer studentCanSee, Integer minPassGradeForResit2,
Integer minFinalGradeForResit2, Integer module, Integer minPassGradeForResitHspTp, Integer participationTotalDisplayed) {
super();
this.semesterId = semesterId;
this.departmentId = departmentId;
this.academicSeasonId = academicSeasonId;
this.createDate = createDate;
this.startDate = startDate;
this.endDate = endDate;
this.examPercentage = examPercentage;
this.classStudyPercentage = classStudyPercentage;
this.passGradeMin = passGradeMin;
this.passGradeMinFinalGrade = passGradeMinFinalGrade;
this.resitMinPassGrade = resitMinPassGrade;
this.dailyParticipation = dailyParticipation;
this.dayTotal = dayTotal;
this.dayTotalAdditionalQuota = dayTotalAdditionalQuota;
this.dayTotalAdditionalQuota2 = dayTotalAdditionalQuota2;
this.hourTotal = hourTotal;
this.hourTotalAdditionalQuota = hourTotalAdditionalQuota;
this.hourTotalAdditionalQuota2 = hourTotalAdditionalQuota2;
this.dailyHour = dailyHour;
this.dailyHourAdditionalQuota = dailyHourAdditionalQuota;
this.dailyHourAdditionalQuota2 = dailyHourAdditionalQuota2;
this.previousSemesterId = previousSemesterId;
this.participationPercentage = participationPercentage;
this.passGradeForResit = passGradeForResit;
this.absensePercentage = absensePercentage;
this.finalPercentage = finalPercentage;
this.minFinalGradeForResit = minFinalGradeForResit;
this.studentCanSee = studentCanSee;
this.minPassGradeForResit2 = minPassGradeForResit2;
this.minFinalGradeForResit2 = minFinalGradeForResit2;
this.module = module;
this.minPassGradeForResitHspTp = minPassGradeForResitHspTp;
this.participationTotalDisplayed = participationTotalDisplayed;
}



public Integer getSemesterId() {
return semesterId;
}

public void setSemesterId(Integer semesterId) {
this.semesterId = semesterId;
}

public Integer getDepartmentId() {
return departmentId;
}

public void setDepartmentId(Integer departmentId) {
this.departmentId = departmentId;
}

public Integer getAcademicSeasonId() {
return academicSeasonId;
}

public void setAcademicSeasonId(Integer academicSeasonId) {
this.academicSeasonId = academicSeasonId;
}

public Date getCreateDate() {
return createDate;
}

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

public Date getStartDate() {
return startDate;
}

public void setStartDate(Date startDate) {
this.startDate = startDate;
}

public Date getEndDate() {
return endDate;
}

public void setEndDate(Date endDate) {
this.endDate = endDate;
}

public Integer getExamPercentage() {
return examPercentage;
}

public void setExamPercentage(Integer examPercentage) {
this.examPercentage = examPercentage;
}

public Integer getClassStudyPercentage() {
return classStudyPercentage;
}

public void setClassStudyPercentage(Integer classStudyPercentage) {
this.classStudyPercentage = classStudyPercentage;
}

public Integer getPassGradeMin() {
return passGradeMin;
}

public void setPassGradeMin(Integer passGradeMin) {
this.passGradeMin = passGradeMin;
}

public Integer getPassGradeMinFinalGrade() {
return passGradeMinFinalGrade;
}

public void setPassGradeMinFinalGrade(Integer passGradeMinFinalGrade) {
this.passGradeMinFinalGrade = passGradeMinFinalGrade;
}

public Integer getResitMinPassGrade() {
return resitMinPassGrade;
}

public void setResitMinPassGrade(Integer resitMinPassGrade) {
this.resitMinPassGrade = resitMinPassGrade;
}

public Integer getDailyParticipation() {
return dailyParticipation;
}

public void setDailyParticipation(Integer dailyParticipation) {
this.dailyParticipation = dailyParticipation;
}

public Integer getDayTotal() {
return dayTotal;
}

public void setDayTotal(Integer dayTotal) {
this.dayTotal = dayTotal;
}

public Integer getDayTotalAdditionalQuota() {
return dayTotalAdditionalQuota;
}

public void setDayTotalAdditionalQuota(Integer dayTotalAdditionalQuota) {
this.dayTotalAdditionalQuota = dayTotalAdditionalQuota;
}

public Integer getDayTotalAdditionalQuota2() {
return dayTotalAdditionalQuota2;
}

public void setDayTotalAdditionalQuota2(Integer dayTotalAdditionalQuota2) {
this.dayTotalAdditionalQuota2 = dayTotalAdditionalQuota2;
}

public Integer getHourTotal() {
return hourTotal;
}

public void setHourTotal(Integer hourTotal) {
this.hourTotal = hourTotal;
}

public Integer getHourTotalAdditionalQuota() {
return hourTotalAdditionalQuota;
}

public void setHourTotalAdditionalQuota(Integer hourTotalAdditionalQuota) {
this.hourTotalAdditionalQuota = hourTotalAdditionalQuota;
}

public Integer getHourTotalAdditionalQuota2() {
return hourTotalAdditionalQuota2;
}

public void setHourTotalAdditionalQuota2(Integer hourTotalAdditionalQuota2) {
this.hourTotalAdditionalQuota2 = hourTotalAdditionalQuota2;
}

public Integer getDailyHour() {
return dailyHour;
}

public void setDailyHour(Integer dailyHour) {
this.dailyHour = dailyHour;
}

public Integer getDailyHourAdditionalQuota() {
return dailyHourAdditionalQuota;
}

public void setDailyHourAdditionalQuota(Integer dailyHourAdditionalQuota) {
this.dailyHourAdditionalQuota = dailyHourAdditionalQuota;
}

public Integer getDailyHourAdditionalQuota2() {
return dailyHourAdditionalQuota2;
}

public void setDailyHourAdditionalQuota2(Integer dailyHourAdditionalQuota2) {
this.dailyHourAdditionalQuota2 = dailyHourAdditionalQuota2;
}

public Integer getPreviousSemesterId() {
return previousSemesterId;
}

public void setPreviousSemesterId(Integer previousSemesterId) {
this.previousSemesterId = previousSemesterId;
}

public Integer getParticipationPercentage() {
return participationPercentage;
}

public void setParticipationPercentage(Integer participationPercentage) {
this.participationPercentage = participationPercentage;
}

public Integer getPassGradeForResit() {
return passGradeForResit;
}

public void setPassGradeForResit(Integer passGradeForResit) {
this.passGradeForResit = passGradeForResit;
}

public Integer getAbsensePercentage() {
return absensePercentage;
}

public void setAbsensePercentage(Integer absensePercentage) {
this.absensePercentage = absensePercentage;
}

public Integer getFinalPercentage() {
return finalPercentage;
}

public void setFinalPercentage(Integer finalPercentage) {
this.finalPercentage = finalPercentage;
}

public Integer getMinFinalGradeForResit() {
return minFinalGradeForResit;
}

public void setMinFinalGradeForResit(Integer minFinalGradeForResit) {
this.minFinalGradeForResit = minFinalGradeForResit;
}

public Integer getStudentCanSee() {
return studentCanSee;
}

public void setStudentCanSee(Integer studentCanSee) {
this.studentCanSee = studentCanSee;
}

public Integer getMinPassGradeForResit2() {
return minPassGradeForResit2;
}

public void setMinPassGradeForResit2(Integer minPassGradeForResit2) {
this.minPassGradeForResit2 = minPassGradeForResit2;
}

public Integer getMinFinalGradeForResit2() {
return minFinalGradeForResit2;
}

public void setMinFinalGradeForResit2(Integer minFinalGradeForResit2) {
this.minFinalGradeForResit2 = minFinalGradeForResit2;
}

public Integer getModule() {
return module;
}

public void setModule(Integer module) {
this.module = module;
}

public Integer getMinPassGradeForResitHspTp() {
return minPassGradeForResitHspTp;
}

public void setMinPassGradeForResitHspTp(Integer minPassGradeForResitHspTp) {
this.minPassGradeForResitHspTp = minPassGradeForResitHspTp;
}


public Integer getParticipationTotalDisplayed() {
return participationTotalDisplayed;
}


public void setParticipationTotalDisplayed(Integer participationTotalDisplayed) {
this.participationTotalDisplayed = participationTotalDisplayed;
}


@Override
public String toString() {
return "SemesterBeginningOperations [semesterId=" + semesterId + ", departmentId=" + departmentId
+ ", academicSeasonId=" + academicSeasonId + ", createDate=" + createDate + ", startDate=" + startDate
+ ", endDate=" + endDate + ", examPercentage=" + examPercentage + ", classStudyPercentage="
+ classStudyPercentage + ", passGradeMin=" + passGradeMin + ", passGradeMinFinalGrade="
+ passGradeMinFinalGrade + ", resitMinPassGrade=" + resitMinPassGrade + ", dailyParticipation="
+ dailyParticipation + ", dayTotal=" + dayTotal + ", dayTotalAdditionalQuota=" + dayTotalAdditionalQuota
+ ", dayTotalAdditionalQuota2=" + dayTotalAdditionalQuota2 + ", hourTotal=" + hourTotal
+ ", hourTotalAdditionalQuota=" + hourTotalAdditionalQuota + ", hourTotalAdditionalQuota2="
+ hourTotalAdditionalQuota2 + ", dailyHour=" + dailyHour + ", dailyHourAdditionalQuota="
+ dailyHourAdditionalQuota + ", dailyHourAdditionalQuota2=" + dailyHourAdditionalQuota2
+ ", previousSemesterId=" + previousSemesterId + ", participationPercentage=" + participationPercentage
+ ", passGradeForResit=" + passGradeForResit + ", absensePercentage=" + absensePercentage
+ ", finalPercentage=" + finalPercentage + ", minFinalGradeForResit=" + minFinalGradeForResit
+ ", studentCanSee=" + studentCanSee + ", minPassGradeForResit2=" + minPassGradeForResit2
+ ", minFinalGradeForResit2=" + minFinalGradeForResit2 + ", module=" + module
+ ", minPassGradeForResitHspTp=" + minPassGradeForResitHspTp + ", participationTotalDisplayed="
+ participationTotalDisplayed + "]";
}

}

最佳答案

这通常是由一个已知​​问题引起的,其中数据库列被定义为 NUMBER,但试图将 null 插入其中。如果您使用整数值,请确保它们已初始化为实际值并且不为空。

这可能是这里的问题,但很难分辨,因为方法的名称和数据库列的名称不匹配,并且很难交叉检查所有值是否已初始化。

关于java错误: inconsistent datatypes: expected NUMBER got BINARY,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58232707/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com