Re: Right version of jdbc

From: Dave Cramer <davecramer(at)postgres(dot)rocks>
To: Raivo Rebane <raivore55(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Right version of jdbc
Date: 2023-09-25 12:27:48
Message-ID: CADK3HHKeLK6eFYbzJFpN7kAw4J1Q5ByRsNAfhzowxQ1CLzf9bQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

The missing class is from the postgis jar. Are you sure it is on your
classpath ?

Dave Cramer
www.postgres.rocks

On Mon, 25 Sept 2023 at 08:26, Raivo Rebane <raivore55(at)gmail(dot)com> wrote:

> Hi,
> now I using following -
> [INFO] Copying postgis-jdbc-2.1.7.jar to
> C:\Users\Raivo\eclipse-workspace\backendproject\target\lib\postgis-jdbc-2.1.7.jar
> [INFO] Copying postgresql-42.6.0.jar to
> C:\Users\Raivo\eclipse-workspace\backendproject\target\lib\postgresql-42.6.0.jar
> [INFO] Copying checker-qual-3.31.0.jar to
> C:\Users\Raivo\eclipse-workspace\backendproject\target\lib\checker-qual-3.31.0.jar
> but on executions I got -
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/postgis/PGgeometry
> at
> backendproject.ProcQueryMushrooms.ProcQuery(ProcQueryMushrooms.java:41)
> at backendproject.BackendMain.main(BackendMain.java:81)
> Caused by: java.lang.ClassNotFoundException: org.postgis.PGgeometry
> at
> java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
> at
> java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
> at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
>
> What I have to do ?
>
> I use following -
> PostgreSQL 15.2, compiled by Visual C++ build 1914, 64-bit
> PostGIS 3.3 USE_GEOS=1 USE_PROJ=1 USE_STATS=1
> Regards
> Raivo
>
> On Mon, Sep 25, 2023 at 2:29 PM Dave Cramer <davecramer(at)postgres(dot)rocks>
> wrote:
>
>> Sorry 42.6.0
>>
>> Interesting that github still has 42.5.4 as the release
>>
>> Dave Cramer
>> www.postgres.rocks
>>
>>
>> On Mon, 25 Sept 2023 at 07:27, Dave Cramer <davecramer(at)postgres(dot)rocks>
>> wrote:
>>
>>> Hi,
>>>
>>> The latest version of the driver is usually the right answer. So 42.5.4
>>> Dave Cramer
>>> www.postgres.rocks
>>>
>>>
>>> On Mon, 25 Sept 2023 at 07:03, Raivo Rebane <raivore55(at)gmail(dot)com> wrote:
>>>
>>>> Hi,
>>>> I use :
>>>> PostgreSQL 15.2, compiled by Visual C++ build 1914, 64-bit
>>>> and
>>>> PostGIS 3.3 USE_GEOS=1 USE_PROJ=1 USE_STATS=1
>>>>
>>>> What versions of jdbc driver I have to use for proper work ?
>>>>
>>>> Regards,
>>>> Raivo
>>>>
>>>>
>>>>
>>>>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Rob Sargent 2023-09-25 12:28:52 Re: Accessing system information functions
Previous Message Raivo Rebane 2023-09-25 12:26:21 Re: Right version of jdbc