我是 JDBC,iBatis 的菜鸟。我试图让我的 Java EE 应用程序在 sql 服务器上执行存储的过程,但是服务器抛出了一个奇怪的错误,这对我来说没有任何意义。有人可以帮我理解我做错了什么。
这是错误:
20121221 18:42:38:960 [CONFERENCE] INFO 320 AppController - Error : Error Occurred while Speakers List data retrival: SqlMapClient operation; bad SQL grammar []; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in com/ABCD/conference/model/Conference.xml.
--- The error occurred while applying a parameter map.
--- Check the conference_get_speakers-InlineParameterMap.
--- Check the statement (update procedure failed).
--- Cause: com.microsoft.sqlserver.jdbc.SQLServerException: Could not find stored procedure 'imconference..conference_get_speakers'.
20121221 18:42:38:960 [CONFERENCE] INFO 323 AppController - handleException >>
这是xml文件中的映射:
<resultMap id="result-speakers" class="com.jpmorgan.conference.model.Attendee">
<result property="confId" column="conf_Id" />
<result property="attendeeId" column="attendee_id" />
<result property="firstName" column="first_name" />
<result property="lastName" column="last_name" />
</resultMap>
<procedure id="getSpeakers" resultMap="result-speakers">
{call
imconference..get_speakers_details(#confId#)}
</procedure>
<procedure id="conference_get_speakers" resultMap="result-speakers">
{call
imconference..conference_get_speakers(#confId#)}
</procedure>
我能够在数据库上独立执行存储过程。我想我在映射 xml 文件时犯了一个错误。任何帮助,想法将不胜感激。如果你们需要更多信息,请告诉我。