您好,欢迎访问一九零五行业门户网

项目从mysql迁移到oracle报错

mysqloracle迁移
本来没有一点错误,迁移之后出现了很多,不知道哪位大神见过下面的问题:
17:23:54,967 error basicpropertyaccessor:118 - illegalargumentexception in class: com.ebupt.datawarehouse.entity.dataqualitymonitoring.montaskconentity, setter method of property: temporaryiid
17:23:54,995 error basicpropertyaccessor:122 - expected type: int, actual value: java.math.bigdecimal
17:23:55,000 debug connectionmanager:325 - transaction completed on session with on_close connection release mode; be sure to close the session to release jdbc resources!
17:23:55,006 error montaskcondao:101 - org.hibernate.propertyaccessexception: illegalargumentexception occurred while calling setter of com.ebupt.datawarehouse.entity.dataqualitymonitoring.montaskconentity.temporaryiid
17:23:55,009 debug connectionmanager:464 - releasing jdbc connection [ (open preparedstatements: 0, globally: 0) (open resultsets: 0, globally: 0)]
17:23:55,024 debug connectionmanager:325 - transaction completed on session with on_close connection release mode; be sure to close the session to release jdbc resources!
17:23:55,071 error dataqualitymonitoringimpl:65 - org.hibernate.propertyaccessexception: illegalargumentexception occurred while calling setter of com.ebupt.datawarehouse.entity.dataqualitymonitoring.montaskconentity.temporaryiid
17:23:55,073 error monitoringtaskconfigurationaction:54 - org.hibernate.propertyaccessexception: illegalargumentexception occurred while calling setter of com.ebupt.datawarehouse.entity.dataqualitymonitoring.montaskconentity.temporaryiid
dao层的相关函数是这样写的:
public list getmontaskconlist() throws exception {
session session = sessionfactory.opensession();
string sql = select d1.domain_id temporaryiid,
+ d1.job_id temporaryid,
+ d1.job_name job_name,
+ d1.is_effective is_effective,
+ d1.object_type object_type,
+ d1.object_name object_name,
+ d1.object_ename object_ename,
+d1.object_location object_location ,
+d1.time_field time_field,
+ count(d2.rule_id) columnnum
+ from dq_conf_jobs d1, dq_conf_rule d2
//+ where (d1.job_id = d2.job_id or d1.job_id not in (select job_id from dq_conf_rule)) and d2.is_effective = '1'
//+ where ((d1.job_id = d2.job_id and d1.domain_id = d2.domain_id) or d1.job_id not in (select job_id from dq_conf_rule)) and d2.is_effective = '1'
+ where d1.job_id = d2.job_id or d1.job_id not in (select job_id from dq_conf_rule)
//-- + group by d1.job_id;
//非聚合函数字段都要在group by里面好像
+ group by d1.job_id,d1.domain_id,d1.job_name,d1.is_effective,d1.object_type,d1.object_name,d1.object_ename,d1.object_location,d1.time_field;
//string sql = ;
try {
query query = session.createsqlquery(sql)
.addscalar(temporaryiid)
.addscalar(temporaryid)
.addscalar(job_name)
.addscalar(object_type)
.addscalar(object_name)
.addscalar(is_effective)
.addscalar(object_ename)
.addscalar(object_location)
.addscalar(time_field)
.addscalar(columnnum, hibernate.integer)
.setresulttransformer(transformers.aliastobean(montaskconentity.class));
list resultlist = query.list();
//查询rule总数,进行过滤
string countsql = select count(*) from dq_conf_rule;
query countquery = session.createsqlquery(countsql);
int count = ((number) countquery.uniqueresult()).intvalue();
//数据整理,id.job_id的赋值,如果rule行数为总行数,则表明该job并没有rule
if (resultlist != null && resultlist.size() > 0) {
for (montaskconentity entity : resultlist) {
if (entity.getcolumnnum() == count) {
entity.setcolumnnum(0);
}
montaskconentityid identity = new montaskconentityid();
identity.setjob_id(entity.gettemporaryid());
identity.setdomain_id(entity.gettemporaryiid());
entity.setid(identity);
}
}
return resultlist;
} catch (exception e) {
log.error(e);
throw e;
} finally {
session.close();
}
}
目的是把表格的数据获取显现出来
谢谢大家
其它类似信息

推荐信息