View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005160 | SymmetricDS | Bug | public | 2021-12-15 11:30 | 2022-08-01 19:35 |
Reporter | kiran0528 | Assigned To | elong | ||
Priority | high | ||||
Status | closed | Resolution | fixed | ||
Product Version | 3.13.1 | ||||
Target Version | 3.13.3 | Fixed in Version | 3.13.3 | ||
Summary | 0005160: Db2DdlReader - Failed to read table | ||||
Description | Using SymmetricDS dbexport command we are facing below issue in 13.1 version [] - JdbcDatabasePlatformFactory - Detected database 'DB2/AIX64', version '11', protocol 'db2' [] - JdbcDatabasePlatformFactory - The IDatabasePlatform being used is org.jumpmind.db.platform.db2.Db2DatabasePlatform [] - Db2DdlReader - Failed to read table: EMPL_SALRY_HIST. Error: null ------------------------------------------------------------------------------- An exception occurred. Please see the following for details: ------------------------------------------------------------------------------- java.lang.NullPointerException at org.jumpmind.db.platform.db2.Db2DdlReader.removeGeneratedColumns(Db2DdlReader.java:334) at org.jumpmind.db.platform.AbstractJdbcDdlReader.readTable(AbstractJdbcDdlReader.java:668) at org.jumpmind.db.platform.db2.Db2DdlReader.readTable(Db2DdlReader.java:99) at org.jumpmind.db.platform.AbstractJdbcDdlReader$3.execute(AbstractJdbcDdlReader.java:553) at org.jumpmind.db.platform.AbstractJdbcDdlReader$3.execute(AbstractJdbcDdlReader.java:535) at org.jumpmind.db.sql.JdbcSqlTemplate.execute(JdbcSqlTemplate.java:490) at org.jumpmind.db.platform.AbstractJdbcDdlReader.readTable(AbstractJdbcDdlReader.java:535) at org.jumpmind.db.platform.AbstractDatabasePlatform.readTableFromDatabase(AbstractDatabasePlatform.java:282) at org.jumpmind.symmetric.io.data.DbExport.exportTables(DbExport.java:125) at org.jumpmind.symmetric.DbExportCommand.executeWithOptions(DbExportCommand.java:185) at org.jumpmind.symmetric.AbstractCommandLauncher.execute(AbstractCommandLauncher.java:155) at org.jumpmind.symmetric.DbExportCommand.main(DbExportCommand.java:60) Could you please help us to resolve this issue | ||||
Tags | No tags attached. | ||||
|
I checked in a fix for 3.13.3 to prevent that error. However, in order to get that error, it would need a table without any columns. So I think there is a deeper problem, and there will be a new error. Maybe use the same login to DB2 with DBeaver or SQuirrelSQL (interactive SQL tools that also use JDBC) and see if they can view the tables with their columns. It could be a permission problem or wrong version of driver. |
|
We have downloaded and tested with 3.13.3,the issue is still exists. Could you please let us know the path of latest DB2 drivers. Our DB2 database version is v11.5.5.0 Also,as mentioned in previous comment we have checked below points --> We have checked the Permission issues ---> We logged to DB2 with DBeaver or DB visualizer and able to view the tables with their columns. Please suggest us the solution. |
|
Can you provide the symmetric and wrapper logs under the logs directory of the symmetric installation? |
|
I've attached the symmetric logs in the attachments,but i didn't get the wrapper logs under logs directory symmetric.log (3,033 bytes)
2022-01-18 12:33:14,851 INFO [] [AbstractCommandLauncher] [main] Option: name=no-create-info, value={} 2022-01-18 12:33:14,860 INFO [] [AbstractCommandLauncher] [main] Option: name=format, value={csv} 2022-01-18 12:33:14,860 INFO [] [AbstractCommandLauncher] [main] Option: name=compatible, value={mysql} 2022-01-18 12:33:14,860 INFO [] [AbstractCommandLauncher] [main] Option: name=engine, value={MMRStage_corp-000} 2022-01-18 12:33:14,860 INFO [] [AbstractCommandLauncher] [main] Option: name=dir, value={C:\Users\kkiran22\Documents\Db2} 2022-01-18 12:33:14,861 INFO [] [AbstractCommandLauncher] [main] Option: name=schema, value={EBMMRPRD} 2022-01-18 12:33:14,882 INFO [] [ClientSymmetricEngine] [main] Initializing connection to database 2022-01-18 12:33:54,504 INFO [] [AbstractCommandLauncher] [main] Option: name=no-create-info, value={} 2022-01-18 12:33:54,512 INFO [] [AbstractCommandLauncher] [main] Option: name=format, value={csv} 2022-01-18 12:33:54,512 INFO [] [AbstractCommandLauncher] [main] Option: name=compatible, value={mysql} 2022-01-18 12:33:54,513 INFO [] [AbstractCommandLauncher] [main] Option: name=engine, value={MMRStage_corp-000} 2022-01-18 12:33:54,513 INFO [] [AbstractCommandLauncher] [main] Option: name=dir, value={C:\Users\kkiran22\Documents\Db2} 2022-01-18 12:33:54,514 INFO [] [AbstractCommandLauncher] [main] Option: name=schema, value={EBMMRPRD} 2022-01-18 12:33:54,532 INFO [] [ClientSymmetricEngine] [main] Initializing connection to database 2022-01-18 12:33:59,682 INFO [] [JdbcDatabasePlatformFactory] [main] Detected database 'DB2/AIX64', version '11', protocol 'db2' 2022-01-18 12:34:00,807 INFO [] [JdbcDatabasePlatformFactory] [main] The IDatabasePlatform being used is org.jumpmind.db.platform.db2.Db2DatabasePlatform 2022-01-18 12:34:09,876 ERROR [] [Db2DdlReader] [main] Failed to read table: EMPL_SALRY_HIST. Error: null 2022-01-18 15:35:22,528 INFO [] [AbstractCommandLauncher] [main] Option: name=no-create-info, value={} 2022-01-18 15:35:22,536 INFO [] [AbstractCommandLauncher] [main] Option: name=format, value={csv} 2022-01-18 15:35:22,536 INFO [] [AbstractCommandLauncher] [main] Option: name=compatible, value={mysql} 2022-01-18 15:35:22,536 INFO [] [AbstractCommandLauncher] [main] Option: name=engine, value={MMRStage_corp-000} 2022-01-18 15:35:22,544 INFO [] [AbstractCommandLauncher] [main] Option: name=dir, value={C:\Users\kkiran22\Documents\Db2} 2022-01-18 15:35:22,545 INFO [] [AbstractCommandLauncher] [main] Option: name=schema, value={EBMMRPRD} 2022-01-18 15:35:22,564 INFO [] [ClientSymmetricEngine] [main] Initializing connection to database 2022-01-18 15:35:27,259 INFO [] [JdbcDatabasePlatformFactory] [main] Detected database 'DB2/AIX64', version '11', protocol 'db2' 2022-01-18 15:35:28,409 INFO [] [JdbcDatabasePlatformFactory] [main] The IDatabasePlatform being used is org.jumpmind.db.platform.db2.Db2DatabasePlatform 2022-01-18 15:35:32,211 ERROR [] [Db2DdlReader] [main] Failed to read table: EMPL_SALRY_HIST. Error: null |
|
Any suggestions on this error |
|
Can you put the following log4j line into the conf/log4j2.xml file and run again, then attach the log again? <Logger name="org.jumpmind.db.platform" level="DEBUG"/> |
|
We have added the given line in conf/log4j2.xml and here the log. 2022-01-27 03:49:40,116 DEBUG [] [Db2DdlReader] [main] reading table: EMPL_SALRY_HIST 2022-01-27 03:49:40,676 DEBUG [] [Db2DdlReader] [main] getting table metadata for EMPL_SALRY_HIST 2022-01-27 03:49:40,975 DEBUG [] [Db2DdlReader] [main] done getting table metadata for EMPL_SALRY_HIST 2022-01-27 03:49:43,363 DEBUG [] [Db2DdlReader] [main] getting pk info 2022-01-27 03:49:43,642 DEBUG [] [Db2DdlReader] [main] done getting pk info 2022-01-27 03:49:43,989 ERROR [] [Db2DdlReader] [main] Failed to read table: EMPL_SALRY_HIST. Error: null symmetric-2.log (4,614 bytes)
2022-01-18 12:33:14,851 INFO [] [AbstractCommandLauncher] [main] Option: name=no-create-info, value={} 2022-01-18 12:33:14,860 INFO [] [AbstractCommandLauncher] [main] Option: name=format, value={csv} 2022-01-18 12:33:14,860 INFO [] [AbstractCommandLauncher] [main] Option: name=compatible, value={mysql} 2022-01-18 12:33:14,860 INFO [] [AbstractCommandLauncher] [main] Option: name=engine, value={MMRStage_corp-000} 2022-01-18 12:33:14,860 INFO [] [AbstractCommandLauncher] [main] Option: name=dir, value={C:\Users\kkiran22\Documents\Db2} 2022-01-18 12:33:14,861 INFO [] [AbstractCommandLauncher] [main] Option: name=schema, value={EBMMRPRD} 2022-01-18 12:33:14,882 INFO [] [ClientSymmetricEngine] [main] Initializing connection to database 2022-01-18 12:33:54,504 INFO [] [AbstractCommandLauncher] [main] Option: name=no-create-info, value={} 2022-01-18 12:33:54,512 INFO [] [AbstractCommandLauncher] [main] Option: name=format, value={csv} 2022-01-18 12:33:54,512 INFO [] [AbstractCommandLauncher] [main] Option: name=compatible, value={mysql} 2022-01-18 12:33:54,513 INFO [] [AbstractCommandLauncher] [main] Option: name=engine, value={MMRStage_corp-000} 2022-01-18 12:33:54,513 INFO [] [AbstractCommandLauncher] [main] Option: name=dir, value={C:\Users\kkiran22\Documents\Db2} 2022-01-18 12:33:54,514 INFO [] [AbstractCommandLauncher] [main] Option: name=schema, value={EBMMRPRD} 2022-01-18 12:33:54,532 INFO [] [ClientSymmetricEngine] [main] Initializing connection to database 2022-01-18 12:33:59,682 INFO [] [JdbcDatabasePlatformFactory] [main] Detected database 'DB2/AIX64', version '11', protocol 'db2' 2022-01-18 12:34:00,807 INFO [] [JdbcDatabasePlatformFactory] [main] The IDatabasePlatform being used is org.jumpmind.db.platform.db2.Db2DatabasePlatform 2022-01-18 12:34:09,876 ERROR [] [Db2DdlReader] [main] Failed to read table: EMPL_SALRY_HIST. Error: null 2022-01-18 15:35:22,528 INFO [] [AbstractCommandLauncher] [main] Option: name=no-create-info, value={} 2022-01-18 15:35:22,536 INFO [] [AbstractCommandLauncher] [main] Option: name=format, value={csv} 2022-01-18 15:35:22,536 INFO [] [AbstractCommandLauncher] [main] Option: name=compatible, value={mysql} 2022-01-18 15:35:22,536 INFO [] [AbstractCommandLauncher] [main] Option: name=engine, value={MMRStage_corp-000} 2022-01-18 15:35:22,544 INFO [] [AbstractCommandLauncher] [main] Option: name=dir, value={C:\Users\kkiran22\Documents\Db2} 2022-01-18 15:35:22,545 INFO [] [AbstractCommandLauncher] [main] Option: name=schema, value={EBMMRPRD} 2022-01-18 15:35:22,564 INFO [] [ClientSymmetricEngine] [main] Initializing connection to database 2022-01-18 15:35:27,259 INFO [] [JdbcDatabasePlatformFactory] [main] Detected database 'DB2/AIX64', version '11', protocol 'db2' 2022-01-18 15:35:28,409 INFO [] [JdbcDatabasePlatformFactory] [main] The IDatabasePlatform being used is org.jumpmind.db.platform.db2.Db2DatabasePlatform 2022-01-18 15:35:32,211 ERROR [] [Db2DdlReader] [main] Failed to read table: EMPL_SALRY_HIST. Error: null 2022-01-27 03:49:33,738 INFO [] [AbstractCommandLauncher] [main] Option: name=no-create-info, value={} 2022-01-27 03:49:33,747 INFO [] [AbstractCommandLauncher] [main] Option: name=format, value={csv} 2022-01-27 03:49:33,747 INFO [] [AbstractCommandLauncher] [main] Option: name=compatible, value={mysql} 2022-01-27 03:49:33,748 INFO [] [AbstractCommandLauncher] [main] Option: name=engine, value={MMRStage_corp-000} 2022-01-27 03:49:33,748 INFO [] [AbstractCommandLauncher] [main] Option: name=dir, value={C:\Users\kkiran22\Documents\Db2} 2022-01-27 03:49:33,748 INFO [] [AbstractCommandLauncher] [main] Option: name=schema, value={EBMMRPRD} 2022-01-27 03:49:33,772 INFO [] [ClientSymmetricEngine] [main] Initializing connection to database 2022-01-27 03:49:38,970 INFO [] [JdbcDatabasePlatformFactory] [main] Detected database 'DB2/AIX64', version '11', protocol 'db2' 2022-01-27 03:49:40,111 INFO [] [JdbcDatabasePlatformFactory] [main] The IDatabasePlatform being used is org.jumpmind.db.platform.db2.Db2DatabasePlatform 2022-01-27 03:49:40,116 DEBUG [] [Db2DdlReader] [main] reading table: EMPL_SALRY_HIST 2022-01-27 03:49:40,676 DEBUG [] [Db2DdlReader] [main] getting table metadata for EMPL_SALRY_HIST 2022-01-27 03:49:40,975 DEBUG [] [Db2DdlReader] [main] done getting table metadata for EMPL_SALRY_HIST 2022-01-27 03:49:43,363 DEBUG [] [Db2DdlReader] [main] getting pk info 2022-01-27 03:49:43,642 DEBUG [] [Db2DdlReader] [main] done getting pk info 2022-01-27 03:49:43,989 ERROR [] [Db2DdlReader] [main] Failed to read table: EMPL_SALRY_HIST. Error: null |
|
Any suggestions on the attached log, we are able to connect other RDBMS(Oracle,Mysql,PostgreSQL) only DB2 database it is unable to read the table. |
|
I would try changing the JDBC driver. In the DB2 installation directory, you should be able to find a "jdbc" folder that contains the compatible type-4 JDBC driver named db2jcc*.jar. Copy that file to the "lib" directory of SymmetricDS and remove the old db2jcc JAR that it was using. |
SymmetricDS: 3.13 488bda53 2022-01-03 16:10:35 Details Diff |
0005160: Db2DdlReader - Failed to read table |
Affected Issues 0005160 |
|
mod - symmetric-jdbc/src/main/java/org/jumpmind/db/platform/db2/Db2DdlReader.java | Diff File | ||
SymmetricDS: 3.14 48113318 2022-01-03 16:10:35 Details Diff |
0005160: Db2DdlReader - Failed to read table |
Affected Issues 0005160 |
|
mod - symmetric-jdbc/src/main/java/org/jumpmind/db/platform/db2/Db2DdlReader.java | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2021-12-15 11:30 | kiran0528 | New Issue | |
2022-01-03 16:15 | elong | Assigned To | => elong |
2022-01-03 16:15 | elong | Status | new => assigned |
2022-01-03 16:15 | elong | Note Added: 0002046 | |
2022-01-03 16:18 | elong | Status | assigned => feedback |
2022-01-03 17:00 | admin | Changeset attached | => SymmetricDS 3.13 488bda53 |
2022-01-03 17:00 | admin | Changeset attached | => SymmetricDS 3.14 48113318 |
2022-01-18 11:51 | kiran0528 | Note Added: 0002048 | |
2022-01-18 11:51 | kiran0528 | Status | feedback => assigned |
2022-01-19 18:42 | pmarzullo | Status | assigned => feedback |
2022-01-19 18:42 | pmarzullo | Note Added: 0002050 | |
2022-01-20 06:34 | kiran0528 | Note Added: 0002051 | |
2022-01-20 06:34 | kiran0528 | File Added: symmetric.log | |
2022-01-20 06:34 | kiran0528 | Status | feedback => assigned |
2022-01-25 14:42 | kiran0528 | Note Added: 0002053 | |
2022-01-26 18:07 | pmarzullo | Status | assigned => feedback |
2022-01-26 18:07 | pmarzullo | Note Added: 0002055 | |
2022-01-26 22:22 | kiran0528 | Note Added: 0002056 | |
2022-01-26 22:22 | kiran0528 | File Added: symmetric-2.log | |
2022-01-26 22:22 | kiran0528 | Status | feedback => assigned |
2022-01-29 14:37 | kiran0528 | Note Added: 0002057 | |
2022-01-31 20:05 | elong | Note Added: 0002058 | |
2022-01-31 20:16 | elong | Status | assigned => feedback |
2022-08-01 19:35 | elong | Status | feedback => closed |
2022-08-01 19:35 | elong | Resolution | open => fixed |
2022-08-01 19:35 | elong | Fixed in Version | => 3.13.3 |