Re: Bug Report

Lists: pgsql-jdbc
From: Ralph Moser <ralph(dot)twentyone(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Bug Report
Date: 2006-02-06 08:02:13
Message-ID: 394cd5ed0602060002n7fffeef0i@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: 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


From: Kris Jurka <books(at)ejurka(dot)com>
To: Ralph Moser <ralph(dot)twentyone(at)gmail(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Bug Report
Date: 2006-02-06 17:13:04
Message-ID: Pine.BSO.4.61.0602061209130.20592@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: 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


From: Ralph Moser <ralph(dot)twentyone(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Bug Report
Date: 2006-02-06 17:50:01
Message-ID: 394cd5ed0602060950h15ea9c4cg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: 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(at)ejurka(dot)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
>


From: Kris Jurka <books(at)ejurka(dot)com>
To: Ralph Moser <ralph(dot)twentyone(at)gmail(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Bug Report
Date: 2006-02-06 17:59:55
Message-ID: Pine.BSO.4.61.0602061259080.30538@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: 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.


From: pedro farinha <pedro(at)geotaxi(dot)com>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: Ralph Moser <ralph(dot)twentyone(at)gmail(dot)com>, "jdbc(dot)postgres" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Bug Report
Date: 2006-02-07 02:52:50
Message-ID: 1139280770.2693.58.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: 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(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly


From: Ralph Moser <ralph(dot)twentyone(at)gmail(dot)com>
To: pedro farinha <pedro(at)geotaxi(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Bug Report
Date: 2006-02-07 09:27:42
Message-ID: 394cd5ed0602070127w70b3db4x@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: 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(at)geotaxi(dot)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(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly*
>
>