pgspider / jdbc_fdw

JDBC Foreign Data Wrapper for PostgreSQL
Other
61 stars 20 forks source link

problem with connection to db2 for i #8

Open peter1504 opened 2 years ago

peter1504 commented 2 years ago

Hi, we try to connect fom Rocky Linux 9 to db2 for i (AS400) with different jdbc drivers (for example jt400-10.6.jar) with different settings.

But we always hit an exeption in those jdbc drivers, that always point to IMPORT FOREIGN SCHEMA TEST FROM server jdbc_db2 into DB2_01 OPTIONS (recreate 'true'); Exception in thread "Thread-6" java.sql.SQLException: [SQL7049] Die Grenze eines internen Objekts wurde überschritten. at com.ibm.as400.access.JDError.createSQLExceptionSubClass(JDError.java:962) at com.ibm.as400.access.JDError.throwSQLException(JDError.java:745) at com.ibm.as400.access.AS400JDBCStatement.commonExecute(AS400JDBCStatement.java:1084) at com.ibm.as400.access.AS400JDBCPreparedStatementImpl.execute(AS400JDBCPreparedStatementImpl.java:1434) at com.ibm.as400.access.AS400JDBCDatabaseMetaData.getColumns(AS400JDBCDatabaseMetaData.java:1106) at JDBCUtils.getColumnNames(JDBCUtils.java:335)

Further investigation implies that possibly opened resources are not freed by jdbc_fdw.

Any help is appreciated.

Regards

Peter

nxhai98 commented 1 year ago

Hi @peter1504,

Thank for your reporting.

db2 for i is not a target of jdbc_fdw for now. It will have some unexpected behaviors when connect to db2 for i.

However, there is an issue related to IMPORT FOREIGN SCHEMA make this feature work correctly with GridDB only. We will fix it and release for you soon.

Thank you and best regards.