Hi All.

I have a problem whit an update statement using iBatis 2.3 and spring 2.0.7

When I try to execute the follow update:
<update id="updateApprofondimento" parameterClass="approfondimentoClass">
        UPDATE approfondimento
        SET 
                nome = #nome:VARCHAR#,
                descrizione = #descrizione:VARCHAR#,
                is_active = #active:BOOL#,
                link = #link:VARCHAR#,
                is_external_link = #externalLink:BOOL#
        WHERE id = #id#
</update>

the follow exception occurs:
Caused by: java.lang.NullPointerException
        at
com.jwiki.ibatis.vo.ApprofondimentoValueObject$$BulkBeanByCGLIB$$191c79d1.getPropertyValues(<generated>)
        at net.sf.cglib.beans.BulkBean.getPropertyValues(BulkBean.java:48)
        at
com.ibatis.sqlmap.engine.accessplan.EnhancedPropertyAccessPlan.getProperties(EnhancedPropertyAccessPlan.java:37)
        at
com.ibatis.sqlmap.engine.exchange.JavaBeanDataExchange.getData(JavaBeanDataExchange.java:91)
        at
com.ibatis.sqlmap.engine.mapping.parameter.BasicParameterMap.getParameterObjectValues(BasicParameterMap.java:132)
        at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeUpdate(GeneralStatement.java:71)
        ... 128 more

All of the properties in the parameterClass haven't null values.
No update transaction are performed.
I don't understand where is the problem.

If can help:

<resultMap id="approfondimento" class="approfondimentoClass">
        <result column="id" property="id" />
        <result column="nome" property="nome" />
        <result column="descrizione" property="descrizione" />
        <result column="is_active" property="active" />
        <result column="link" property="link" />
        <result column="is_external_link" property="externalLink" />
        <result column="numero" property="numero" />
        <result column="create_by" property="createById" />
        <result column="active_by" property="activeById" />
        <result column="activation_date" property="activationDate" />
        <result column="data_creazione" property="dataCreazione" />
        <result column="object_id" property="objectId" />
</resultMap>

Thanks!
Best Regards,

Mauro
-- 
View this message in context: 
http://www.nabble.com/ibatis%3A-problem-with-an-update-tp16734724p16734724.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.

Reply via email to