# # # Cause:java.lang.reflect.UndeclaredThrowableException caused by: Org.apache.ibatis.exceptions.PersistenceException: # # # Error querying database. cause:java.lang.reflect.undeclaredthrowableexception### the error may existinch file[E:\codeBase\top713\superrescue-service\target\classes\mybatis\qc\techserviceeffiserviceentitymapper.xml]### the error may involve com.jn.ssr.superrescue.web.serviceeffi.dao.techserviceeffiserviceentitymapper.findtecheffi### the error occurred whileexecuting a query caused by:net.sf.jsqlparser.parser.ParseException:Encountered" "(" "(""At line2, column8. Was expecting one of:<EOF>" as" ..." Do" ..." any" ..."KEY" ..."PERCENT" ..."END"...
MyBatis error, the execution of SQL in Navicat can be
Then write a simple SQL in <select></select>, initiate the sentiment, SQL can execute, explain mapper mapping and resultmap and Parmatertype and so on no error
Delete the fields of a SQL field and then execute it to determine which field is wrong and finally find out
SUM (o.service_type!='TC' as Repair_number,
This field, as if the MyBatis does not support the format of SUM (column name)
Finally, modify this field to:
(Selectcountfromwhere service_type!=and= as Repair_number,
You can do it.
# # Cause:java.lang.reflect.UndeclaredThrowableException