记录一个sql问题, The error occurred while setting parameters

匿名 (未验证) 提交于 2019-12-02 23:40:02

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.jdbc.UncategorizedSQLException:

Error querying database. Cause: java.sql.SQLException: ORA-12704: 字符集不匹配

The error may exist in file [D:\workspace\workspace-dev2\wizbank_6_git\core\wizbank-web\target\WizBank\WEB-INF\classes\mapper\InstructorInfMapper.xml]

The error may involve com.cwn.wizbank.persistence.InstructorInfMapper.getInstructor-Inline

The error occurred while setting parameters

SQL: select * from ( select iti_ent_id, iti_name, iti_gender, iti_level, NULL as sks_title, iti_main_course, iti_mobile,(select avg(itc_style_score + itc_quality_score + itc_structure_score + itc_interaction_score ) / 4 as score from instructorcomment where itc_iti_ent_id = iti_ent_id ) as iti_score ,iti_training_company,iti_expertise_areas, iti_type_mark, iti_update_datetime ,iti_img,iti_bday,iti_introduction,iti_email,iti_cos_type,iti_type,iti_good_industry,iti_recommend,iti_highest_educational,iti_graduate_institutions,iti_address from instructorinf inner join entity on(iti_ent_id = ent_id and iti_type_mark = ‘EXT’) union select iti_ent_id, cast(usr_display_bil as nvarchar2(255)) as iti_name, cast(usr_gender as nvarchar2(20)) as iti_gender, iti_level, sks_title, iti_main_course, cast(usr_tel_1 as nvarchar2(255)) as iti_mobile,(select avg(itc_style_score + itc_quality_score + itc_structure_score + itc_interaction_score ) / 4 as score from instructorcomment where itc_iti_ent_id = iti_ent_id ) as iti_score ,iti_training_company, iti_expertise_areas, cast(iti_type_mark as nvarchar2(100)) as iti_type_mark, iti_update_datetime ,urx_extra_43 as iti_img,usr_bday as iti_bday,iti_introduction,usr_email as iti_email,iti_cos_type,iti_type,iti_good_industry,iti_recommend,iti_highest_educational,iti_graduate_institutions,iti_address from instructorinf inner join reguser on(iti_ent_id = usr_ent_id) left join reguserskillset on(uss_ent_id = usr_ent_id) left join cmskillset on(uss_ske_id = sks_ske_id and sks_owner_ent_id = 1 and sks_type = ‘SKP’ ) inner join reguserextension on (iti_ent_id = urx_usr_ent_id ) ) ins where ins.iti_ent_id = ?

Cause: java.sql.SQLException: ORA-12704: 字符集不匹配

; uncategorized SQLException for SQL []; SQL state [72000]; error code [12704]; ORA-12704: 字符集不匹配
; nested exception is java.sql.SQLException: ORA-12704: 字符集不匹配

报错的这个sql可以正常执行,在我的数据库也是正常的,可是换了一个数据库后,页面一直报这个错误,这是为什么呢?

文章来源: https://blog.csdn.net/qq_41791705/article/details/91432512
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!