You're probably not posting the full exception stacktrace. Does iBATIS query your type handler? You should handle the null case yourself...
Niels -----Original Message----- From: Härtel, Eric [mailto:[EMAIL PROTECTED] Sent: vrijdag 14 september 2007 16:22 To: [email protected] Subject: TypehandlerCallback Another newbe question I did generate some classes by JAXB, so I have a class Application with member time of XMLGregorianCalendar. In the MS SQLServer database I want to store this object in is column of type 'datetime'. I did implement the TypeHandlerCallback and put the following in the config files in SqlMapConfig.xml =================== <typeHandler javaType="javax.xml.datatype.XMLGregorianCalendar" jdbcType="TIMESTAMP" callback="de.my.package.database.TimeTypeHandlerCallback" /> in SqlMap_Application.xml ========================= <insert id="insertApplication" parameterClass="Application" > insert into APPLICATION ( APPLICATION_TIME ) values ( #time# ) </insert> The typehandler is loaded/constructed but not used during execution. I get the following error: 2007-09-14 16:05:41,530 ERROR - de.my.package.database.DatabaseTest.<init>(DatabaseTest.java:89) [main]: com.ibatis.common.jdbc.exception.NestedSQLException: --- The error occurred in SqlMap_Application.xml. --- The error occurred while applying a parameter map. --- Check the insertApplication-InlineParameterMap. --- Check the parameter mapping for the 'time' property. --- Cause: java.lang.NullPointerException Trying different JDBC types (DATE, TIME) leads to the same result. Can anybody give me a clue, where to look for the problem. greetings, eric
