ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Balaji" <bal...@objectec.com>
Subject Re: Update Statement Error ?
Date Wed, 26 Apr 2006 14:42:04 GMT
Update Statement Error ?Ali,

It could be because of null value(s) in password date etc. Check the datatype & acceptable
value for fields in db table vs the dto.  Execute the SQL outside ibatis (winsql, plsql etc)
with the values you are passing when this error is occuring.  That should give you a better
error message.

Balaji

  ----- Original Message ----- 
  From: Ali, Mohammed (Liquidity & Risk Technology) 
  To: user-java@ibatis.apache.org 
  Sent: Wednesday, April 26, 2006 9:25 AM
  Subject: Update Statement Error ?


  Hi All, 
  I am getting the following error when calling an Update. I can see UserDTO is passes properly
with data. May be declaration is not right ?

  Error 
  com.ibatis.common.jdbc.exception.NestedSQLException:   
  --- The error occurred in com/ml/camsweb/resources/User.xml.  
  --- The error occurred while applying a parameter map.  
  --- Check the update-InlineParameterMap.  
  --- Check the statement (update failed).  
  --- Cause: java.sql.SQLException: JZ006: Caught IOException: java.io.IOException: JZ0SL:
Unsupported SQL type 0. 
  Caused by: java.sql.SQLException: JZ006: Caught IOException: java.io.IOException: JZ0SL:
Unsupported SQL type 0. 

  Update 
  public void update(UserDTO userDTO) throws SQLException { 
                          try { 
                                  sqlMapCams.startTransaction(); 
                                  sqlMapCams.update("update",userDTO); 
                                  sqlMapCams.commitTransaction(); 
                          } finally{ 
                                  sqlMapCams.endTransaction(); 
                          } 
                  } 

  User.XML 
  <typeAlias alias="UserObject" type="com.ml.camsweb.dto.UserDTO"/> 

  <update id="update" parameterClass="UserObject"> 
          UPDATE users 
          SET 
          first_name = #firstName#, 
          last_name = #lastName#, 
          phone = #phone#, 
          fax = #fax#, 
          e_mail = #email#, 
          location = #location#, 
          address1 = #address1#, 
          address2 = #address2#, 
          city = #city#, 
          state = #state#, 
          zip = #zip#, 
          password = #password#, 
                  password_last_updated = #password_last_updated# 
          WHERE user_id = #userId# 
      </update> 



  Thanks, 
  Ali 
  (201) 671-5499 


------------------------------------------------------------------------------

  If you are not an intended recipient of this e-mail, please notify the sender, delete it
and do not read, act upon, print, disclose, copy, retain or redistribute it. Click here for
important additional terms relating to this e-mail.     http://www.ml.com/email_terms/

------------------------------------------------------------------------------

Mime
View raw message