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 Rich Midwinter <ri...@gmail.com> on 2007/10/30 09:22:35 UTC

Ibatis freezing on insert

Hi

I'm struggling with an insert statement that's freezing my
application. This is the last of the SQL debug output:

16:00:33,367 DEBUG Connection:26 - {conn-100079} Connection
16:00:33,369 DEBUG Connection:26 - {conn-100079} Preparing Statement:
       insert into EVENTS
(type,cost,status,date,client,user,time,duration,location,paid)
 values         (?,?,?,?,?,?,?,?,?,?)
16:00:33,371 DEBUG PreparedStatement:26 - {pstm-100080} Executing
Statement:          insert into EVENTS
(type,cost,status,date,client,user,time,duration,location,paid)
 values         (?,?,?,?,?,?,?,?,?,?)
16:00:33,372 DEBUG PreparedStatement:26 - {pstm-100080} Parameters:
[Treatment, 125, Appointment, 2007-10-28 00:00: 00.0, 1, 1, 1600, 60,
Treatment 1, false]
16:00:33,373 DEBUG PreparedStatement:26 - {pstm-100080} Types:
[java.lang.String, java.lang.String, java.lang.String,
java.sql.Timestamp, java.lang.Long, java.lang.Long , java.lang.String,
java.lang.Integer, java.lang.String, java.lang.Boolean]

This is the relevant XML configuration:

   <insert id="insertEvent" parameterClass="Event">
       insert into EVENTS
(type,cost,status,date,client,user,time,duration,location,paid)
       values

(#type#,#cost#,#status#,#date#,#client#,#user#,#time#,#duration#,#location#,#paid#)
   </insert>

It's completely repeatable. I'm using a MySQL database and when I
manually enter the query it works fine.

Can anyone suggest where I might be going wrong? Thanks

Rich

Re: Ibatis freezing on insert

Posted by Larry Meadors <lm...@apache.org>.
The reason I ask is that sometimes when you cut out all of the other
tools and frameworks, it can help isolate where the problem is
located.

Besides iBATIS and MySQL, what else is involved?

Larry

On 11/2/07, Rich Midwinter <ri...@gmail.com> wrote:
> No, I'll try and put one together sometime soon. I've tried it with hsqldb
> now and that worked fine.
>
> Rich
>
>
> On 11/2/07, Larry Meadors < lmeadors@apache.org> wrote:
> > Do you have a simple unit test that reproduces this?
> >
> > Larry
> >
> >
> > On 11/1/07, Rich Midwinter <ri...@gmail.com> wrote:
> > > I get the same issue with 5.0.8 and 5.1.5. I might see if I can recreate
> my
> > > database in hsqldb and try that.
> > >
> > > Rich
> > >
> > > On 10/30/07, Graeme J Sweeney < ibatis.user@gjsweeney.com> wrote:
> > > > On Tue, 30 Oct 2007, Rich Midwinter wrote:
> > > >
> > > > > This has worked previously, I wouldn't have changed the jar since
> but
> > > MySQL
> > > > > could have been updated. My code's definitely changed since - I
> haven't
> > > > > committed it to version control yet though. :-s
> > > >
> > > > It could be a bug introduced in 5.0.45 ....
> > > >
> > > > Usual advice would be to test the query outside iBatis with the
> existing
> > > > JDBC driver.
> > > >
> > > > I'd try 5.0.8 or 5.1.5 at a push.
> > > >
> > > > --
> > > > Graeme -
> > > >
> > >
> > >
> >
>
>

Re: Ibatis freezing on insert

Posted by Rich Midwinter <ri...@gmail.com>.
No, I'll try and put one together sometime soon. I've tried it with hsqldb
now and that worked fine.

Rich

On 11/2/07, Larry Meadors <lm...@apache.org> wrote:
>
> Do you have a simple unit test that reproduces this?
>
> Larry
>
>
> On 11/1/07, Rich Midwinter <ri...@gmail.com> wrote:
> > I get the same issue with 5.0.8 and 5.1.5. I might see if I can recreate
> my
> > database in hsqldb and try that.
> >
> > Rich
> >
> > On 10/30/07, Graeme J Sweeney < ibatis.user@gjsweeney.com> wrote:
> > > On Tue, 30 Oct 2007, Rich Midwinter wrote:
> > >
> > > > This has worked previously, I wouldn't have changed the jar since
> but
> > MySQL
> > > > could have been updated. My code's definitely changed since - I
> haven't
> > > > committed it to version control yet though. :-s
> > >
> > > It could be a bug introduced in 5.0.45 ....
> > >
> > > Usual advice would be to test the query outside iBatis with the
> existing
> > > JDBC driver.
> > >
> > > I'd try 5.0.8 or 5.1.5 at a push.
> > >
> > > --
> > > Graeme -
> > >
> >
> >
>

Re: Ibatis freezing on insert

Posted by Larry Meadors <lm...@apache.org>.
Do you have a simple unit test that reproduces this?

Larry


On 11/1/07, Rich Midwinter <ri...@gmail.com> wrote:
> I get the same issue with 5.0.8 and 5.1.5. I might see if I can recreate my
> database in hsqldb and try that.
>
> Rich
>
> On 10/30/07, Graeme J Sweeney < ibatis.user@gjsweeney.com> wrote:
> > On Tue, 30 Oct 2007, Rich Midwinter wrote:
> >
> > > This has worked previously, I wouldn't have changed the jar since but
> MySQL
> > > could have been updated. My code's definitely changed since - I haven't
> > > committed it to version control yet though. :-s
> >
> > It could be a bug introduced in 5.0.45 ....
> >
> > Usual advice would be to test the query outside iBatis with the existing
> > JDBC driver.
> >
> > I'd try 5.0.8 or 5.1.5 at a push.
> >
> > --
> > Graeme -
> >
>
>

Re: Ibatis freezing on insert

Posted by Rich Midwinter <ri...@gmail.com>.
I get the same issue with 5.0.8 and 5.1.5. I might see if I can recreate my
database in hsqldb and try that.

Rich

On 10/30/07, Graeme J Sweeney <ib...@gjsweeney.com> wrote:
>
> On Tue, 30 Oct 2007, Rich Midwinter wrote:
>
> > This has worked previously, I wouldn't have changed the jar since but
> MySQL
> > could have been updated. My code's definitely changed since - I haven't
> > committed it to version control yet though. :-s
>
> It could be a bug introduced in 5.0.45 ....
>
> Usual advice would be to test the query outside iBatis with the existing
> JDBC driver.
>
> I'd try 5.0.8 or 5.1.5 at a push.
>
> --
> Graeme -
>

Re: Ibatis freezing on insert

Posted by Graeme J Sweeney <ib...@gjsweeney.com>.
On Tue, 30 Oct 2007, Rich Midwinter wrote:

> This has worked previously, I wouldn't have changed the jar since but MySQL
> could have been updated. My code's definitely changed since - I haven't
> committed it to version control yet though. :-s

It could be a bug introduced in 5.0.45 ....

Usual advice would be to test the query outside iBatis with the existing 
JDBC driver.

I'd try 5.0.8 or 5.1.5 at a push.

-- 
Graeme -

Re: Ibatis freezing on insert

Posted by Rich Midwinter <ri...@gmail.com>.
Thanks Graeme.

mysql-connector-java-5.0.7-bin.jar
Server version: 5.0.45-Debian_1ubuntu3-log Debian etch distribution
(distributed with Ubuntu 7.10)

This has worked previously, I wouldn't have changed the jar since but MySQL
could have been updated. My code's definitely changed since - I haven't
committed it to version control yet though. :-s

Rich


On 10/30/07, Graeme J Sweeney <ib...@gjsweeney.com> wrote:
>
> On Tue, 30 Oct 2007, Rich Midwinter wrote:
>
> > It's completely repeatable. I'm using a MySQL database and when I
> > manually enter the query it works fine.
> >
> > Can anyone suggest where I might be going wrong? Thanks
>
> Which version of MySQL and jdbc connector?
>
> --
> Graeme -
>

Re: Ibatis freezing on insert

Posted by Graeme J Sweeney <ib...@gjsweeney.com>.
On Tue, 30 Oct 2007, Rich Midwinter wrote:

> It's completely repeatable. I'm using a MySQL database and when I
> manually enter the query it works fine.
>
> Can anyone suggest where I might be going wrong? Thanks

Which version of MySQL and jdbc connector?

-- 
Graeme -