- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在我的 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/
这个问题已经有答案了: EmailAddress or DataType.Email attribute (3 个回答) 已关闭 3 年前。 我使用了像[EmailAddress]这样的数据属性和[D
我收到此错误: "CS0104: 'DataType' is an ambiguous reference between 'System.ComponentModel.DataAnnotations
1)我目前正在尝试理解以下代码,但我无法理解 void(*func)(void) 的含义,我可以理解我正在尝试保存名为“function”的函数的地址来自 list0513,在 void 指针函数处,
我们可以以某种方式应用这种格式吗? [Display(Name = "Date of Birthday")] [DataType(DataType.Date)] public DateTime DOB
我已按照 ORMLite 文档的规定将我的类型声明为 SERIALIZABLE,但我仍然得到: ORMLite can't store unknown class interface java.io.
嗨。 这就是我想要做的: str2 = "91"; str1 = "19"; var testQuery = from c1 in str1
我在 MVC 5 中使用 ASP.NET 身份。对于密码验证,我在 AccountViewModels.cs 中有以下代码: [Required] [DataType(DataType.Passwor
我试图了解使用之间的主要区别是什么[DataType(DataType.EmailAddress)] & [EmailAddress] . 在模型类中:- public class MYViewMod
使用 DataType Attribute 有什么区别?并传入值 DataType.Phone和 Phone Attribute它继承自 DataType 并自动设置 DataType.Phone?
我的 ViewModel 中有以下字段: [DataType(DataType.Date)] [Display(Name = "Preferred date)")] publi
如果没记错的话,是[DataType(DataType.Currency)]的DataAnnotation的对应部分在 Fluent api 中是 modelBuilder.Entity.Proper
给定一个 pandas.DataFrame带有包含混合数据类型的列,例如 df = pd.DataFrame({'mixed': [pd.Timestamp('2020-10-04'), 999, '
我在电子邮件字段上使用此代码: [Required] [DataType(DataType.EmailAddress)] [Display(Name = "Email addr
我是 NodeJs 开发的新手 我正在使用带有 mysql 和 Sequelize 的 NodeJs 来创建具有这些属性的 Batch 模型。 const Batch = sequelize.defi
我想动态生成我的数据框架构我有以下内容 错误: assert isinstance(dataType, DataType), "dataType should be DataType" Asse
我是 Golang 的新手。抱歉,我仍然对以下两者之间的区别感到困惑: type 和 type = 这是一个例子: package main import "fmt" func main()
当电子邮件地址以数字开头时,DataType DataAnnotation 中 DataType.Email 的内部验证似乎失败了。当具有 1234Something@gmail.com 样式电子邮件
有需求从CSV文件中提取数据,然后将其转换为XML,最终加载到目标中。 CSV文件中的数据为 Number,Email,Email Communication,Member Type,VIN 8532
我正在使用 [DataType(DataType.Date)]关于我们模型中的属性。 如何让 Razor 添加 css 类 datepicker到所有属于 DataType.Date 的文本框特性?
我的表 CalTime 有一个时间数据类型的列 Timespent。它以 HH:MM:SS 格式存储值。请建议如何求和该列的值。 Timespent _______ 00:07:
我是一名优秀的程序员,十分优秀!