Re: WARNING: ROLLBACK: no transaction in progress

From: Bjørn T Johansen <btj(at)havleik(dot)no>
To: Dave(at)micro-automation(dot)net
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: WARNING: ROLLBACK: no transaction in progress
Date: 2003-05-29 17:30:17
Message-ID: 1054229416.29864.9.camel@pennywise.havleik.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

I am using the new version 7.3.3 where I also compiled the jdbc driver..

The code I use looks something like this..:

Connection conn = DBPool.getInstance().getConnection();
PreparedStatement stmt = null;
Statement stmt2 = null;

try
{
conn.setAutoCommit(false);

String sql= "Insert into table () Values (?)";
stmt = conn.prepareStatement(sql);
int ant = stmt.executeUpdate();
stmt.close();
stmt = null;
conn.commit();
conn.close();
conn = null;
}
catch (SQLException ex)
{
conn.rollback();
conn.close();
throw new Exception;
}

Hope this helps...

BTJ

On Wed, 2003-05-28 at 11:53, Dave Cramer wrote:
> What version of the driver are you using, this sounds like a bug
>
> Can you send some code to re-create it?
>
> Dave
> On Tue, 2003-05-27 at 06:33, Bjorn T Johansen wrote:
> > Why do I get this in my logfile, when I never call rollback, only
> > commit? Should I just ignore this or??
> >
> >
> > Regards,
> >
> > BTJ
> >
> >
> > -----------------------------------------------------------------------------------------------
> > Bjørn T Johansen (BSc,MNIF)
> > Executive Manager
> > btj(at)havleik(dot)no Havleik Consulting
> > Phone: +47 67 54 15 17 Conradisvei 4
> > Fax: +47 67 54 13 91 N-1338 Sandvika
> > Cellular: +47 926 93 298 http://www.havleik.no
> > -----------------------------------------------------------------------------------------------
> > "The stickers on the side of the box said "Supported Platforms: Windows
> > 98, Windows NT 4.0,
> > Windows 2000 or better", so clearly Linux was a supported platform."
> > -----------------------------------------------------------------------------------------------
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 2: you can get off all lists at once with the unregister command
> > (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
> >
--
-----------------------------------------------------------------------------------------------
Bjørn T Johansen (BSc,MNIF)
Executive Manager
btj(at)havleik(dot)no Havleik Consulting
Phone : +47 67 54 15 17 Conradisvei 4
Fax : +47 67 54 13 91 N-1338 Sandvika
Cellular : +47 926 93 298 http://www.havleik.no
-----------------------------------------------------------------------------------------------
"The stickers on the side of the box said "Supported Platforms: Windows
98, Windows NT 4.0,
Windows 2000 or better", so clearly Linux was a supported platform."
-----------------------------------------------------------------------------------------------

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dmitry Tkach 2003-05-29 19:56:45 Array.getArray ()
Previous Message Christian W. Flotzinger 2003-05-29 16:40:09 unsuscribe