Skip to Content.
Sympa Menu

freetds - Re: JDBC strange error

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Antonio Terceiro <terceiro AT ufba.br>
  • To: TDS Development Group <freetds AT franklin.metalab.unc.edu>
  • Subject: Re: JDBC strange error
  • Date: Thu, 4 Jul 2002 11:13:58 +0000


Well, I've observed that it varies with the query "look" more than with the
ResultSet size. The first query on wich that I sought this error used an
exists
clause, and the resulset was one row containing only one column. I've tested
others that return several rows with several columns, with and without exists
clauses(I think that it doesn´t matter, but...), some involving other servers
and some not(it doesn´t seem to affect too), etc.

Now, I'm right that simple queries (primary select, insert, update and delete
statements) work without trouble.

Well, Marc, if you can test it, try something like the following. I won´t post
the actual query because it uses table and column names in portuguese, and I
think it will not help ... i'll try to "translate" it ...

select professors.department_id from professors, people
where professors.person_id = @some_id and professors.person_id =
people.person_id
and professors.is_full_time = 1
and exists (select * from other_server..contracts
join employees on (employees.employee_id =
contracts.employee_id)
where employees.employee_id = professors.employee_id
)


Em Thu, 04 Jul 2002, Marc Schouten escreveu:

> Is there a certain query type this is happening with? or just when you get
> big chunks of data in?
> personally i have'nt had such big packets.. for 200bytes for a total row is
> about the biggest i got in. (ok the resultset has 2100 rows so the
> total data gets way bigger)
> anyway i have'nt had any problems, but i'm using only basic select insert
> and update query's..
>
> if you insert the query that gives the problems i can see if i can run it
> on my own database here.
>
> Marc
>
> Antonio Terceiro wrote:
>
> > Hi all,
> >
> > I've some questions about freetds JDBC driver, but I see that 99,99% of
> > the
> > messages do this list is about the C version of freetds. Then, maybe you
> > could
> > indicate me a better place to post this message, if there is some. But
> > i'll
> > post it here anyway ... ;-)
> >
> > I've been testing freetds_jdbc driver to access some machines running
> > Micro$oft SQL Server(they are Window$ NT, of course), and it works very
> > well,
> > until ... for some queries, it raises a SQLException, that is, in fact,
> > "forwarding" an SocketException(I changed the sources to show the actual
> > Exception type inside square braces, as you can see in the following
> > lines).
> >
> > Exception in thread "main" java.sql.SQLException: Network error-
> > Connection reset by peer: Connection reset by
> > peer[java.net.SocketException]
> > at com.internetcds.jdbc.tds.Statement.execute(Statement.java:483)
> > at
> > com.internetcds.jdbc.tds.Statement.executeQuery(Statement.java:122)
> > at Jisql.main(Jisql.java:112)
> >
> > The strange is that I've tested runnning the same queries several times,
> > and it
> > raises that Exception sometimes, and the other times, it works fine. For
> > example, I run if 10,000 times (running 100 times a class that runs the
> > query
> > 100 times on each execution), and some class executions run the 100 times
> > without error, and other executions stop after some random nunber of
> > times.
> >
> > The first queries that I tested where greater than 512 bytes, and I
> > thought
> > that the problem could be in the protocol conversation(that specifies that
> > queries greater than 512 bytes must be sent in different packets). But
> > further
> > I've tested queries lesser that 512 bytes and happened the same.
> >
> > So, can anybody help with it? Maybe guiding me to probable reasons, or
> > whatever. I'm up to help with the driver programming ...
> >
> > Regards,
> >
> > --
> > Antonio Terceiro <terceiro AT im.ufba.br>
> > Bolsista - Divisão de Projetos
> > Centro de Processamento de Dados
> > Universidade Federal da Bahia
> > __ _ _ _ _ _
> > | |_| | \ / | | |_ |_) |_|
> > |__ | |_/ / |_| | |_) | |
> >
> > ---
> > You are currently subscribed to freetds as: [ms AT itsec.nl]
> > To unsubscribe, forward this message to
> > leave-freetds-144521P AT franklin.oit.unc.edu
>
>
> ---
> You are currently subscribed to freetds as: [terceiro AT ufba.br]
> To unsubscribe, forward this message to
> leave-freetds-144521P AT franklin.oit.unc.edu

--
Antonio Terceiro <terceiro AT im.ufba.br>
Bolsista - Divisão de Projetos
Centro de Processamento de Dados
Universidade Federal da Bahia




Archive powered by MHonArc 2.6.24.

Top of Page