Ver Mensaje Individual
  #1 (permalink)  
Antiguo 26/07/2010, 12:11
hectoracosta83
 
Fecha de Ingreso: abril-2010
Mensajes: 9
Antigüedad: 14 años, 1 mes
Puntos: 0
Problema con resultMap

La idea es acceder a la base de datos y traer la concatenacion del nombre y apellido correspondientes al usuario que se le pasa como "id".
Estoy intentando acceder a in Store Procedure pasandole un parametro por Java de esta forma:

public Responsable getResponsable(Long id) {
return (Responsable) getSqlMapClientTemplate().queryForList("getRespons able", id);
}

En el archivo XML que accede al SP se definen los datos que se traerán de la tabla concatenando apellido y nombre:
<resultMap id="resultadoLideresPorSup" class="com.bbva.sgi.model.ResponsableLdd">
<result property="nombreResponsable" column="NOMBRE_RESPONSABLE" columnIndex="1" />
<result property="apellidoResponsable" column="APELLIDO_RESPONSABLE" columnIndex="2" />
</resultMap>

<select id="getLiderPorSupervisor" resultMap="resultadoLideresPorSup">
{call sp_getLiderPorSupervisor(#id#)}
</select>

En la clase ResponsableLdd estan definidos los getters y setters de nombreResponsable y apellidoResponsable
El problemas es el siguiente:
[26/07/10 15:11:43:861 GMT-03:00] 00000034 WebApp E SRVE0026E: [Error de servlet]-[action]: org.springframework.jdbc
.BadSqlGrammarException: SqlMapClient operation; bad SQL grammar []; nested exception is com.ibatis.common.jdbc.exception.Nes
tedSQLException:
--- The error occurred in com/bbva/sgi/model/Responsable.xml.
--- The error occurred while applying a result map.
--- Check the Responsable.resultadoLideresPorSup.
--- Check the result mapping for the 'nombreResponsable' property.
--- Cause: java.sql.SQLException: Invalid column name NOMBRE_RESPONSABLE.
Caused by: com.ibatis.common.jdbc.exception.NestedSQLExceptio n:
--- The error occurred in com/bbva/sgi/model/Responsable.xml.
--- The error occurred while applying a result map.
--- Check the Responsable.resultadoLideresPorSup.
--- Check the result mapping for the 'nombreResponsable' property.
--- Cause: java.sql.SQLException: Invalid column name NOMBRE_RESPONSABLE.

Yo solo quiero recuperar el nombre y el apellido de la tabla...
¿Alguien que me de una idea?