Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qkThG-00EbSf-Pa for pgsql-general@arkaria.postgresql.org; Sun, 24 Sep 2023 18:19:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qkThF-00A6No-Ct for pgsql-general@arkaria.postgresql.org; Sun, 24 Sep 2023 18:19:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qkThE-00A6Nc-Tf for pgsql-general@lists.postgresql.org; Sun, 24 Sep 2023 18:19:09 +0000 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qkTh7-007L5Y-UI for pgsql-general@lists.postgresql.org; Sun, 24 Sep 2023 18:19:08 +0000 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-9936b3d0286so619301666b.0 for ; Sun, 24 Sep 2023 11:19:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20230601.gappssmtp.com; s=20230601; t=1695579540; x=1696184340; darn=lists.postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=+eanGqFOwjShf7BxlaNdX/U1dVFYWoWVq2xh7fjkxjg=; b=xbrfsie5XRmaTf7kp6LXRFV/ZF2Jnj6KIF4PFzr/qNC5wAHMMejt9DNVkq5mY7uF8/ +EK/KRvEuDd2EPya0w24An19mW8Ft9gH7TMjD35O+PZasP6za+SlYxnYpaceCvSMeU33 UdvRd5uY/pHuhkNrqjyi1pYC2mBIumL4bOcWvchWTDo2lhzGeR9ETE/LseZ0cbKIdWyq kUnA0NozburMh+4pn+EZHsSOWJzhT6ZHtdWJ8ejGv8OunWLJxquVEBylrOOCssrGbyX9 CAc3LlPa9dB33LHEZ9xa/MvUGye6crJLmwxvjxCVtQzD5baH/cRUPsvxAKladfa5qIik 1gUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695579540; x=1696184340; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=+eanGqFOwjShf7BxlaNdX/U1dVFYWoWVq2xh7fjkxjg=; b=HhnLufc5Sqxu1tSiDeMRnT5XsMwTlcFNHhJnQYxPECgUfpp3CCzQLjEMDL/x4NtDKG yVbM8gErFziQooAMQcIyXb4s7XvIc2wSyvLnbRppXuUwkirsPIqivy0h3l1Nzm+XQbh4 vH4AwQRVK/FaETmlilIOyzUsmSKzB+EyBr7bYEHF+li4gUiqyhF3RUGMCsieNH5a3Xyh K7RXvdxXYQxbO8+sSWBblEUUcp/tDcPadpkKBdf2Vy042BM+f5rciDLmJ/4q3Qq4pBGB 5wTWqTKZ01rc9/9lqOQAb/vbQVjmsP02TOYkQ6OHUf8DR4x8JqehkE9nqfq2gu0VQc1k c6nA== X-Gm-Message-State: AOJu0Yy9Ou/UYAtwmbU/6P2Hm0iwDtbIlLHUNHD1eQjWxzBAF54fh55k zNK0qLYxkuFTEWcOr3X05G9POaHpVn0NagEvgao= X-Google-Smtp-Source: AGHT+IGlYbFB6zgTH+7J7p1C+OzxehQvoIlglZqhWl5iQ2Uab6r2LHD4utOltEFpfyHL+LqP6uGR5w== X-Received: by 2002:a17:906:209e:b0:9b2:794d:62d3 with SMTP id 30-20020a170906209e00b009b2794d62d3mr1771853ejq.14.1695579539636; Sun, 24 Sep 2023 11:18:59 -0700 (PDT) Received: from localhost.localdomain (178-190-175-236.adsl.highway.telekom.at. [178.190.175.236]) by smtp.gmail.com with ESMTPSA id z21-20020a1709063a1500b0099d0c0bb92bsm5262466eje.80.2023.09.24.11.18.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Sep 2023 11:18:59 -0700 (PDT) Message-ID: <7ca26afdae05821f11aaedecb48f0efde052c501.camel@cybertec.at> Subject: Re: jdbc problem From: Laurenz Albe To: Raivo Rebane , pgsql-general@lists.postgresql.org Date: Sun, 24 Sep 2023 20:18:58 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sun, 2023-09-24 at 20:33 +0300, Raivo Rebane wrote: > I hav postgresql 15 installed in my windows computer. >=20 > I have maven java project, wich works temporarly in Eclipse, but mvn inst= all did'nt work. >=20 > Now it works, but I have got error - >=20 > Exception in thread "main" java.lang.NoSuchMethodError: 'org.postgresql.c= ore.Encoding org.postgresql.core.BaseConnection.getEncoding()' > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.postgresql.jdbc2.= AbstractJdbc2ResultSet.getString(AbstractJdbc2ResultSet.java:1889) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.postgresql.jdbc2.= AbstractJdbc2ResultSet.getTimestamp(AbstractJdbc2ResultSet.java:438) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.postgresql.jdbc2.= AbstractJdbc2ResultSet.getTimestamp(AbstractJdbc2ResultSet.java:2406) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at backendproject.Backen= dMain.main(BackendMain.java:64) >=20 > backendproject.BackendMain.main(BackendMain.java:64) line is following - >=20 > Timestamp oldest_timestamp =3D resultSet.getTimestamp("oldest_timestamp")= ; >=20 > Query from Java is following -=20 >=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0S= tring query =3D "SELECT timestamp AS oldest_timestamp FROM mushrooms"; > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0P= reparedStatement statement =3D connection.prepareStatement(query); > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0R= esultSet resultSet =3D 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