ibatis-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "leo zhang (JIRA)" <ibatis-...@incubator.apache.org>
Subject [jira] Created: (IBATIS-170) i am not sure it is a bug!
Date Thu, 14 Jul 2005 09:52:10 GMT
i am not sure it is a bug!

         Key: IBATIS-170
         URL: http://issues.apache.org/jira/browse/IBATIS-170
     Project: iBatis for Java
        Type: Bug
  Components: SQL Maps  
    Versions: 2.1.0    
 Environment: windows xp, professional oracle9i, eclipse
    Reporter: leo zhang

i use oralce9i database.  
the table names test;
  col  DATE

sqlmap like this
  <insert id = "product.testinsert" parameterClass="java.lang.String">
    insert into test (col) values (to_date('$timestamp$','yyyy-mm-dd hh:mi:ss'));

java code like this:
     long nCurrentTime = System.currentTimeMillis();
      Timestamp ts = new Timestamp(nCurrentTime);  

the ibatis error is :
- @@{conn-100000} Connection$$
- @@{pstm-100001} PreparedStatement:      insert into test (col) values (to_date('2005-07-14
16:06:48.921','yyyy-mm-dd hh:mi:ss'));   $$
- @@{pstm-100001} Parameters: []$$
- @@{pstm-100001} Types: []$$
- @@@@[@level INFO][@sender com.ctbr.das.database.ibatis.DBBrokerIbatisImpl][@timestamp 2005.07.14
at 16:06:50][@Msg][  
--- The error occurred in com/ctbr/config/ibatis/sqlmap/Product.xml.  
--- The error occurred while applying a parameter map.  
--- Check the product.testinsert-InlineParameterMap.  
--- Check the statement (update failed).  
--- Cause: java.sql.SQLException: ORA-00911: invalid characters.

but  i use toad, the follow statement can execute successful.
 insert into test (col) values (to_date('2005-07-14 16:06:48.921','yyyy-mm-dd hh:mi:ss'));

i am mad! please help me!  

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message