Sure!
Here you have my Operadores.xml map file. The problem arises when i
discomment out the cacheModel declaration, no matter if i use it in the
select statement or not.
<sqlMap namespace="operadores">
<typeAlias alias="Map" type="java.util.Map" />
<!--
<cacheModel id="cacheConsulta" type="LRU">
<flushInterval minutes="30" />
<flushOnExecute statement="alta"/>
<flushOnExecute statement="baja"/>
<flushOnExecute statement="modificacion"/>
<property name="size" value="100" />
</cacheModel>
-->
<resultMap class="java.util.HashMap" id="resultadoOperador">
<result property="telefono" column="TELEFONO"
javaType="java.lang.String" jdbcType="VARCHAR"/>
<result property="nombre" column="NOMBRE"
javaType="java.lang.String" jdbcType="VARCHAR"/>
<result property="habilitado" column="HABILITADO"
javaType="boolean" jdbcType="INTEGER"
typeHandler="com.isotrol.navantia.sms.accesoBD.dao.ManejadoresTipos.ManejadorTipoBoolean"/>
<result property="periodo_recepcion" column="DIAS_SEMANA"
javaType="int" jdbcType="VARCHAR"
typeHandler="com.isotrol.navantia.sms.accesoBD.dao.ManejadoresTipos.ManejadorTipoPeriodoRecepcion"
/>
<result property="perfil" column="ID_PERFIL" javaType="int"
jdbcType="INTEGER"/>
<result property="id_parque" column="ID_PARQUE"
javaType="java.lang.String" jdbcType="VARCHAR"/>
<result property="horario_recepcion_desde" column="HORA_INI"
javaType="java.lang.String" jdbcType="VARCHAR"/>
<result property="horario_recepcion_hasta" column="HORA_FIN"
javaType="java.lang.String" jdbcType="VARCHAR"/>
<result property="envio_automatico" column="ENVIO_AUTO"
javaType="java.lang.String" jdbcType="VARCHAR"
typeHandler="com.isotrol.navantia.sms.accesoBD.dao.ManejadoresTipos.ManejadorTipoBoolean"/>
<result property="horario_envio_automatico"
column="HORARIO_ENVIO_AUTO" javaType="java.lang.String" jdbcType="VARCHAR"/>
</resultMap>
<select id="consulta" resultMap="resultadoOperador">
<!-- <select id="consulta" parameterClass="Map"
resultClass="java.util.HashMap" cacheModel="cacheConsulta"> -->
SELECT
TELEFONO, NOMBRE, HABILITADO,
DIAS_SEMANA,
ID_PERFIL,
ID_PARQUE,
HORA_INI, HORA_FIN,
ENVIO_AUTO, HORARIO_ENVIO_AUTO
FROM
GSM_V_OPERADORES
</select>
<...>
</sqlMap>
The stacktrace is as follows:
com.ibatis.dao.client.DaoException: Error while configuring DaoManager.
Cause: com.ibatis.common.exception.NestedRuntimeException: Error
occurred. Cause: com.ibatis.common.xml.NodeletException: Error parsing
XML. Cause: com.ibatis.common.exception.NestedRuntimeException: Error
parsing XPath '/sqlMapConfig/end()'. Cause:
com.ibatis.sqlmap.client.SqlMapException: There is no statement named
modificacion in this SqlMap.
Caused by: com.ibatis.sqlmap.client.SqlMapException: There is no
statement named modificacion in this SqlMap.
Caused by: com.ibatis.common.exception.NestedRuntimeException: Error
parsing XPath '/sqlMapConfig/end()'. Cause:
com.ibatis.sqlmap.client.SqlMapException: There is no statement named
modificacion in this SqlMap.
Caused by: com.ibatis.sqlmap.client.SqlMapException: There is no
statement named modificacion in this SqlMap.
Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML.
Cause: com.ibatis.common.exception.NestedRuntimeException: Error parsing
XPath '/sqlMapConfig/end()'. Cause:
com.ibatis.sqlmap.client.SqlMapException: There is no statement named
modificacion in this SqlMap.
Caused by: com.ibatis.sqlmap.client.SqlMapException: There is no
statement named modificacion in this SqlMap.
Caused by: com.ibatis.common.exception.NestedRuntimeException: Error
parsing XPath '/sqlMapConfig/end()'. Cause:
com.ibatis.sqlmap.client.SqlMapException: There is no statement named
modificacion in this SqlMap.
Caused by: com.ibatis.sqlmap.client.SqlMapException: There is no
statement named modificacion in this SqlMap.
Caused by: com.ibatis.common.exception.NestedRuntimeException: Error
occurred. Cause: com.ibatis.common.xml.NodeletException: Error parsing
XML. Cause: com.ibatis.common.exception.NestedRuntimeException: Error
parsing XPath '/sqlMapConfig/end()'. Cause:
com.ibatis.sqlmap.client.SqlMapException: There is no statement named
modificacion in this SqlMap.
Caused by: com.ibatis.sqlmap.client.SqlMapException: There is no
statement named modificacion in this SqlMap.
Caused by: com.ibatis.common.exception.NestedRuntimeException: Error
parsing XPath '/sqlMapConfig/end()'. Cause:
com.ibatis.sqlmap.client.SqlMapException: There is no statement named
modificacion in this SqlMap.
Caused by: com.ibatis.sqlmap.client.SqlMapException: There is no
statement named modificacion in this SqlMap.
Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML.
Cause: com.ibatis.common.exception.NestedRuntimeException: Error parsing
XPath '/sqlMapConfig/end()'. Cause:
com.ibatis.sqlmap.client.SqlMapException: There is no statement named
modificacion in this SqlMap.
Caused by: com.ibatis.sqlmap.client.SqlMapException: There is no
statement named modificacion in this SqlMap.
Caused by: com.ibatis.common.exception.NestedRuntimeException: Error
parsing XPath '/sqlMapConfig/end()'. Cause:
com.ibatis.sqlmap.client.SqlMapException: There is no statement named
modificacion in this SqlMap.
Caused by: com.ibatis.sqlmap.client.SqlMapException: There is no
statement named modificacion in this SqlMap.
Error while configuring DaoManager. Cause:
com.ibatis.common.exception.NestedRuntimeException: Error occurred.
Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.
Cause: com.ibatis.common.exception.NestedRuntimeException: Error parsing
XPath '/sqlMapConfig/end()'. Cause:
com.ibatis.sqlmap.client.SqlMapException: There is no statement named
modificacion in this SqlMap.
Caused by: com.ibatis.sqlmap.client.SqlMapException: There is no
statement named modificacion in this SqlMap.
Caused by: com.ibatis.common.exception.NestedRuntimeException: Error
parsing XPath '/sqlMapConfig/end()'. Cause:
com.ibatis.sqlmap.client.SqlMapException: There is no statement named
modificacion in this SqlMap.
Caused by: com.ibatis.sqlmap.client.SqlMapException: There is no
statement named modificacion in this SqlMap.
Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML.
Cause: com.ibatis.common.exception.NestedRuntimeException: Error parsing
XPath '/sqlMapConfig/end()'. Cause:
com.ibatis.sqlmap.client.SqlMapException: There is no statement named
modificacion in this SqlMap.
Caused by: com.ibatis.sqlmap.client.SqlMapException: There is no
statement named modificacion in this SqlMap.
Caused by: com.ibatis.common.exception.NestedRuntimeException: Error
parsing XPath '/sqlMapConfig/end()'. Cause:
com.ibatis.sqlmap.client.SqlMapException: There is no statement named
modificacion in this SqlMap.
Caused by: com.ibatis.sqlmap.client.SqlMapException: There is no
statement named modificacion in this SqlMap.
Can you see anything?
Niels Beekman escribió:
That should really work out, namespaces are not automatically preprended to the
statement names (they should be IMHO). Can you give us a stacktrace?
Niels
-----Original Message-----
From: Serafín Orillán Chaparro [mailto:[EMAIL PROTECTED]
Sent: dinsdag 27 juni 2006 11:25
To: [email protected]
Subject: Re: Error using caches ("There is no statement named...")
Dont think so. I tried to put the namespace before the statement and
didnt work, neither.
Larry Meadors escribió:
Probably the namespace.
Larry
On 6/26/06, Serafín Orillán Chaparro <[EMAIL PROTECTED]> wrote:
Hi all,
I'm tryin to use cacheModel's but i get an error "There is no statement
named... in this SqlMap". I have 5 differents sqlMap files, and the
setting useStatementNamespaces set to "true". I have no problems when i
execute the select statement without the cacheModel (i have the
declaration commented). But as soon as i discomment the declaration and
it throws an Exception.
Here you have the cacheModel declaration:
<cacheModel id="cacheConsulta" type="LRU">
<flushInterval minutes="30" />
<flushOnExecute statement="alta"/>
<flushOnExecute statement="baja"/>
<flushOnExecute statement="modificacion"/>
<property name="size" value="100" />
</cacheModel>
Is there something that i'm missing?
Thanx a lot in advance!
--
Serafín Orillán Chaparro
Isotrol S.A.
Avda. de la Innovación 1, 3ª planta
+34 955 036 800
e-mail: [EMAIL PROTECTED]
--
Serafín Orillán Chaparro
Isotrol S.A.
Avda. de la Innovación 1, 3ª planta
+34 955 036 800
e-mail: [EMAIL PROTECTED]