pgspider / jdbc_fdw

JDBC Foreign Data Wrapper for PostgreSQL
Other
69 stars 23 forks source link

ERROR "JDBCConnection.java uses or overrides a deprecated API." when building jdbc_fdw on Debian 12 with default jdk 17 and PostgreSQL 15 or 16 #35

Closed JosefMachytkaNetApp closed 7 months ago

JosefMachytkaNetApp commented 7 months ago

Hi guys, I am trying to build this extension release 0.4.0 on Debian 12 with default jdk 17 and PostgreSQL 16. Found this description https://gist.github.com/dossy/bade960542bc7c6fccfac8e2c822d340 which helped me to start build but first make command fails with Java error:

JDBCUtils.java:29: error: error while writing JDBCUtils: /usr/lib/postgresql/16/lib/JDBCUtils.class
public class JDBCUtils {
       ^
Note: JDBCConnection.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error
make: *** [Makefile:37: JAVAFILES] Error 1

And I am unable to find any working solution for it. Could someone help me or give me some hints? Thank you very much.


Update - based on https://github.com/pgspider/jdbc_fdw/issues/26 I tried release 0.4.0 on VM with Debian 12, default jdk 17, gcc 12.2. and PostgreSQL 15 but I get the same error shown above. So for me build with PG 15 does not work either.

JosefMachytkaNetApp commented 7 months ago

So, problem seems to be with release file. Build from main branch of repository works, build from https://github.com/pgspider/jdbc_fdw/archive/refs/tags/v0.4.0.zip source code fails.

JosefMachytkaNetApp commented 7 months ago

Closing this issue since there is a workaround. But maybe someone could look at it why build fails with official release file? Thank you.