Subject | Re: PreparedStatements - bug in handling exception |
---|---|
Author | rfincher2000 |
Post date | 2004-04-28T18:30:47Z |
Hi Miroslav,
Be sure you remove old JayBird jars from your classpath and that the
Firebird server is running on your compile machine.
I got two errors compiling todays CVS:
[junit] Tests run: 2, Failures: 1, Errors: 0, Time elapsed: 36.693 sec
[junit] TEST org.firebirdsql.jdbc.TestBoundary FAILED
[junit] Tests run: 3, Failures: 0, Errors: 3, Time elapsed: 42.22 sec
[junit] TEST org.firebirdsql.jdbc.TestFBSavepoint FAILED
I'm using JSDK 1.4.2 on Windows XP.
Rick
Be sure you remove old JayBird jars from your classpath and that the
Firebird server is running on your compile machine.
I got two errors compiling todays CVS:
[junit] Tests run: 2, Failures: 1, Errors: 0, Time elapsed: 36.693 sec
[junit] TEST org.firebirdsql.jdbc.TestBoundary FAILED
[junit] Tests run: 3, Failures: 0, Errors: 3, Time elapsed: 42.22 sec
[junit] TEST org.firebirdsql.jdbc.TestFBSavepoint FAILED
I'm using JSDK 1.4.2 on Windows XP.
Rick
--- In Firebird-Java@yahoogroups.com, Miroslav Novak <mira@k...> wrote:
> Hi Roman,
>
> the latest version from CVS works fine. Thanks.
>
> However, while building, a lot of tests fail. Is it ok to use it in my
> application or shall I wait for release version?
>
> Mirek.
>
>
>
> On Mon, 26 Apr 2004, Roman Rokytskyy wrote:
>
> > Hi,
> >
> > > I have yet another a problem with the prepared statement and string
> > > truncation. When I execute prepared statement where the text is
> > > longer than the field length it throws exception operation
> > > cancelled, as explained in this thread, but then I tried to rollback
> > > the transaction and I got "GDS Exception. 335544726. Error reading
> > > data from the connection."
> > > The connection seems to be broken now on.
> > > This was at my Windows box. On Linux it just doesn't throw the
first
> > > excepion about the cancellation of the operation, but just the
Error
> > > reading data from the connection.
> > > I am using Jaybird for JDK 1.4.
> >
> > I tried your test case (though I modified it a bit) with recent
> > version from CVS (basically RC2 with one fix that will appear in RC3)
> > and could not reproduce it. Did you try your test case with RC2? Can
> > you check out JayBird from CVS and check if my version of the test
> > case is correct (TestFBPreparedStatement.testLongParameter()). Here's
> > its text:
> >
> > /**
> > * Test if parameters are correctly checked for their length.
> > * @throws Exception if something went wrong.
> > */
> > public void testLongParameter() throws Exception {
> > con.setAutoCommit(true);
> > Statement stmt = con.createStatement();
> > try {
> > stmt.execute("INSERT INTO testtab(id, field1, field6)
> > VALUES(1, '', 'a')");
> > } finally {
> > stmt.close();
> > }
> >
> > con.setAutoCommit(false);
> >
> > PreparedStatement ps =
> > con.prepareStatement("UPDATE testtab SET field6=? WHERE id
> > = 1");
> > try {
> > try {
> > ps.setString(1,
> > "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
> > ps.execute();
> > con.commit();
> > } catch(SQLException ex) {
> > con.rollback();
> > }
> > } catch(SQLException ex) {
> > ex.printStackTrace();
> >
> > fail("No exception should be thrown.");
> > } finally {
> > ps.close();
> > }
> > }
> >
> > Thanks!
> > Roman
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
> >