JDBC issue

Lists: pgsql-general
From: Joel Alejandro Espinosa Carra <joel(dot)espinosa(at)cts-design(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: JDBC issue
Date: 2006-05-23 20:31:06
Message-ID: 4473710A.6040101@cts-design.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Hi all.

I searched at google and did not find any answer. I have an older JDCB
driver in my java web application, if I update the driver to the 7.4
build 216 version some of the querys like the next show no results in
the ResultSet object:

SELECT a.reg_users_id_user AS id, a.first_name AS fn, a.last_name AS ln,
a.sur_name AS sn, ar.name AS area, u.email AS email FROM reg_aspirants a
INNER JOIN areas ar ON a.areas_id_area1 = ar.id_area INNER JOIN
reg_schools s ON a.reg_schools_id_school = s.id_school INNER JOIN
reg_users u ON a.reg_users_id_user = u.id_user INNER JOIN
reg_tests_aspirants ta ON a.reg_users_id_user = ta.reg_id_aspirant INNER
JOIN reg_tests t ON ta.reg_id_test = t.id_test INNER JOIN reg_calendars
c ON t.reg_calendars_id_calendar = c.id_calendar AND c.is_active AND
t.test_type = 'p' AND a.status = 'ap' GROUP BY a.reg_users_id_user,
a.first_name, a.last_name, a.sur_name, ar.name, s.name, u.email ORDER BY
a.last_name, a.sur_name, a.first_name ASC

but the same querys are working well if they are runned at pgsql, is
there something to I must to know in the newer version's API?.
I need to update the driver in order to use iBATIS because the older one
throw an exception: "java.sql.SQLException: ERROR: SET AUTOCOMMIT TO
OFF is no longer supported.".

Thanks in advance.
Best regards.

ps. please tell me if it is the wrong mailing list for this issue.

--
Ing. Joel Alejandro Espinosa Carra
CINVESTAV CTS - Centro de Tecnología de Semiconductores
Tel. +52 (33) 3770-3700 ext. 1049
http://www.cts-design.com

--
Este mensaje ha sido analizado por MailScanner
en busca de virus y otros contenidos peligrosos,
y se considera que está limpio.
MailScanner agradece a transtec Computers por su apoyo.


From: Kris Jurka <books(at)ejurka(dot)com>
To: Joel Alejandro Espinosa Carra <joel(dot)espinosa(at)cts-design(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: JDBC issue
Date: 2006-05-24 06:54:04
Message-ID: Pine.BSO.4.63.0605240150420.6104@leary2.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Tue, 23 May 2006, Joel Alejandro Espinosa Carra wrote:

> I searched at google and did not find any answer. I have an older JDCB driver
> in my java web application, if I update the driver to the 7.4 build 216
> version some of the querys like the next show no results in the ResultSet
> object:

I have no idea why the JDBC driver would cause any sort of difference in
the results of a query. Are you sure you're connecting to the same server
and running the exact same query when you get results in psql?

If you can send a self contained reproducible example I'll take a look at
it, but I've got to guess it's something wrong with your code or your
connection. You could also try updating to a newer JDBC driver, the 7.4
series is not maintained any longer.

> ps. please tell me if it is the wrong mailing list for this issue.
>

You should ask JDBC questions on the pgsql-jdbc list.

Kris Jurka


From: Joel Alejandro Espinosa Carra <joel(dot)espinosa(at)cts-design(dot)com>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: JDBC issue
Date: 2006-05-24 21:01:57
Message-ID: 4474C9C5.9000207@cts-design.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Kris Jurka wrote:

>
>
> On Tue, 23 May 2006, Joel Alejandro Espinosa Carra wrote:
>
>> I searched at google and did not find any answer. I have an older
>> JDCB driver in my java web application, if I update the driver to the
>> 7.4 build 216 version some of the querys like the next show no
>> results in the ResultSet object:
>
>
> I have no idea why the JDBC driver would cause any sort of difference
> in the results of a query. Are you sure you're connecting to the same
> server and running the exact same query when you get results in psql?

Yes I'm pretty sure, the same server, the same code, the same version of
postgres server (7.4), the only thing i did was replacing the jdbc jar
in the /common/lib/ tomcat directory.

>
> If you can send a self contained reproducible example I'll take a look
> at it, but I've got to guess it's something wrong with your code or
> your connection. You could also try updating to a newer JDBC driver,
> the 7.4 series is not maintained any longer.
>
The java code is pretty ugly, (i did not wrote it, BTW), in order to
reproduce the error I had had send you the entire web application :-(

>> ps. please tell me if it is the wrong mailing list for this issue.
>>
>
> You should ask JDBC questions on the pgsql-jdbc list.

I will try it.

>
> Kris Jurka
>
Thank you very much.
Best regards.

--
Ing. Joel Alejandro Espinosa Carra
CINVESTAV CTS - Centro de Tecnología de Semiconductores
Tel. +52 (33) 3770-3700 ext. 1049
http://www.cts-design.com

--
Este mensaje ha sido analizado por MailScanner
en busca de virus y otros contenidos peligrosos,
y se considera que está limpio.
MailScanner agradece a transtec Computers por su apoyo.