Thread: Java Studio Creator and postgresql jdbc

Java Studio Creator and postgresql jdbc

From
"Matt Verran"
Date:
Hi Postgresql JDBC team,
 
I've used your Postgresql DB on BeOS for years and although leaving BeOS behind, I've taken Postgresql with me onto Solaris and Windows where I'm having some trouble using your 7.3 and 7.4 jdbc drivers with the Solaris build of 7.3.6 from Java Studio Creator.
 
Now, the driver works fine from another package, and I've written Java apps that connect ok - but I wanted to raise awareness to see if its a fault with the driver (hopefully not) that can have a workaround. I will be raising the fault with Sun also, but it may be worth taking a look just in case its something with the driver.
 
The way to recreate the problem is simple:-
 
Load Java Studio Creator.
Create a project.
Drag a dropdown control onto the page.
Setup a Postgresql JDBC connection from the 'Server Navigator'.
Drag and drop a Postgresql JDBC table onto the dropdown control.
Select 'Fill the list'.
The text in the dropdown should change from 'item1' to 'abc' to denote a connection.
Try the above with another source (I used the supplied Pointbase connector) and it works fine.
 
I look forward to hearing from you soon - keep up the excellent work!
Cheers
Matt Verran
 

Re: Java Studio Creator and postgresql jdbc

From
Oliver Jowett
Date:
Matt Verran wrote:

> The way to recreate the problem is simple:-

You forgot step 0: download a ~125MB install package.

Any idea what exactly it's trying to do at the driver level that is not
behaving correctly?

-O

Re: Java Studio Creator and postgresql jdbc

From
Jeremiah Jahn
Date:
bit of a repost here:
I got the following from sun on this.

Re: Supported DB Drivers
Author: Valerie_Lipman
Jul 25, 2004 2:02 PM
(reply 4 of 4)

We just tested postgresql in house and found that the driver is
returning null for PreparedStatement.getMetaData()

I recommend strongly that customers request this functionality directly
from their database vendors - we are working with them through
additional channels as well- but the customer's voice always is the best
motivation to raise priority. They can best provide you information
about when they will be able to properly support this functionality.

Thanks,
Val

On Wed, 2004-06-30 at 02:30, Oliver Jowett wrote:
> Matt Verran wrote:
>
> > The way to recreate the problem is simple:-
>
> You forgot step 0: download a ~125MB install package.
>
> Any idea what exactly it's trying to do at the driver level that is not
> behaving correctly?
>
> -O
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
--
Jeremiah Jahn <jeremiah@cs.earlham.edu>


Re: Java Studio Creator and postgresql jdbc

From
Oliver Jowett
Date:
Jeremiah Jahn wrote:
> bit of a repost here:
> I got the following from sun on this.
>
> Re: Supported DB Drivers
> Author: Valerie_Lipman
> Jul 25, 2004 2:02 PM
> (reply 4 of 4)
>
> We just tested postgresql in house and found that the driver is
> returning null for PreparedStatement.getMetaData()

The current driver returns null from getMetaData() if there is no active
resultset associated with the statement.

The javadoc says:

> Retrieves a ResultSetMetaData object that contains information about the
> columns of the ResultSet object that will be returned when this
> PreparedStatement object is executed.
>
> Because a PreparedStatement object is precompiled, it is possible to
> know about the ResultSet object that it will return without having to
> execute it. Consequently, it is possible to invoke the method
> getMetaData on a PreparedStatement object rather than waiting to execute
> it and then invoking the ResultSet.getMetaData method on the ResultSet
> object that is returned.

This is probably possible to implement when using a V3 connection
(server version >= 7.4) as we can send Parse/Bind/Describe/ClosePortal
to get a description of the portal without actually executing it. The
driver doesn't do this currently though.

I'd point out that it's probably the application at fault too. The
javadoc goes on to say:

> Returns:
>     the description of a ResultSet object's columns or null if the
> driver cannot return a ResultSetMetaData object

So 'null' is actually a legal return value (in fact, we'll probably have
to continue returning null when using a V2 connection).

-O