Postgresql ships with three bundled JDBC drivers :
postgresql-8.0-311.jdbc2.jar - 294 kb - Backwards Compatibilty driver
postgresql-8.0-311.jdbc2ee.jar - 305 kb - J2EE driver
postgresql-8.0-311.jdbc3.jar - 323 kb - JDBC 3 Diver
I tried all three from both an 8.0.3 Postgresql install and an 8.1 install.
I replaced the 7.4 driver and renamed the new driver so that it had the old name.
The JDBC2 driver could complete the connection wizard but after connection it was unable to list the servers tables in the catalog view.
Both of the other drivers were able to both complete the connection wizard and accuratley list the geomtry tables in catalog view. However they produced the same error as the bundled driver when an attemp was made to add a geometry to the current or a new map. The error loding services messages, with a greyed out details button, and the log file showing the Java Null pointer exception.
I would suggest that the problem lies with the Postgis driver which I assume is the same one as the Jump plugin described as:
postgisdriver-1.1.0.zip
This JUMP 1.1 plug-in will provide basic support for reading and writing from a PostGIS database. The pg74jdbc3.jar JDBC driver for PostgreSQL is also included in this package. This driver currently only works with JUMP 1.1 and PostgreSQL <= 7.4.
Newer versions of this driver are available from the PostGIS CVS - use the same CVS connection info as for PostGIS, but checkout the package "jumppostgis".
Download the driver.
I can only assume that a newer version is needed I will try and download a CVS version and try that, but I will need a JDK to do it , if anyone else could build and mail it I would be grateful.
Cheers
Johan Wehtje
On 12/3/05, Jesse Eichar <
[EMAIL PROTECTED]> wrote:
First I would like to promise that M2 will have the latest drivers
included. But could I ask a favor from you? The
uDig/plugins/net.refractions.udig.libs.postgis_1.1.0/libs directory has
the postgis and postgres drivers could you replace the postgresql driver
with a more recent one and see if you can connect to you postgis
server. If you don't feel like it you can wait for M2, which we will
put out next week, and try that.
Thanks for the bug report and the good detective work,
Jesse
Johan Wehtje wrote:
> Having read the Bug report at:
> http://jira.codehaus.org/browse/UDIG-603?page=all
> I think that my own problems are also being caused by a JDBC driver
> that appears very old, given that the verion number is Postgresql 7.4.
>
> I also have my geomtry tables in a seperate schema from the public
> tables. I have tried moving some geomtry into the public schema but
> Udig still only seems to be reading the old schema or does not seem to
> properly undertsand schemas when it adds the geomtry rescources to
> that Catalog as it seems to list geomtry regardless of what Schema it
> was told to examine.
>
> Hopefully this problem really is as simple as upgrading the JDBC driver.
>
> Cheers
> Johan Wehtje
>
>
> On 12/2/05, *Johan Wehtje* < [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED] >> wrote:
>
> UDig 1.1M1 produces the same error as before for me on Windows Pro
> 2000 SP4, Windows XP Pro SP2 (tested on 2 different Machines, a
> laptop and desktop). I have not ye tested the Linux version.
>
> A log file is attached, showing a typical session, the error
> messages are the same on all tests.
>
> I have three different Postgresql Servers running locally Covering
> 8.0.1, 8.0.3, and 8.1 with Postgis versions 0.9.4, 1.0.4 and
> 1.0.5. The errors are all the same. Everything else works - I can
> view shapfiles, connect to feature and mapservers, was even able
> to connect to a remote DB2 database at a clients office, the only
> thing that does not work is the thing that I relly want to work -
> namely connecting to a Postgis Database and displaying a geometry
> layer.
>
>
> On 12/2/05, *Johan Wehtje* < [EMAIL PROTECTED]
> <mailto: [EMAIL PROTECTED]>> wrote:
>
> I am just now downloading UDIG 1.1M1, to see if I have any
> better luck with postgres/postgis than I have had with 1.0 or
> 1.1M0
>
> I have no problems connecting to public Mapservers, or even to
> a local mapserver I set up using Postgis as it's Mapsource.
>
> However I still get exactly the same error whenever I try to
> add a Postgis Layer to a map. I can connect to Postigis, and
> the catalogue correctly shows the Geometry Tables, but adding
> any geometry always reulsts in an error loading services
> error, and the details box is Greyed out. I have reproduced
> the error a few times and have appeneded below the relevant
> portion of my UDig log file showing the Null pointer
> exceptions as they occur.
>
> Cheers
> Johan Wehtje
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> ENTRY org.eclipse.core.runtime 4 2 2005-12-02 15:20:36.218
> !MESSAGE An internal error occurred during: "Loading
> services...".
> !STACK 0
> java.lang.NullPointerException
> at
> net.refractions.udig.catalog.internal.postgis.PostGISGeoResource$PostGISResourceInfo.getTitle(PostGISGeoResource.java:228)
> at
> net.refractions.udig.project.internal.impl.LayerFactoryImpl.createDataStoreLayer
> (LayerFactoryImpl.java:299)
> at
> net.refractions.udig.project.internal.impl.LayerFactoryImpl.createLayer (LayerFactoryImpl.java:426)
> at
> net.refractions.udig.project.ui.internal.MapFactory$1.run(MapFactory.java
> :273)
> at org.eclipse.core.internal.jobs.Worker.run (Worker.java:76)
>
> !ENTRY net.refractions.udig.project.ui 1 0 2005-12-02 15:21:41.234
> !MESSAGE Internal error:java.lang.NullPointerException
> !STACK 0
> java.lang.NullPointerException
> at
> net.refractions.udig.catalog.internal.postgis.PostGISGeoResource$PostGISResourceInfo.getName(PostGISGeoResource.java:219)
> at
> net.refractions.udig.project.ui.internal.ResourceSelectionPage$6.run (ResourceSelectionPage.java
> :401)
> at
> org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
>
> !ENTRY org.eclipse.core.runtime 4 2 2005-12-02 15:21:46.546
> !MESSAGE An internal error occurred during: "Loading
> services...".
> !STACK 0
> java.lang.NullPointerException
> at
> net.refractions.udig.catalog.internal.postgis.PostGISGeoResource$PostGISResourceInfo.getTitle(PostGISGeoResource.java:228)
> at
> net.refractions.udig.project.internal.impl.LayerFactoryImpl.createDataStoreLayer
> (LayerFactoryImpl.java:299)
> at
> net.refractions.udig.project.internal.impl.LayerFactoryImpl.createLayer(LayerFactoryImpl.java:426)
> at
> net.refractions.udig.project.ui.internal.MapFactory$1.run(MapFactory.java
> :273)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)
>
> !ENTRY net.refractions.udig.project.ui 1 0 2005-12-02 15:22:16.234
> !MESSAGE Internal error:java.lang.NullPointerException
> !STACK 0
> java.lang.NullPointerException
> at
> net.refractions.udig.catalog.internal.postgis.PostGISGeoResource$PostGISResourceInfo.getName (PostGISGeoResource.java:219)
> at
> net.refractions.udig.project.ui.internal.ResourceSelectionPage$6.run(ResourceSelectionPage.java
> :401)
> at
> org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
>
> !ENTRY org.eclipse.core.runtime 4 2 2005-12-02 15:22:19.578
> !MESSAGE An internal error occurred during: "Loading
> services...".
> !STACK 0
> java.lang.NullPointerException
> at
> net.refractions.udig.catalog.internal.postgis.PostGISGeoResource$PostGISResourceInfo.getTitle (PostGISGeoResource.java:228)
> at
> net.refractions.udig.project.internal.impl.LayerFactoryImpl.createDataStoreLayer
> (LayerFactoryImpl.java:299)
> at
> net.refractions.udig.project.internal.impl.LayerFactoryImpl.createLayer(LayerFactoryImpl.java:426)
> at
> net.refractions.udig.project.ui.internal.MapFactory$1.run(MapFactory.java
> :273)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)
>
> !ENTRY org.eclipse.core.runtime 4 2 2005-12-02 15:25:02.250
> !MESSAGE An internal error occurred during: "Loading services...".
> !STACK 0
> java.lang.NullPointerException
> at
> net.refractions.udig.project.internal.impl.LayerFactoryImpl.createDataStoreLayer(LayerFactoryImpl.java:299)
> at
> net.refractions.udig.project.internal.impl.LayerFactoryImpl.createLayer
> (LayerFactoryImpl.java:426)
> at
> net.refractions.udig.project.ui.internal.MapFactory$1.run (MapFactory.java:273)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)
>
> !ENTRY org.eclipse.core.runtime 4 2 2005-12-02 15:25:09.265
> !MESSAGE An internal error occurred during: "Loading services...".
> !STACK 0
> java.lang.NullPointerException
> at
> net.refractions.udig.project.internal.impl.LayerFactoryImpl.createDataStoreLayer
> (LayerFactoryImpl.java :299)
> at
> net.refractions.udig.project.internal.impl.LayerFactoryImpl.createLayer(LayerFactoryImpl.java:426)
> at
> net.refractions.udig.project.ui.internal.MapFactory$1.run (MapFactory.java
> :273)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)
>
> !ENTRY org.eclipse.core.runtime 4 2 2005-12-02 15:25:23.593
> !MESSAGE An internal error occurred during: "Loading services...".
> !STACK 0
> java.lang.NullPointerException
> at
> net.refractions.udig.project.internal.impl.LayerFactoryImpl.createDataStoreLayer(LayerFactoryImpl.java:299)
> at
> net.refractions.udig.project.internal.impl.LayerFactoryImpl.createLayer
> (LayerFactoryImpl.java:426)
> at
> net.refractions.udig.project.ui.internal.MapFactory$1.run (MapFactory.java:273)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>
>
> On 11/24/05, *Jody Garnett* < [EMAIL PROTECTED]
> <mailto: [EMAIL PROTECTED]>> wrote:
>
> Hi Johan & Chris:
>
> Chris Johan has been stuck trying to get uDig and Postgis
> to work for
> some weeks now (!). We are not quite sure of much yet,
> but may ask for
> your help as the situation becomes clearer.
>> Jody,
>>
>> Yes , I am not prepared to give up on U-Dig quite yet :).
>> I have not tried to connect to your public databases , I
> will go and
>> have a look at the web site as to how to go about doing
> that.
> Oh okay - that was the first thing we/I asked you to do
> (so we could see
> if it was a problem with the copy of uDig you have). I am
> afraid I was
> waiting to hear back one way or the other before trying to
> help.
>> I am behind a firewall on a satellite connection, so I
> ma not sure
>> that you will be able to get through as the staellite
> service runs
>> it's own firewall - but just in case I have set up a
> database that and
>> port forwarding or you to try and test against - my ip is
> 10.16.6.222 <http://10.16.6.222 >
>> < http://10.16.6.222>, use norm:norm to connect to
> udig_test. All the
>> geometry is in the shapes schema.
>>
>> If that fails ( which I suspect it might, as I had no
> luck dialling
>> out to another ISP on one machine and trying to access
> the other, but
>> then again I ma lucky if I get more than 18.6 kbps where
> I am) I can
>> do a partial dump and post/put it somewhere.
> Okay it sounds like we got options. I am sure we can get
> this all to
> work, and a partial dump may be of assistence. Could you
> answer my
> question about your PostGIS setup? Do you have all the SRS
> information,
> and I assume that you called add geometry column when
> setting up your
> tables? (Sometimes this is missed when restoring data from
> an sql dump).
>
> Jody
>> Cheers
>> Johan Wehtje
>>
>>
>>
>> On 11/23/05, *Jody Garnett* < [EMAIL PROTECTED]
> <mailto: [EMAIL PROTECTED]>
>> <mailto: [EMAIL PROTECTED]
> <mailto: [EMAIL PROTECTED]>>> wrote:
>>
>> Hi Johan,
>> It seems you have been trying this for a couple weeks
> now (!).
>>
>> Just to confirm - you are able to connect to our
> public PostGIS
>> (and it
>> is your own PostGIS databases you are having trouble
> with?)
>> Is your Postgis instance visible, can we try
> connecting to it on
>> our end
>> (while running in a debugger?).
>>
>> I need to drag a PostGIS expert into the
> conversation. It concerns me
>> that you are having trouble with three databases.
>> Question - do you have PostGIS installed with all the
> CRS information?
>> uDig will try and make use of that.
>>
>> If you could get back to me with respect to testing
> that would be
>> good,
>> if not I will be making guesses (like the one of
> above) and wasting
>> both of our time.
>>
>> Jody
>> _______________________________________________
>> User-friendly Desktop Internet GIS (uDig)
>> http://udig.refractions.net < http://udig.refractions.net>
>> http://lists.refractions.net/mailman/listinfo/udig-devel
>>
>>
>> ------------------------------------------------------------------------
>
>>
>> _______________________________________________
>> User-friendly Desktop Internet GIS (uDig)
>> http://udig.refractions.net
>> http://lists.refractions.net/mailman/listinfo/udig-devel
>>
>
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net < http://udig.refractions.net>
> http://lists.refractions.net/mailman/listinfo/udig-devel
>
>
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>User-friendly Desktop Internet GIS (uDig)
>http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel
>
>
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel
_______________________________________________ User-friendly Desktop Internet GIS (uDig) http://udig.refractions.net http://lists.refractions.net/mailman/listinfo/udig-devel
