You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Ch...@sybase.com on 2009/02/06 21:00:37 UTC

Calendar result class

This should be so simple but I must be overlooking something. I currently 
have a TypeHandlerCallback defined that handles a TIMESTAMP to a 
java.util.Calendar, and it works perfectly. But now I want to do something 
really simple. I would like to execute the following to get the database 
current time:

SELECT getDate()  -- (Sybase ASE)

and I think that all I need is the following in my SQL Map:

  <select id="getCurrentDBTime" resultClass="java.util.Calendar" >
    SELECT getDate()
  </select>

but this causes the following exception:

--- The error occured while instantiating the result object 
--- Cause: java.lang.RuntimeException: JavaBeansDataExchange could not 
instantiate result class.  Cause: java.lang.IllegalAccessException: Class 
com.ibatis.common.resources.Resources can not access a member of class 
java.util.Calendar with modifiers "protected"


So clearly my TypeHandlerCallback is not being invoked. So what am I 
overlooking? 

Thanks for the help...
Chris