error, issue, RnD, notes for my colleagues ... anything related with my job. A good programmer should be a good and fast reader. This log just to cut the costs of my RnD. Nothing personal :)
Monday, 8 October 2012
Ibatis 2: ORA-00911: invalid character error
org.springframework.jdbc.BadSqlGrammarException: SqlMapClient operation; bad SQL grammar []; nested
exception is com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in com/icms/biz/dao/ibatis/maps/StaffExpertise.xml.
--- The error occurred while applying a parameter map.
--- Check the STEXP.getActSEBSId-InlineParameterMap.
--- Check the statement (query failed).
--- Cause: java.sql.SQLException: ORA-00911: invalid character
at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLEx
ceptionTranslator.java:97)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(Abstrac
tFallbackSQLExceptionTranslator.java:72)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(Abstrac
tFallbackSQLExceptionTranslator.java:80)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(Abstrac
tFallbackSQLExceptionTranslator.java:80)
at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:212
)
ERROR ini disebabkan oleh ";", tidak perlu semi-colon dalam Ibatis 2 SQL Mapping.
<select id="STEXP.getActSEBSId" resultMap="ResMap2" parameterClass="java.util.Map">
SELECT se.se_code, se.se_staff_id, se.se_expertise_code, se.se_entry_by, se.se_entry_date, se.se_update_by, se.se_update_date, se.se_ranking, se.se_expertise_area,
se.se_rating. se.se_start_year,
em.em_desc desc_default, em.em_desc_malay desc_malay
FROM staff_expertise se, expertise_main em
WHERE se.se_expertise_code = em.em_code
AND se.se_staff_id = #p_staff_id#
ORDER BY se.se_ranking;
</select>
ORDER BY se.se_ranking; sepatutnya ORDER BY se.se_ranking
Dev Info:
Codename: cv-online
Framework: Ibatis 2, Spring
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment