There was no error, and there were a lot of problems after migration. I don't know which of the following experts has seen the following problems: 17: 23: 54,967 ERRORBasicPropertyAccessor: 118 mysqloracle migration
There was no error at all. There were a lot of problems after the migration. I don't know which of the following experts have seen the problem:
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: invalid 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 occurred: 65-org. hibernate. PropertyAccessException: invalid occurred while calling setter of com. ebupt. dataWarehouse. entity. dataQualityMonitoring. MonTaskConEntity. TemporaryIId
17:23:55, 073 ERROR MonitoringTaskConfigurationAction: 54-org. hibernate. PropertyAccessException: invalid occurred while calling setter of com. ebupt. dataWarehouse. entity. entity. MonTaskConEntity. TemporaryIId
The related functions of the DAO layer are written as follows:
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 _ valid tive is_valid tive ,"
+ "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 _ valid tive = '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 _ valid tive = '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 ";
// Non-aggregate function fields must be in group by as if
+ "Group by d1.job _ id, d1.domain _ id, d1.job _ name, d1.is _ valid tive, 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 ();
// Query the total number of rule to filter out
String countSql = "select count (*) FROM dq_conf_rule ";
Query countQuery = session. createSQLQuery (countSql );
Int count = (Number) countQuery. uniqueResult (). intValue ();
// Data sorting, id. job_id value. if the number of rule rows is the total number of rows, it indicates that the job does not have a 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 ();
}
}
The purpose is to display the table data.
Thank you!