Re: Right version of jdbc

2023-11-09 Thread Dave Cramer
On Fri, 29 Sept 2023 at 01:23, Raivo Rebane wrote: > But goes worst if I am using > postgis-geometry-2021.1.0.jar > > Raivo > > On Fri, Sep 29, 2023 at 8:14 AM Raivo Rebane wrote: > >> It goes better, if I add postgis-geometry-2.5.0.jar and Eclipse founds >> >> import org.postgis.Point; >> >>

Re: Right version of jdbc

2023-09-30 Thread Raivo Rebane
I have put it to github in the old place - https://github.com/raaivore/APIexperiment.git Raivo On Sat, Sep 30, 2023 at 1:53 PM Dave Cramer wrote: > Again, can you please post the solution so others can learn as well ? > > Dave Cramer > www.postgres.rocks > > > On Sat, 30 Sept 2023 at 06:49,

Re: Right version of jdbc

2023-09-30 Thread Dave Cramer
Again, can you please post the solution so others can learn as well ? Dave Cramer www.postgres.rocks On Sat, 30 Sept 2023 at 06:49, Raivo Rebane wrote: > Thanks for very much for help. > It seems that I can do the test project for new job. > In future I use help of chat.gpt > > Regards >

Re: Right version of jdbc

2023-09-30 Thread Raivo Rebane
Thanks for very much for help. It seems that I can do the test project for new job. In future I use help of chat.gpt Regards Raivo On Sat, Sep 30, 2023 at 11:15 AM wrote: > Am 30.09.23 um 08:33 schrieb Raivo Rebane: > > Hi, > > sometimes I am lucky and don't get the old error, but sometime

Re: Right version of jdbc

2023-09-30 Thread Raivo Rebane
It seems so, that if my WEB-INF/lib contains postgres driver then Tomcat gives - No suitable driver found Raivo On Sat, Sep 30, 2023 at 10:18 AM Raivo Rebane wrote: > I fix previous error what was my bad knowledge, > But new error occur which is related to postgres postgis jars. > If You are

Re: Right version of jdbc

2023-09-30 Thread postgresql439848
Am 30.09.23 um 08:33 schrieb Raivo Rebane: Hi, sometimes I am lucky and don't get the old error, but sometime not. I tried to use PreparedStatement, but I got error - org.postgresql.util.PSQLException: Can't use query methods that take a query string on a PreparedStatement. at

Re: Right version of jdbc

2023-09-30 Thread Raivo Rebane
I fix previous error what was my bad knowledge, But new error occur which is related to postgres postgis jars. If You are kind to answer me more; Java code is : public static boolean CheckIsNewInMushrooms(Connection connection, Point AddLocation, String AddDescription) { boolean IsNew = true;

Re: Right version of jdbc

2023-09-30 Thread Raivo Rebane
Hi, sometimes I am lucky and don't get the old error, but sometime not. I tried to use PreparedStatement, but I got error - org.postgresql.util.PSQLException: Can't use query methods that take a query string on a PreparedStatement. at

Re: Right version of jdbc

2023-09-29 Thread Raivo Rebane
Sorry. I accidentally usin postgres 16, which was empty Many thanks for advise !!! Raivo On Sat, Sep 30, 2023 at 8:18 AM Raivo Rebane wrote: > May be I have to copy PostGis draiver also to tomcat/lib ? > > Raivo > > On Sat, Sep 30, 2023 at 8:01 AM Raivo Rebane wrote: > >> Hi, >> I copied the

Re: Right version of jdbc

2023-09-29 Thread Raivo Rebane
May be I have to copy PostGis draiver also to tomcat/lib ? Raivo On Sat, Sep 30, 2023 at 8:01 AM Raivo Rebane wrote: > Hi, > I copied the postgres driver to Tomcat/lib. > PS C:\Program Files\Apache Software Foundation\Tomcat 9.0\lib> dir post* > Directory: C:\Program Files\Apache Software

Re: Right version of jdbc

2023-09-29 Thread Raivo Rebane
Hi, I copied the postgres driver to Tomcat/lib. PS C:\Program Files\Apache Software Foundation\Tomcat 9.0\lib> dir post* Directory: C:\Program Files\Apache Software Foundation\Tomcat 9.0\lib Mode LastWriteTime Length Name -

Re: Right version of jdbc

2023-09-29 Thread Craig McIlwee
> for some reason the postgresql jar is not in the classpath. This is due to the way that Tomcat loads drivers, which is documented at [1]. In short, the JDBC driver should be placed in the tomcat/lib directory and removed from the application's WEB-INF/lib directory. After doing that, I was

Re: Right version of jdbc

2023-09-29 Thread postgresql439848
Am 29.09.23 um 20:42 schrieb Dave Cramer: On Fri, 29 Sept 2023 at 14:22, Raivo Rebane wrote: Thanks, there was really JDK 17 in use. I changed it to Java 1.8 PS C:\Program Files\Apache Software Foundation\Tomcat 9.0\bin> java -version java version "1.8.0_381" Java(TM) SE Runtime Environment

Re: Right version of jdbc

2023-09-29 Thread Dave Cramer
On Fri, 29 Sept 2023 at 14:22, Raivo Rebane wrote: > Thanks, > > there was really JDK 17 in use. > I changed it to Java 1.8 > PS C:\Program Files\Apache Software Foundation\Tomcat 9.0\bin> java > -version > java version "1.8.0_381" > Java(TM) SE Runtime Environment (build 1.8.0_381-b09) > Java

Re: Right version of jdbc

2023-09-29 Thread Raivo Rebane
Thanks, there was really JDK 17 in use. I changed it to Java 1.8 PS C:\Program Files\Apache Software Foundation\Tomcat 9.0\bin> java -version java version "1.8.0_381" Java(TM) SE Runtime Environment (build 1.8.0_381-b09) Java HotSpot(TM) 64-Bit Server VM (build 25.381-b09, mixed mode) but the

Re: Right version of jdbc

2023-09-29 Thread Dave Cramer
Dave Cramer www.postgres.rocks On Fri, 29 Sept 2023 at 06:19, Raivo Rebane wrote: > Hi, > > The code is : > package MushroomAPIs; > > import java.io.IOException; > import javax.servlet.ServletException; > import javax.servlet.annotation.WebServlet; > import javax.servlet.http.HttpServlet; >

Re: Right version of jdbc

2023-09-29 Thread Raivo Rebane
Hi, The code is : package MushroomAPIs; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import

Re: Right version of jdbc

2023-09-28 Thread Raivo Rebane
But goes worst if I am using postgis-geometry-2021.1.0.jar Raivo On Fri, Sep 29, 2023 at 8:14 AM Raivo Rebane wrote: > It goes better, if I add postgis-geometry-2.5.0.jar and Eclipse founds > > import org.postgis.Point; > > > Raivo > > On Fri, Sep 29, 2023 at 7:18 AM Raivo Rebane wrote: > >>

Re: Right version of jdbc

2023-09-28 Thread Raivo Rebane
It goes better, if I add postgis-geometry-2.5.0.jar and Eclipse founds import org.postgis.Point; Raivo On Fri, Sep 29, 2023 at 7:18 AM Raivo Rebane wrote: > If I use this jar i give errors - Description Resource Path Location Type > PGgeometry cannot be resolved to a type

Re: Right version of jdbc

2023-09-28 Thread Raivo Rebane
If I use this jar i give errors - Description Resource Path Location Type PGgeometry cannot be resolved to a type ProcAddMushrooms.java /KatseAPIs/src/main/java/MushroomAPIs line 22 Java Problem PGgeometry cannot be resolved to a type ProcAddMushrooms.java /KatseAPIs/src/main/java/MushroomAPIs

Re: Right version of jdbc

2023-09-28 Thread Ron
On 9/28/23 01:18, Raivo Rebane wrote: [snip] I made a new Java application Eclipse Dynamic WEB application and want to use Postgres - PostgreSQL 10.14 [snip] What's wrong. Or is better to use more newer postgres. And then which jdbc-I need to use ?

Re: Right version of jdbc

2023-09-28 Thread Dave Cramer
The latest version of postgis-jdbc is Maven Repository: net.postgis » postgis-jdbc » 2021.1.0 (mvnrepository.com) Dave Cramer www.postgres.rocks On Thu, 28 Sept 2023 at 14:51, Raivo Rebane wrote: > Hi, > > The same problem

Right version of jdbc

2023-09-28 Thread Raivo Rebane
Hi, The same problem of postgres-jdbc compatibility remains and I pushed it to github - https://github.com/raaivore/APIexperiment. I am using Postgres 15 and Java 1.8 and Tomcat9. Maybe somebody can help me to solve the problem. Regards Raivo

Re: Right version of jdbc

2023-09-28 Thread Dave Cramer
Please put this project on github so we can see it. Thanks Dave Cramer www.postgres.rocks On Thu, 28 Sept 2023 at 11:53, Raivo Rebane wrote: > Or may be I am using wrong version of Java - java version "17.0.8" > 2023-07-18 LTS > > Raivo > > On Thu, Sep 28, 2023 at 6:41 PM Raivo Rebane wrote:

Re: Right version of jdbc

2023-09-28 Thread Raivo Rebane
Or may be I am using wrong version of Java - java version "17.0.8" 2023-07-18 LTS Raivo On Thu, Sep 28, 2023 at 6:41 PM Raivo Rebane wrote: > Now I changed the Postgres Server to version 15 and making Tomcat 9.0 > project. > Now I am using postgresql-42.6.0.jar driver, but Tomcat gives error :

Re: Right version of jdbc

2023-09-28 Thread Rob Sargent
On 9/28/23 09:41, Raivo Rebane wrote: Now I changed the Postgres Server to version 15 and making Tomcat 9.0 project. Now I am using postgresql-42.6.0.jar driver, but Tomcat gives error : java.sql.SQLException: No suitable driver found for jdbc:postgresql://localhost:5432/mushroom_database

Re: Right version of jdbc

2023-09-28 Thread Raivo Rebane
Now I changed the Postgres Server to version 15 and making Tomcat 9.0 project. Now I am using postgresql-42.6.0.jar driver, but Tomcat gives error : java.sql.SQLException: No suitable driver found for jdbc:postgresql://localhost:5432/mushroom_database What driver I have to use for suitable driver.

Re: Right version of jdbc

2023-09-28 Thread Dave Cramer
Dave Cramer www.postgres.rocks On Thu, 28 Sept 2023 at 02:18, Raivo Rebane wrote: > Hi, > > I made a new Java application Eclipse Dynamic WEB application and want to > use Postgres - PostgreSQL 10.14 on x86_64-pc-linux-gnu, compiled by gcc > (Ubuntu 9.3.0-10ubuntu2) 9.3.0, 64-bit and Postgis -

Re: Right version of jdbc

2023-09-28 Thread Raivo Rebane
Hi, I made a new Java application Eclipse Dynamic WEB application and want to use Postgres - PostgreSQL 10.14 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0, 64-bit and Postgis - 2.4 USE_GEOS=1 USE_PROJ=1 USE_STATS=1. I added some jdbc-s in my project webapps/WEB-INF/lib

Re: Right version of jdbc

2023-09-27 Thread Dave Cramer
First of all please use reply all so that everyone sees the answers. Not sure since PgObject is certainly in the jdbc jar. pgjdbc/pgjdbc/src/main/java/org/postgresql/util/PGobject.java at 5709a20fbef453749d2394e11502527e4a3ab5bb · pgjdbc/pgjdbc (github.com)

Re: Right version of jdbc

2023-09-25 Thread Dave Cramer
You should probably be using the latest version of postgis-jdbc Maven Repository: net.postgis » postgis-jdbc » 2021.1.0 (mvnrepository.com) Dave Cramer www.postgres.rocks On Mon, 25 Sept 2023 at 08:43, Raivo Rebane wrote:

Re: Right version of jdbc

2023-09-25 Thread Rob Sargent
On 9/25/23 06:38, Raivo Rebane wrote: Hi, now I use -               org.postgis         postgis-jdbc         1.3.3                 org.postgresql         postgresql         42.5.4       But I got error - Exception in thread "main" java.lang.NoSuchMethodError:

Re: Right version of jdbc

2023-09-25 Thread Dave Cramer
It must be a dependency to something. postgis ? Dave Cramer www.postgres.rocks On Mon, 25 Sept 2023 at 09:25, Raivo Rebane wrote: > Hi, > postgresql-8.3-603.jdbc4.jar is added by maven maven install. How to > avoid it ? >

Re: Right version of jdbc

2023-09-25 Thread Dave Cramer
remove the postgresql-8.3-603.jdbc4.jar Dave Cramer www.postgres.rocks On Mon, 25 Sept 2023 at 08:43, Raivo Rebane wrote: > And target/lib is s following : > Directory of C:\Users\Raivo\eclipse-workspace\backendproject\target\lib > > 25.09.2023 15:35 . > 25.09.2023 15:33

Re: Right version of jdbc

2023-09-25 Thread Raivo Rebane
And target/lib is s following : Directory of C:\Users\Raivo\eclipse-workspace\backendproject\target\lib 25.09.2023 15:35 . 25.09.2023 15:33 .. 25.09.2023 15:33 214 381 checker-qual-3.5.0.jar 25.09.2023 13:1475 847 postgis-jdbc-1.3.3.jar

Re: Right version of jdbc

2023-09-25 Thread Raivo Rebane
Hi, now I use - org.postgis postgis-jdbc 1.3.3 org.postgresql postgresql 42.5.4 But I got error - Exception in thread "main" java.lang.NoSuchMethodError: 'org.postgresql.core.Encoding

Re: Right version of jdbc

2023-09-25 Thread Dave Cramer
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 wrote: > Hi, > now I using following - > [INFO] Copying postgis-jdbc-2.1.7.jar to >

Re: Right version of jdbc

2023-09-25 Thread Raivo Rebane
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

Re: Right version of jdbc

2023-09-25 Thread Dave Cramer
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 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

Re: Right version of jdbc

2023-09-25 Thread Dave Cramer
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 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 >

Re: Right version of jdbc

2023-09-25 Thread Thomas Kellerer
Raivo Rebane schrieb am 25.09.2023 um 10:36: > 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 ? Use the latest, i.e. 42.6.0

Right version of jdbc

2023-09-25 Thread Raivo Rebane
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