From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Raivo Rebane <raivore55@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: jdbc problem
Date: Sun, 24 Sep 2023 20:18:58 +0200
Message-ID: <7ca26afdae05821f11aaedecb48f0efde052c501.camel@cybertec.at> (raw)
In-Reply-To: <CAMH5fpsTgF8cDigGEw1gSAHsnkfB=de6cdXDkc8_yO5J-iNkoA@mail.gmail.com>
References: <CAMH5fpsTgF8cDigGEw1gSAHsnkfB=de6cdXDkc8_yO5J-iNkoA@mail.gmail.com>
On Sun, 2023-09-24 at 20:33 +0300, Raivo Rebane wrote:
> I hav postgresql 15 installed in my windows computer.
>
> I have maven java project, wich works temporarly in Eclipse, but mvn install did'nt work.
>
> Now it works, but I have 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)
>
> backendproject.BackendMain.main(BackendMain.java:64) line is following -
>
> Timestamp oldest_timestamp = resultSet.getTimestamp("oldest_timestamp");
>
> Query from Java is following -
>
> String query = "SELECT timestamp AS oldest_timestamp FROM mushrooms";
> PreparedStatement statement = connection.prepareStatement(query);
> ResultSet resultSet = statement.executeQuery();
You should ask the JDBC driver mailing list.
As a first measure, try upgrading to 42.6.0 and see if the error persists.
Yours,
Laurenz Albe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: laurenz.albe@cybertec.at, raivore55@gmail.com
Subject: Re: jdbc problem
In-Reply-To: <7ca26afdae05821f11aaedecb48f0efde052c501.camel@cybertec.at>
References: <CAMH5fpsTgF8cDigGEw1gSAHsnkfB=de6cdXDkc8_yO5J-iNkoA@mail.gmail.com> <7ca26afdae05821f11aaedecb48f0efde052c501.camel@cybertec.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox