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 sepgs2004 <gn...@gmail.com> on 2007/06/28 08:08:55 UTC

This is really weird...dateformat mapping exception on Integer parameter class

EXCEPTION

007-06-27 16:04:59,339 INFO  [STDOUT] 16:04:59,339 INFO  [LService] In
Delete License
2007-06-27 16:04:59,339 INFO  [myservice.LService] In Delete License
2007-06-27 16:05:01,089 INFO  [STDOUT] 16:05:01,089 ERROR [LService] Error
Failed to delete - id [deleteLicenseByLicenseId] - parameterObject [83638]. 
Cause: com.ibatis.common.jdbc.exception.NestedSQLException:   
--- The error occurred in ../../sqlmapdao/sql/L.xml.  
--- The error occurred while applying a parameter map.  
--- Check the deleteLicenseByLicenseId-InlineParameterMap.  
--- Check the statement (update failed).  
--- Cause: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
JDBC][SQLServer]Syntax error converting datetime from character string.
Caused by: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
JDBC][SQLServer]Syntax error converting datetime from character string.
2007-06-27 16:05:01,089 ERROR [LService] Error Failed to delete - id
[deleteLicenseByLicenseId] - parameterObject [83638].  Cause:
com.ibatis.common.jdbc.exception.NestedSQLException:   
--- The error occurred in ../../sqlmapdao/sql/L.xml
--- The error occurred while applying a parameter map.  
--- Check the deleteLicenseByLicenseId-InlineParameterMap.  
--- Check the statement (update failed).  
--- Cause: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
JDBC][SQLServer]Syntax error converting datetime from character string.
Caused by: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
JDBC][SQLServer]Syntax error converting datetime from character string.
2007-06-27 16:05:01,089 INFO  [STDOUT] 16:05:01,089 ERROR [LService]
Exception Failed to delete - id [deleteLicenseByLicenseId] - parameterObject
[83638].  Cause: com.ibatis.common.jdbc.exception.NestedSQLException:   
--- The error occurred in ../../sqlmapdao/sql/L.xml  
--- The error occurred while applying a parameter map.  
--- Check the deleteLicenseByLicenseId-InlineParameterMap. 

If we look at teh query in my L.xml

<delete id="deleteLicenseByLicenseId" parameterClass="java.lang.Integer">
<![CDATA[
			DELETE FROM
				space.table_license
			WHERE
				license_id = #value#
]]>
</delete>

Is there any posibility this could happen. Please give me your suggestions
and thoughts. This was working perfectly. Now this is an SQL Server 2000
client. This queries were working in our local SQL Server database (may not
be the SQL SERVER 2000). Even if the drivers are different, it should not
complain about datatime exception in Integer parameter class.
I verified that there is only one query and only one DAO mapping etc of this
type.
There was a Cache Model used in the XML, however not for this query as you
can see.

Could you guys give me some suggestions or thoughts.

-- 
View this message in context: http://www.nabble.com/This-is-really-weird...dateformat-mapping-exception-on-Integer-parameter-class-tf3992606.html#a11337562
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


Re: This is really weird...dateformat mapping exception on Integer parameter class

Posted by sepgs2004 <gn...@gmail.com>.
Yes, as Gwyn mentioned, it is the trigger.

Thank you.



Gwyn wrote:
> 
> On Thursday, June 28, 2007, 7:46:22 AM, sepgs2004
> <gn...@gmail.com> wrote:
> 
>> EXCEPTION
> 
>> --- Cause: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
>> JDBC][SQLServer]Syntax error converting datetime from character string.
> ...
> 
>> If we look at teh query in my L.xml
> 
>> <delete id="deleteLicenseByLicenseId"
>> parameterClass="java.lang.Integer">
>> <![CDATA[
>>                         DELETE FROM
>>                                 space.table_license
>>                         WHERE
>>                                 license_id = #value#
> ]]>>
>> </delete>
> 
> ...
> 
>> Could you guys give me some suggestions or thoughts.
> 
> My /guess/ would be a trigger or linked table or similar in the
> production DB causing an issue, if only because I can't think of
> anything else!
> 
> My approach would be to enable logging of the actual SQL being sent
> then try & reproduce it, first via a commandline tool then if that
> didn't show anything, using a Java test app & the same JDBC driver.
> 
> /Gwyn
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/This-is-really-weird...dateformat-mapping-exception-on-Integer-parameter-class-tf3992606.html#a11344208
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


Re: This is really weird...dateformat mapping exception on Integer parameter class

Posted by Gwyn Evans <gw...@gmail.com>.
On Thursday, June 28, 2007, 7:46:22 AM, sepgs2004 <gn...@gmail.com> wrote:

> EXCEPTION

> --- Cause: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
> JDBC][SQLServer]Syntax error converting datetime from character string.
...

> If we look at teh query in my L.xml

> <delete id="deleteLicenseByLicenseId"
> parameterClass="java.lang.Integer">
> <![CDATA[
>                         DELETE FROM
>                                 space.table_license
>                         WHERE
>                                 license_id = #value#
]]>>
> </delete>

...

> Could you guys give me some suggestions or thoughts.

My /guess/ would be a trigger or linked table or similar in the
production DB causing an issue, if only because I can't think of
anything else!

My approach would be to enable logging of the actual SQL being sent
then try & reproduce it, first via a commandline tool then if that
didn't show anything, using a Java test app & the same JDBC driver.

/Gwyn