Re: Right version of jdbc - Mailing list pgsql-general
From | Dave Cramer |
---|---|
Subject | Re: Right version of jdbc |
Date | |
Msg-id | CADK3HH+qO+Q6C5iTO6xiCdXUg5ZKCAv6ktrC9yw3S9uqMT_aPw@mail.gmail.com Whole thread Raw |
In response to | Re: Right version of jdbc (Raivo Rebane <raivore55@gmail.com>) |
List | pgsql-general |
You should probably be using the latest version of postgis-jdbc
Dave Cramer
www.postgres.rocks
On Mon, 25 Sept 2023 at 08:43, Raivo Rebane <raivore55@gmail.com> wrote:
And target/lib is s following :Directory of C:\Users\Raivo\eclipse-workspace\backendproject\target\lib
25.09.2023 15:35 <DIR> .
25.09.2023 15:33 <DIR> ..
25.09.2023 15:33 214 381 checker-qual-3.5.0.jar
25.09.2023 13:14 75 847 postgis-jdbc-1.3.3.jar
25.09.2023 13:14 2 833 postgis-stubs-1.3.3.jar
25.09.2023 15:33 1 049 651 postgresql-42.5.4.jar
25.09.2023 13:14 474 746 postgresql-8.3-603.jdbc4.jarRaivoOn Mon, Sep 25, 2023 at 3:38 PM Raivo Rebane <raivore55@gmail.com> wrote:Hi, now I use -<dependencies>
<dependency>
<groupId>org.postgis</groupId>
<artifactId>postgis-jdbc</artifactId>
<version>1.3.3</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.5.4</version> <!-- Kasuta kõige uuemat versiooni -->
</dependency>
</dependencies>But I got error -Exception in thread "main" java.lang.NoSuchMethodError: 'org.postgresql.core.Encoding org.postgresql.core.BaseConnection.getEncoding()'
at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getString(AbstractJdbc2ResultSet.java:1889)
at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getTimestamp(AbstractJdbc2ResultSet.java:438)
at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getTimestamp(AbstractJdbc2ResultSet.java:2406)
at backendproject.BackendMain.main(BackendMain.java:64)Whats wrong ?RaivoOn Mon, Sep 25, 2023 at 3:26 PM Raivo Rebane <raivore55@gmail.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.jarbut 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=1RegardsRaivoOn Mon, Sep 25, 2023 at 2:29 PM Dave Cramer <davecramer@postgres.rocks> wrote:Sorry 42.6.0Interesting that github still has 42.5.4 as the releaseDave Cramerwww.postgres.rocksOn Mon, 25 Sept 2023 at 07:27, Dave Cramer <davecramer@postgres.rocks> wrote:Hi,The latest version of the driver is usually the right answer. So 42.5.4Dave Cramerwww.postgres.rocksOn Mon, 25 Sept 2023 at 07:03, Raivo Rebane <raivore55@gmail.com> wrote:Hi,I use :PostgreSQL 15.2, compiled by Visual C++ build 1914, 64-bitandPostGIS 3.3 USE_GEOS=1 USE_PROJ=1 USE_STATS=1What versions of jdbc driver I have to use for proper work ?Regards,Raivo
pgsql-general by date: