You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "leo zhang (JIRA)" <ib...@incubator.apache.org> on 2005/07/14 11:52:10 UTC
[jira] Created: (IBATIS-170) i am not sure it is a bug!
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;
CREATE TABLE 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'));
</insert>
java code like this:
......
long nCurrentTime = System.currentTimeMillis();
Timestamp ts = new Timestamp(nCurrentTime);
broker.insert("product.testinsert",ts.toLocaleString());
......
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!
leo
cszhzleo@msn.com
cszhz@126.com
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
Re: [jira] Created: (IBATIS-170) i am not sure it is a bug!
Posted by Larry Meadors <la...@gmail.com>.
Why are you inserting a date as a string?
<insert id="product.testinsert">
insert into test (col) values (#value:TIMESTAMP#);
</insert>
long nCurrentTime = System.currentTimeMillis();
Date date = new Date(nCurrentTime);
broker.insert("product.testinsert",date);
That should work just fine.
Larry
On 7/14/05, leo zhang (JIRA) <ib...@incubator.apache.org> wrote:
> 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;
> CREATE TABLE 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'));
> </insert>
>
> java code like this:
> ......
> long nCurrentTime = System.currentTimeMillis();
> Timestamp ts = new Timestamp(nCurrentTime);
> broker.insert("product.testinsert",ts.toLocaleString());
Re: [jira] Commented: (IBATIS-170) i am not sure it is a bug!
Posted by Darek Dober <do...@op.pl>.
Well
First of all, I'm not the author of that post
I only give some extra help to ensure that, in my opinion that's not a bug:)
What's more, I totally agree with you
Cheers
Darek Dober
----- Original Message -----
From: "Larry Meadors" <la...@gmail.com>
To: <us...@ibatis.apache.org>
Sent: Thursday, July 14, 2005 2:21 PM
Subject: Re: [jira] Commented: (IBATIS-170) i am not sure it is a bug!
I am not an oracle guy, so maybe i am missing something really
obvious...but why would you do this as a string? It just seems like a
really fragile way to deal with this situation.
Larry
On 7/14/05, Darek Dober <do...@op.pl> wrote:
>
> I think, it is not a bug :)
>
> It doesn't work for me.
>
> But this does
> insert into testddo (col) values (to_date('2005-07-14
16:06:48','yyyy-mm-dd
> hh24:mi:ss'));
>
> hours: 16 should be declared as HH24 not hh
>
> Anyway:)
>
> Darek Dober
>
>
>
>
>
>
>
> ----- Original Message -----
> From: "Larry Meadors" <la...@gmail.com>
> To: <de...@ibatis.apache.org>; <us...@ibatis.apache.org>;
> <us...@ibatis.apache.org>
> Sent: Thursday, July 14, 2005 1:51 PM
> Subject: Re: [jira] Commented: (IBATIS-170) i am not sure it is a bug!
>
>
> PLEASE! PLEASE! PLEASE!
>
> If you are not 99.999% sure it is a bug, do not put it in JIRA.
>
> Larry
>
> On 7/14/05, leo zhang (JIRA) <ib...@incubator.apache.org> wrote:
> > [
>
http://issues.apache.org/jira/browse/IBATIS-170?page=comments#action_12315824 ]
> >
> > leo zhang commented on IBATIS-170:
> > ----------------------------------
> >
> > sorry, the sql statement is this:
> > insert into test (col) values (to_date('2005-07-14 16:06:48','yyyy-mm-dd
> hh:mi:ss'));
> >
> > > 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;
> > > CREATE TABLE 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'));
> > > </insert>
> > > java code like this:
> > > ......
> > > long nCurrentTime = System.currentTimeMillis();
> > > Timestamp ts = new Timestamp(nCurrentTime);
> > > broker.insert("product.testinsert",ts.toLocaleString());
> > > ......
> > > 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!
> > > leo
> > > cszhzleo@msn.com
> > > cszhz@126.com
> >
> > --
> > This message is automatically generated by JIRA.
> > -
> > If you think it was sent incorrectly contact one of the administrators:
> > http://issues.apache.org/jira/secure/Administrators.jspa
> > -
> > For more information on JIRA, see:
> > http://www.atlassian.com/software/jira
> >
> >
>
>
Re: [jira] Commented: (IBATIS-170) i am not sure it is a bug!
Posted by Larry Meadors <la...@gmail.com>.
I am not an oracle guy, so maybe i am missing something really
obvious...but why would you do this as a string? It just seems like a
really fragile way to deal with this situation.
Larry
On 7/14/05, Darek Dober <do...@op.pl> wrote:
>
> I think, it is not a bug :)
>
> It doesn't work for me.
>
> But this does
> insert into testddo (col) values (to_date('2005-07-14 16:06:48','yyyy-mm-dd
> hh24:mi:ss'));
>
> hours: 16 should be declared as HH24 not hh
>
> Anyway:)
>
> Darek Dober
>
>
>
>
>
>
>
> ----- Original Message -----
> From: "Larry Meadors" <la...@gmail.com>
> To: <de...@ibatis.apache.org>; <us...@ibatis.apache.org>;
> <us...@ibatis.apache.org>
> Sent: Thursday, July 14, 2005 1:51 PM
> Subject: Re: [jira] Commented: (IBATIS-170) i am not sure it is a bug!
>
>
> PLEASE! PLEASE! PLEASE!
>
> If you are not 99.999% sure it is a bug, do not put it in JIRA.
>
> Larry
>
> On 7/14/05, leo zhang (JIRA) <ib...@incubator.apache.org> wrote:
> > [
> http://issues.apache.org/jira/browse/IBATIS-170?page=comments#action_12315824 ]
> >
> > leo zhang commented on IBATIS-170:
> > ----------------------------------
> >
> > sorry, the sql statement is this:
> > insert into test (col) values (to_date('2005-07-14 16:06:48','yyyy-mm-dd
> hh:mi:ss'));
> >
> > > 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;
> > > CREATE TABLE 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'));
> > > </insert>
> > > java code like this:
> > > ......
> > > long nCurrentTime = System.currentTimeMillis();
> > > Timestamp ts = new Timestamp(nCurrentTime);
> > > broker.insert("product.testinsert",ts.toLocaleString());
> > > ......
> > > 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!
> > > leo
> > > cszhzleo@msn.com
> > > cszhz@126.com
> >
> > --
> > This message is automatically generated by JIRA.
> > -
> > If you think it was sent incorrectly contact one of the administrators:
> > http://issues.apache.org/jira/secure/Administrators.jspa
> > -
> > For more information on JIRA, see:
> > http://www.atlassian.com/software/jira
> >
> >
>
>
Re: [jira] Commented: (IBATIS-170) i am not sure it is a bug!
Posted by Darek Dober <do...@op.pl>.
I think, it is not a bug :)
It doesn't work for me.
But this does
insert into testddo (col) values (to_date('2005-07-14 16:06:48','yyyy-mm-dd
hh24:mi:ss'));
hours: 16 should be declared as HH24 not hh
Anyway:)
Darek Dober
----- Original Message -----
From: "Larry Meadors" <la...@gmail.com>
To: <de...@ibatis.apache.org>; <us...@ibatis.apache.org>;
<us...@ibatis.apache.org>
Sent: Thursday, July 14, 2005 1:51 PM
Subject: Re: [jira] Commented: (IBATIS-170) i am not sure it is a bug!
PLEASE! PLEASE! PLEASE!
If you are not 99.999% sure it is a bug, do not put it in JIRA.
Larry
On 7/14/05, leo zhang (JIRA) <ib...@incubator.apache.org> wrote:
> [
http://issues.apache.org/jira/browse/IBATIS-170?page=comments#action_12315824 ]
>
> leo zhang commented on IBATIS-170:
> ----------------------------------
>
> sorry, the sql statement is this:
> insert into test (col) values (to_date('2005-07-14 16:06:48','yyyy-mm-dd
hh:mi:ss'));
>
> > 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;
> > CREATE TABLE 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'));
> > </insert>
> > java code like this:
> > ......
> > long nCurrentTime = System.currentTimeMillis();
> > Timestamp ts = new Timestamp(nCurrentTime);
> > broker.insert("product.testinsert",ts.toLocaleString());
> > ......
> > 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!
> > leo
> > cszhzleo@msn.com
> > cszhz@126.com
>
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators:
> http://issues.apache.org/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see:
> http://www.atlassian.com/software/jira
>
>
Re: [jira] Commented: (IBATIS-170) i am not sure it is a bug!
Posted by Larry Meadors <la...@gmail.com>.
PLEASE! PLEASE! PLEASE!
If you are not 99.999% sure it is a bug, do not put it in JIRA.
Larry
On 7/14/05, leo zhang (JIRA) <ib...@incubator.apache.org> wrote:
> [ http://issues.apache.org/jira/browse/IBATIS-170?page=comments#action_12315824 ]
>
> leo zhang commented on IBATIS-170:
> ----------------------------------
>
> sorry, the sql statement is this:
> insert into test (col) values (to_date('2005-07-14 16:06:48','yyyy-mm-dd hh:mi:ss'));
>
> > 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;
> > CREATE TABLE 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'));
> > </insert>
> > java code like this:
> > ......
> > long nCurrentTime = System.currentTimeMillis();
> > Timestamp ts = new Timestamp(nCurrentTime);
> > broker.insert("product.testinsert",ts.toLocaleString());
> > ......
> > 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!
> > leo
> > cszhzleo@msn.com
> > cszhz@126.com
>
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators:
> http://issues.apache.org/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see:
> http://www.atlassian.com/software/jira
>
>
Re: [jira] Commented: (IBATIS-170) i am not sure it is a bug!
Posted by Larry Meadors <la...@gmail.com>.
PLEASE! PLEASE! PLEASE!
If you are not 99.999% sure it is a bug, do not put it in JIRA.
Larry
On 7/14/05, leo zhang (JIRA) <ib...@incubator.apache.org> wrote:
> [ http://issues.apache.org/jira/browse/IBATIS-170?page=comments#action_12315824 ]
>
> leo zhang commented on IBATIS-170:
> ----------------------------------
>
> sorry, the sql statement is this:
> insert into test (col) values (to_date('2005-07-14 16:06:48','yyyy-mm-dd hh:mi:ss'));
>
> > 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;
> > CREATE TABLE 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'));
> > </insert>
> > java code like this:
> > ......
> > long nCurrentTime = System.currentTimeMillis();
> > Timestamp ts = new Timestamp(nCurrentTime);
> > broker.insert("product.testinsert",ts.toLocaleString());
> > ......
> > 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!
> > leo
> > cszhzleo@msn.com
> > cszhz@126.com
>
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators:
> http://issues.apache.org/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see:
> http://www.atlassian.com/software/jira
>
>
Re: [jira] Commented: (IBATIS-170) i am not sure it is a bug!
Posted by Larry Meadors <la...@gmail.com>.
PLEASE! PLEASE! PLEASE!
If you are not 99.999% sure it is a bug, do not put it in JIRA.
Larry
On 7/14/05, leo zhang (JIRA) <ib...@incubator.apache.org> wrote:
> [ http://issues.apache.org/jira/browse/IBATIS-170?page=comments#action_12315824 ]
>
> leo zhang commented on IBATIS-170:
> ----------------------------------
>
> sorry, the sql statement is this:
> insert into test (col) values (to_date('2005-07-14 16:06:48','yyyy-mm-dd hh:mi:ss'));
>
> > 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;
> > CREATE TABLE 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'));
> > </insert>
> > java code like this:
> > ......
> > long nCurrentTime = System.currentTimeMillis();
> > Timestamp ts = new Timestamp(nCurrentTime);
> > broker.insert("product.testinsert",ts.toLocaleString());
> > ......
> > 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!
> > leo
> > cszhzleo@msn.com
> > cszhz@126.com
>
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators:
> http://issues.apache.org/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see:
> http://www.atlassian.com/software/jira
>
>
[jira] Closed: (IBATIS-170) i am not sure it is a bug!
Posted by "Larry Meadors (JIRA)" <ib...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/IBATIS-170?page=all ]
Larry Meadors closed IBATIS-170:
--------------------------------
Resolution: Invalid
Support issues need to be posted to users list, not JIRA.
> 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;
> CREATE TABLE 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'));
> </insert>
> java code like this:
> ......
> long nCurrentTime = System.currentTimeMillis();
> Timestamp ts = new Timestamp(nCurrentTime);
> broker.insert("product.testinsert",ts.toLocaleString());
> ......
> 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!
> leo
> cszhzleo@msn.com
> cszhz@126.com
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (IBATIS-170) i am not sure it is a bug!
Posted by "leo zhang (JIRA)" <ib...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/IBATIS-170?page=comments#action_12315824 ]
leo zhang commented on IBATIS-170:
----------------------------------
sorry, the sql statement is this:
insert into test (col) values (to_date('2005-07-14 16:06:48','yyyy-mm-dd hh:mi:ss'));
> 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;
> CREATE TABLE 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'));
> </insert>
> java code like this:
> ......
> long nCurrentTime = System.currentTimeMillis();
> Timestamp ts = new Timestamp(nCurrentTime);
> broker.insert("product.testinsert",ts.toLocaleString());
> ......
> 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!
> leo
> cszhzleo@msn.com
> cszhz@126.com
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira