pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedBug Report
12+ messages / 8 participants
[nested] [flat]
* Bug Report
@ 2001-10-12 18:53 Danny Zhou <dzhou@tycoint.com>
0 siblings, 1 reply; 12+ messages in thread
From: Danny Zhou @ 2001-10-12 18:53 UTC (permalink / raw)
To: pgsql-jdbc
I have a timestamp field called "created".
I have a result set called rs. When I do rs.getDate("created"), I get a
numberformat exception. I did not get this exception using driver 7.0.
After I upgraded to 7.1, I get this exception.
Xu Zhou (Danny)
Tyco Fire & Security Services
4131 Northgate Blvd
Sacramento, CA 95834
USA
Phone: +1 916-569-3145
Fax: +1 916-565-2006
E-mail: dzhou@tycoint.com
^ permalink raw reply [nested|flat] 12+ messages in thread
* Re: Bug Report
@ 2001-10-15 20:06 Barry Lind <barry@xythos.com>
parent: Danny Zhou <dzhou@tycoint.com>
0 siblings, 0 replies; 12+ messages in thread
From: Barry Lind @ 2001-10-15 20:06 UTC (permalink / raw)
To: Danny Zhou <dzhou@tycoint.com>; +Cc: pgsql-jdbc
Danny,
This is a known bug. It is fixed in current sources.
thanks,
--Barry
Danny Zhou wrote:
> I have a timestamp field called "created".
>
> I have a result set called rs. When I do rs.getDate("created"), I get a
> numberformat exception. I did not get this exception using driver 7.0.
> After I upgraded to 7.1, I get this exception.
>
>
> Xu Zhou (Danny)
> Tyco Fire & Security Services
> 4131 Northgate Blvd
> Sacramento, CA 95834
> USA
> Phone: +1 916-569-3145
> Fax: +1 916-565-2006
> E-mail: dzhou@tycoint.com
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>
^ permalink raw reply [nested|flat] 12+ messages in thread
* bug report
@ 2004-06-04 11:33 Vasiliev Ivan <biggod@folksnet.com>
0 siblings, 1 reply; 12+ messages in thread
From: Vasiliev Ivan @ 2004-06-04 11:33 UTC (permalink / raw)
To: pgsql-jdbc
Hello All!
I use a database with type UNICODE, execute query "select *
from some_table". One field has type text. There are some Europe symbols,
which code more than 128.
In method
private synchronized String Enconding#decodeUTF8(byte data[], int offset, int length)
throws SQLException
exeption ArrayIndexOutOfBoundsException occures in last else block:
} else { // length == 2 (maybe add checking for length > 3, throw exception if it is
y = data[i+1] & 0xFF;
val = (z - 0xC0)* (pow2_6)+(y-0x80);
l_cdata[j++] = (char) val;
i+=2;
}
Then your PSQLException is created.
But I have made a trick :
} catch (Exception l_e) {
try {
return new String(data, offset, length, "UTF-8");
} catch(Exception e) {
throw new PSQLException("postgresql.con.invalidchar", l_e);
}
}
And, as no exception occures during string creation, your "fast code"
decodeUTF8() has an error, I suppose....
Database server version:
PostgreSQL 7.4.1 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2.2 20030222 (ASPLinux 3.2.2-5asp)
JDBC driver: pg74.213.jdbc3.jar (this method doesn't differ from
driver devpgjdbc3.jar)
Let me know, if I wrong, or may be you want some additional
information.
--
Best regards,
Vasiliev mailto:biggod@folksnet.com
^ permalink raw reply [nested|flat] 12+ messages in thread
* Re: bug report
@ 2004-06-05 00:22 Oliver Jowett <oliver@opencloud.com>
parent: Vasiliev Ivan <biggod@folksnet.com>
0 siblings, 0 replies; 12+ messages in thread
From: Oliver Jowett @ 2004-06-05 00:22 UTC (permalink / raw)
To: Vasiliev Ivan <biggod@folksnet.com>; +Cc: pgsql-jdbc
Vasiliev Ivan wrote:
> Hello All!
> I use a database with type UNICODE, execute query "select *
> from some_table". One field has type text. There are some Europe symbols,
> which code more than 128.
In theory this should be ok assuming the data was inserted with a
suitable client_encoding.
> In method
> private synchronized String Enconding#decodeUTF8(byte data[], int offset, int length)
> throws SQLException
> exeption ArrayIndexOutOfBoundsException occures in last else block:
> } else { // length == 2 (maybe add checking for length > 3, throw exception if it is
> y = data[i+1] & 0xFF;
> val = (z - 0xC0)* (pow2_6)+(y-0x80);
> l_cdata[j++] = (char) val;
> i+=2;
> }
> Then your PSQLException is created.
Do you have a sample schema & data that shows this problem so we can
reproduce it? Or can you capture the raw byte-by-byte data given to
decodeUTF8() that causes the problem?
> But I have made a trick :
> } catch (Exception l_e) {
> try {
> return new String(data, offset, length, "UTF-8");
> } catch(Exception e) {
> throw new PSQLException("postgresql.con.invalidchar", l_e);
> }
> }
> And, as no exception occures during string creation, your "fast code"
> decodeUTF8() has an error, I suppose....
I believe the String constructors *ignore* errors in the incoming data,
replacing them with placeholder characters.
Just to check, your JDBC application is not changing client_encoding, right?
-O
^ permalink raw reply [nested|flat] 12+ messages in thread
* Re: [c-jdbc] Bug Report
@ 2004-11-22 17:48 Nicolas Modrzyk <Nicolas.Modrzyk@inrialpes.fr>
0 siblings, 1 reply; 12+ messages in thread
From: Nicolas Modrzyk @ 2004-11-22 17:48 UTC (permalink / raw)
To: c-jdbc@objectweb.org; pgsql-jdbc; +Cc: gvp <blindvit@gala.net>
Hi All,
Could anyone let us know how to understand the attached query ?
From what I know this is an Orion (java application server) generated
query for postgresql...
The C-JDBC parsing seems to fail because we can't find a proper FROM
keyword to select the depedencies of the query.
Since this is not seemingly SQL92 standard, can anyone from the
postgresql team give us some information ?
Thank you,
Nicolas Modrzyk,
>------------------------------------------------------------------------
>
>create table temp.zz_deltasrollAll_1100866542312_cache2_weekly as select hubid, czcode, type2, order_, itemid, item, hour, caseid, '2004WEEK47-2004WEEK48'::text as roll, "2004WEEK47-2004WEEK48" as value from temp.zz_deltasroll_1100866542312 union select hubid, czcode, type2, order_, itemid, item, hour, caseid, '2004WEEK48-2004WEEK49'::text as roll, "2004WEEK48-2004WEEK49" as value from temp.zz_deltasroll_1100866542312 union select hubid, czcode, type2, order_, itemid, item, hour, caseid, '2004WEEK49-2004WEEK50'::text as roll, "2004WEEK49-2004WEEK50" as value from temp.zz_deltasroll_1100866542312 union select hubid, czcode, type2, order_, itemid, item, hour, caseid, '2004WEEK50-2004WEEK51'::text as roll, "2004WEEK50-2004WEEK51" as value from temp.zz_deltasroll_1100866542312 union select hubid, czcode, type2, order_, itemid, item, hour, caseid, '2004WEEK51-2004WEEK52'::text as roll, "2004WEEK51-2004WEEK52" as value from temp.zz_deltasroll_1100866542312 union select hubid, czcode, type2, order_, itemid, item, hour, caseid, '2004WEEK52-2005WEEK01'::text as roll, "2004WEEK52-2005WEEK01" as value from temp.zz_deltasroll_1100866542312 union select hubid, czcode, type2, order_, itemid, item, hour, caseid, '2005WEEK01-2005WEEK02'::text as roll, "2005WEEK01-2005WEEK02" as value from temp.zz_deltasroll_1100866542312 union select hubid, czcode, type2, order_, itemid, item, hour, caseid, '2005WEEK02-2005WEEK03' [... 10 more lines]
>
^ permalink raw reply [nested|flat] 12+ messages in thread
* Re: [c-jdbc] Bug Report
@ 2004-11-22 20:59 Oliver Jowett <oliver@opencloud.com>
parent: Nicolas Modrzyk <Nicolas.Modrzyk@inrialpes.fr>
0 siblings, 0 replies; 12+ messages in thread
From: Oliver Jowett @ 2004-11-22 20:59 UTC (permalink / raw)
To: Nicolas Modrzyk <Nicolas.Modrzyk@inrialpes.fr>; +Cc: c-jdbc@objectweb.org; pgsql-jdbc; gvp <blindvit@gala.net>
Nicolas Modrzyk wrote:
> Hi All,
>
> Could anyone let us know how to understand the attached query ?
> From what I know this is an Orion (java application server) generated
> query for postgresql...
>
> The C-JDBC parsing seems to fail because we can't find a proper FROM
> keyword to select the depedencies of the query.
> Since this is not seemingly SQL92 standard, can anyone from the
> postgresql team give us some information ?
I am confused. Are you encountering a C-JDBC problem, a PostgreSQL JDBC
driver problem, a PostgreSQL backend query parsing problem, or something
else again? Exactly what error or misbehaviour do you see?
The query itself does not seem too painful, it is a CREATE TABLE AS with
a query part that has lots of UNIONs:
CREATE TABLE ... AS
SELECT ... FROM ...
UNION
SELECT ... FROM ...
UNION
SELECT ... FROM ...
[...]
-O
^ permalink raw reply [nested|flat] 12+ messages in thread
* Bug Report
@ 2006-02-06 08:02 Ralph Moser <ralph.twentyone@gmail.com>
0 siblings, 1 reply; 12+ messages in thread
From: Ralph Moser @ 2006-02-06 08:02 UTC (permalink / raw)
To: pgsql-jdbc
Hello!
I have found a Bug in your newest 8.2dev-500 JDBC 3 Driver. If I create a
application using Java Studio Creator 2 an run the application i get the
following error:
org.apache.jasper.JasperException: java.sql.SQLException: Invalid column
display size. Cannot be less than zero
With the bundeled Pointbase DB everything works fine.
Older versions of the Driver are also not working.
The new 500 driver is the first driver wich causes no error at design time.
It would be great if you can fix this error.
My System:
Postgresql 8.0.1
Windows XP Professional SP2
Yours Sincerly Ralph Moser
^ permalink raw reply [nested|flat] 12+ messages in thread
* Re: Bug Report
@ 2006-02-06 17:13 Kris Jurka <books@ejurka.com>
parent: Ralph Moser <ralph.twentyone@gmail.com>
0 siblings, 1 reply; 12+ messages in thread
From: Kris Jurka @ 2006-02-06 17:13 UTC (permalink / raw)
To: Ralph Moser <ralph.twentyone@gmail.com>; +Cc: pgsql-jdbc
On Mon, 6 Feb 2006, Ralph Moser wrote:
> I have found a Bug in your newest 8.2dev-500 JDBC 3 Driver. If I create a
> application using Java Studio Creator 2 an run the application i get the
> following error:
>
> org.apache.jasper.JasperException: java.sql.SQLException: Invalid column
> display size. Cannot be less than zero
>
> The new 500 driver is the first driver wich causes no error at design time.
> It would be great if you can fix this error.
>
I'm confused by your bug report. You say that it does work and then that
it doesn't work. Is there any chance your runtime is using a different
driver than design time? I suspect it is because the dev-500 driver
should never return < 0 for getColumnDisplaySize(). If it is, please send
a complete stacktrace and the datatype involved.
Kris Jurka
^ permalink raw reply [nested|flat] 12+ messages in thread
* Re: Bug Report
@ 2006-02-06 17:50 Ralph Moser <ralph.twentyone@gmail.com>
parent: Kris Jurka <books@ejurka.com>
0 siblings, 1 reply; 12+ messages in thread
From: Ralph Moser @ 2006-02-06 17:50 UTC (permalink / raw)
To: pgsql-jdbc
Hello!
What i have meant is that in the Creator no error occours. With earlier
Versions of the driver the Creator reports also an error befor deploying the
app. (After draging a DB Table on a component) The 500DEV is the first
version wich alows me to drag a DB Table on a component. But if i deploy and
run the app I get the error i reportet before. I am 100% shure that i use
the correct driver at runtime. (Testet on an other PC with only the 500DEV
driver installed)
Ralph Moser
2006/2/6, Kris Jurka <books@ejurka.com>:
>
>
>
> On Mon, 6 Feb 2006, Ralph Moser wrote:
>
> > I have found a Bug in your newest 8.2dev-500 JDBC 3 Driver. If I create
> a
> > application using Java Studio Creator 2 an run the application i get the
> > following error:
> >
> > org.apache.jasper.JasperException: java.sql.SQLException: Invalid column
> > display size. Cannot be less than zero
> >
> > The new 500 driver is the first driver wich causes no error at design
> time.
> > It would be great if you can fix this error.
> >
>
> I'm confused by your bug report. You say that it does work and then that
> it doesn't work. Is there any chance your runtime is using a different
> driver than design time? I suspect it is because the dev-500 driver
> should never return < 0 for getColumnDisplaySize(). If it is, please send
> a complete stacktrace and the datatype involved.
>
> Kris Jurka
>
^ permalink raw reply [nested|flat] 12+ messages in thread
* Re: Bug Report
@ 2006-02-06 17:59 Kris Jurka <books@ejurka.com>
parent: Ralph Moser <ralph.twentyone@gmail.com>
0 siblings, 1 reply; 12+ messages in thread
From: Kris Jurka @ 2006-02-06 17:59 UTC (permalink / raw)
To: Ralph Moser <ralph.twentyone@gmail.com>; +Cc: pgsql-jdbc
On Mon, 6 Feb 2006, Ralph Moser wrote:
> What i have meant is that in the Creator no error occours. With earlier
> Versions of the driver the Creator reports also an error befor deploying the
> app. (After draging a DB Table on a component) The 500DEV is the first
> version wich alows me to drag a DB Table on a component. But if i deploy and
> run the app I get the error i reportet before. I am 100% shure that i use
> the correct driver at runtime. (Testet on an other PC with only the 500DEV
> driver installed)
Well, please send the complete stacktrace from this error and the
datatypes of the table involved.
^ permalink raw reply [nested|flat] 12+ messages in thread
* Re: Bug Report
@ 2006-02-07 02:52 pedro farinha <pedro@geotaxi.com>
parent: Kris Jurka <books@ejurka.com>
0 siblings, 1 reply; 12+ messages in thread
From: pedro farinha @ 2006-02-07 02:52 UTC (permalink / raw)
To: Kris Jurka <books@ejurka.com>; +Cc: Ralph Moser <ralph.twentyone@gmail.com>; pgsql-jdbc
Hi,
Ralph make sure there is no older JDBC jar on the Sun Server class path.
You maybe have a datasource/Data Server type defined referencing an
older jar? look at the SAS Admin for JNDI and Datasources you probably
will find something not 100% as you wanted there, or on Creator on Data
Server type form.
On Creator make sure you delete the Data base server type and recreate
using the newer jar, drop all of the defined datasources with the old DB
Server type, and remove them from the Project (right on the bottom ....
Data source references).
The most important thing though is to search for older versions of the
jar in the Sun Server / glassfish, and make sure you delete it, all of
them. ( if you use SAS8 or GlassFish they should be on <server>/lib)
Then recreate the Data sources and add them to the project, build and
deploy, this should add the required jar postgresql driver to the
classpath of the server. A bit overkill? yes I also think so, but worked
for me. I am 99.99% certain if you remove the old jar from the SAS
classpath and add the new one( or redefine the DataServerType), it
should do it. But hey, that was a transcript from my notes when I had to
doit! Most important for run-time, is to make sure the older jar is not
there, It is class-loading issue. The class loader will load the classes
once, if it picks the old one first.....
I have found several problems using Postgresql and CachedRowSet, still
not 100% if it is a driver problem or a Creator design problem, the bug
you refer it is , I think, a Creator design problem, as postgresql
adheres to the spec ( again on my view). One other issue, a bit more
problematic (if not yet solved) is the setTransactionLevel(), while
transaction in progress. I have overcome that, using a patch from (sorry
mate can't remember you're name) but it basically cancels the exception
( turning it into a System.out.println('oops'), causing the "obvious"
problems to go away. But there are others, I couldn't use CachedRowSet
to insert and delete, so I dropped the use of CachedRowSet. Which is OK
but not that OK! In the end of the day for real things you would need to
create a DTO, and well, in that case you might want to use a
Object*DataSource. And that model is really the correct approach, I
think. On other hand if the only thing you want is to display a
RecordSet in a table the new driver does the job.
Ok , a bit verbose sorry for that, in 1 line. Make sure no other jar but
the one you want to use are on <server>/lib ;)!
On Mon, 2006-02-06 at 17:59, Kris Jurka wrote:
> On Mon, 6 Feb 2006, Ralph Moser wrote:
>
> > What i have meant is that in the Creator no error occours. With earlier
> > Versions of the driver the Creator reports also an error befor deploying the
> > app. (After draging a DB Table on a component) The 500DEV is the first
> > version wich alows me to drag a DB Table on a component. But if i deploy and
> > run the app I get the error i reportet before. I am 100% shure that i use
> > the correct driver at runtime. (Testet on an other PC with only the 500DEV
> > driver installed)
>
> Well, please send the complete stacktrace from this error and the
> datatypes of the table involved.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
^ permalink raw reply [nested|flat] 12+ messages in thread
* Re: Bug Report
@ 2006-02-07 09:27 Ralph Moser <ralph.twentyone@gmail.com>
parent: pedro farinha <pedro@geotaxi.com>
0 siblings, 0 replies; 12+ messages in thread
From: Ralph Moser @ 2006-02-07 09:27 UTC (permalink / raw)
To: pedro farinha <pedro@geotaxi.com>; pgsql-jdbc
Hi!
Thank you for your help. The hint with the lib directory solved my Problem.
The only thing that makes me problems ist the thing with the CachedRowset
you wrote about.
I hope somebody solves this problem
Ralph Moser
2006/2/7, pedro farinha <pedro@geotaxi.com>:
>
> Hi,
> Ralph make sure there is no older JDBC jar on the Sun Server class path.
> You maybe have a datasource/Data Server type defined referencing an older
> jar? look at the SAS Admin for JNDI and Datasources you probably will find
> something not 100% as you wanted there, or on Creator on Data Server type
> form.
> On Creator make sure you delete the Data base server type and recreate
> using the newer jar, drop all of the defined datasources with the old DB
> Server type, and remove them from the Project (right on the bottom ....
> Data source references).
> The most important thing though is to search for older versions of the jar
> in the Sun Server / glassfish, and make sure you delete it, all of them. (
> if you use SAS8 or GlassFish they should be on <server>/lib) Then recreate
> the Data sources and add them to the project, build and deploy, this should
> add the required jar postgresql driver to the classpath of the server. A bit
> overkill? yes I also think so, but worked for me. I am 99.99% certain if
> you remove the old jar from the SAS classpath and add the new one( or
> redefine the DataServerType), it should do it. But hey, that was a
> transcript from my notes when I had to doit! Most important for run-time, is
> to make sure the older jar is not there, It is class-loading issue. The
> class loader will load the classes once, if it picks the old one first.....
>
> I have found several problems using Postgresql and CachedRowSet, still not
> 100% if it is a driver problem or a Creator design problem, the bug you
> refer it is , I think, a Creator design problem, as postgresql adheres to
> the spec ( again on my view). One other issue, a bit more problematic (if
> not yet solved) is the setTransactionLevel(), while transaction in progress.
> I have overcome that, using a patch from (sorry mate can't remember you're
> name) but it basically cancels the exception ( turning it into a
> System.out.println('oops'), causing the "obvious" problems to go away. But
> there are others, I couldn't use CachedRowSet to insert and delete, so I
> dropped the use of CachedRowSet. Which is OK but not that OK! In the end of
> the day for real things you would need to create a DTO, and well, in that
> case you might want to use a Object*DataSource. And that model is really the
> correct approach, I think. On other hand if the only thing you want is to
> display a RecordSet in a table the new driver does the job.
>
> Ok , a bit verbose sorry for that, in 1 line. Make sure no other jar but
> the one you want to use are on <server>/lib ;)!
>
>
> On Mon, 2006-02-06 at 17:59, Kris Jurka wrote:
>
> *On Mon, 6 Feb 2006, Ralph Moser wrote:
>
> > What i have meant is that in the Creator no error occours. With earlier
> > Versions of the driver the Creator reports also an error befor deploying the
> > app. (After draging a DB Table on a component) The 500DEV is the first
> > version wich alows me to drag a DB Table on a component. But if i deploy and
> > run the app I get the error i reportet before. I am 100% shure that i use
> > the correct driver at runtime. (Testet on an other PC with only the 500DEV
> > driver installed)
>
> Well, please send the complete stacktrace from this error and the
> datatypes of the table involved.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly*
>
>
^ permalink raw reply [nested|flat] 12+ messages in thread
end of thread, other threads:[~2006-02-07 09:27 UTC | newest]
Thread overview: 12+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-10-12 18:53 Bug Report Danny Zhou <dzhou@tycoint.com>
2001-10-15 20:06 ` Barry Lind <barry@xythos.com>
2004-06-04 11:33 bug report Vasiliev Ivan <biggod@folksnet.com>
2004-06-05 00:22 ` Re: bug report Oliver Jowett <oliver@opencloud.com>
2004-11-22 17:48 Re: [c-jdbc] Bug Report Nicolas Modrzyk <Nicolas.Modrzyk@inrialpes.fr>
2004-11-22 20:59 ` Oliver Jowett <oliver@opencloud.com>
2006-02-06 08:02 Bug Report Ralph Moser <ralph.twentyone@gmail.com>
2006-02-06 17:13 ` Kris Jurka <books@ejurka.com>
2006-02-06 17:50 ` Ralph Moser <ralph.twentyone@gmail.com>
2006-02-06 17:59 ` Kris Jurka <books@ejurka.com>
2006-02-07 02:52 ` pedro farinha <pedro@geotaxi.com>
2006-02-07 09:27 ` Ralph Moser <ralph.twentyone@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox