View Issue Details

IDProjectCategoryView StatusLast Update
0006901SymmetricDSBugpublic2025-05-27 17:13
Reporterpbelov Assigned Toelong  
Prioritynormal 
Status resolvedResolutionfixed 
Product Version3.16.0 
Target Version3.16.3Fixed in Version3.16.3 
Summary0006901: Init of engine fails to query non-existent sym_parameter table on DB2 for i (AS400)
DescriptionThe init() method of AbstractSymmetricEngine fails when SYM_PARAMETER table has not yet been created. The sym_parameter table is found in another library, so it tries to query SYM_PARAMETER and gets an error about the table missing.

Also, this prevents users of the symadmin utility from creating new SymmetricDS tables on a new database endpoint.

The platform gets the default schema by checking which library is assigned to the user. If no library is assigned, then the lookup for SYM_PARAMETER table scans any library for the table. The workaround is to assign a library to the user. The platform should check "CURRENT SCHEMA" if the schema is blank, and warn about missing assignment.
Steps To ReproduceThe "new client joining existing replication" scenario:
1. Run an existing SymmetricDS service (registration server).
2. Provision new database on a client.
2. New installation of SymmetricDS 3.16.2 on a client
3. Start the SymmetricDS on a client.
4. Step through the Join Existing replication wizard:
  On the last step UI hangs while displaying "Installing Node..."
   Logs show Exception [SymmetricEngineHolder] [background-refresher-2] Failed to initialize engine


The "symadmin" scenario:
1. Provision new database.
2. New installation of SymmetricDS 3.16.2
3. Create new engine file (TEST.properties) and specify database connection details.
4. Run command to create internal tables:
bin/symadmin create-sym-tables --engine TEST
5. Observe the sqlException at org.jumpmind.symmetric.AbstractSymmetricEngine.init(AbstractSymmetricEngine.java:285)
Additional Information  _____ __ _ ____ _____
  / ___/ __ _____ __ ___ __ ___ _/ /_ ____(_)___ / __ | / ___/
  \__ \ / / / / _ `_ \/ _ `_ \/ _ \/_ __// __/ / __/ / / / / \__ \
 ___/ // /_/ / // // / // // / __// / / / / / /_ / /_/ / ___/ /
/____/ \__ /_//_//_/_//_//_/\___/ \_/ /_/ /_/\__/ /_____/ /____/
      /____/
+-----------------------------------------------------------------+
| Copyright (C) 2007-2025 JumpMind, Inc. |
| |
| Licensed under one or more agreements from JumpMind, Inc. |
| See doc/license.html |
+-----------------------------------------------------------------+
[Windsor] - ClientSymmetricEngine - Initializing connection to database
[Windsor] - JdbcDatabasePlatformFactory - Detected database 'db2as400', version '7, minor version '4', protocol 'as400'
[Windsor] - JdbcDatabasePlatformFactory - The IDatabasePlatform being used is com.jumpmind.symmetric.console.impl.eK
[Windsor] - JdbcSqlTemplate - (216ms.) SELECT SCHEMA_NAME FROM QSYS2.LIBRARY_LIST_INFO WHERE TYPE = 'CURRENT'
[Windsor] - ParameterService - Could not read database parameters and they have not yet been initialized
[Windsor] - AbstractSymmetricEngine - Stopping SymmetricDS externalId=Windsor version=3.16.2.RC3 database=?
-------------------------------------------------------------------------------
An exception occurred. Please see the following for details:
-------------------------------------------------------------------------------
com.ibm.as400.access.AS400JDBCSQLSyntaxErrorException: [SQL0204] SYM_PARAMETER in SYMDSWFST type *FILE not found.
        at com.ibm.as400.access.JDError.createSQLExceptionSubClass(JDError.java:945)
        at com.ibm.as400.access.JDError.throwSQLException(JDError.java:742)
        at com.ibm.as400.access.AS400JDBCStatement.commonPrepare(AS400JDBCStatement.java:1790)
        at com.ibm.as400.access.AS400JDBCPreparedStatementImpl.<init>(AS400JDBCPreparedStatementImpl.java:357)
        at com.ibm.as400.access.AS400JDBCConnectionImpl.prepareStatement(AS400JDBCConnectionImpl.java:2283)
        at com.ibm.as400.access.AS400JDBCConnectionImpl.prepareStatement(AS400JDBCConnectionImpl.java:2208)
        at org.apache.commons.dbcp2.DelegatingConnection.prepareStatement(DelegatingConnection.java:739)
        at org.apache.commons.dbcp2.DelegatingConnection.prepareStatement(DelegatingConnection.java:739)
        at org.jumpmind.db.sql.JdbcSqlReadCursor.<init>(JdbcSqlReadCursor.java:73)
 [wrapped] org.jumpmind.db.sql.SqlException: Failed to execute sql: select param_key, param_value from sym_parameter where external_id=? and node_group_id=?
        at org.jumpmind.db.sql.AbstractSqlTemplate.translate(AbstractSqlTemplate.java:308)
        at org.jumpmind.db.sql.JdbcSqlReadCursor.<init>(JdbcSqlReadCursor.java:101)
        at org.jumpmind.db.sql.JdbcSqlTemplate.queryForCursor(JdbcSqlTemplate.java:157)
        at org.jumpmind.db.sql.JdbcSqlTemplate.queryForCursor(JdbcSqlTemplate.java:145)
        at org.jumpmind.db.sql.AbstractSqlTemplate.query(AbstractSqlTemplate.java:207)
        at org.jumpmind.db.sql.AbstractSqlTemplate.query(AbstractSqlTemplate.java:202)
        at org.jumpmind.db.sql.AbstractSqlTemplate.query(AbstractSqlTemplate.java:192)
        at org.jumpmind.db.sql.AbstractSqlTemplate.query(AbstractSqlTemplate.java:128)
        at org.jumpmind.symmetric.service.impl.ParameterService.readParametersFromDatabase(ParameterService.java:152)
        at org.jumpmind.symmetric.service.impl.ParameterService.getDatabaseParameters(ParameterService.java:201)
        at org.jumpmind.symmetric.service.impl.AbstractParameterService.rereadDatabaseParameters(AbstractParameterService.java:275)
        at org.jumpmind.symmetric.service.impl.ParameterService.rereadApplicationParameters(ParameterService.java:180)
        at org.jumpmind.symmetric.service.impl.AbstractParameterService.getParameters(AbstractParameterService.java:155)
        at org.jumpmind.symmetric.service.impl.AbstractParameterService.rereadParameters(AbstractParameterService.java:147)
        at org.jumpmind.symmetric.AbstractSymmetricEngine.init(AbstractSymmetricEngine.java:285)
        at org.jumpmind.symmetric.ClientSymmetricEngine.init(ClientSymmetricEngine.java:192)
        at org.jumpmind.symmetric.ClientSymmetricEngine.<init>(ClientSymmetricEngine.java:134)
        at org.jumpmind.symmetric.ClientSymmetricEngine.<init>(ClientSymmetricEngine.java:139)
        at org.jumpmind.symmetric.AbstractCommandLauncher.getSymmetricEngine(AbstractCommandLauncher.java:269)
        at org.jumpmind.symmetric.AbstractCommandLauncher.getSymmetricEngine(AbstractCommandLauncher.java:261)
        at org.jumpmind.symmetric.SymmetricAdmin.createSymTables(SymmetricAdmin.java:892)
        at org.jumpmind.symmetric.SymmetricAdmin.executeWithOptions(SymmetricAdmin.java:400)
        at org.jumpmind.symmetric.AbstractCommandLauncher.execute(AbstractCommandLauncher.java:155)
        at org.jumpmind.symmetric.SymmetricAdmin.main(SymmetricAdmin.java:172)
-------------------------------------------------------------------------------
Tagsdialect: db2

Relationships

related to 0005774 closedjosh-a-hicks SymmetricDS Support for capturing the row identifier on various platforms if available (default is false) 
related to 0005776 closedjosh-a-hicks SymmetricDS Pro DB2 iSeries AS400 support for RRN (row identifier column) to be captured and sent during CDC and initial load. 

Activities

pbelov

2025-05-23 20:57

manager   ~0002986

PR https://github.com/JumpMind/symmetric-pro/pull/307/files
It fixes the blank default schema and the RRN trigger problem.

Related Changesets

SymmetricDS: 3.16 27d86423

2025-05-23 19:55:22

admin

Details Diff
0006901: clean up Affected Issues
0006901
mod - symmetric-client/src/main/java/org/jumpmind/symmetric/db/db2/Db2As400TriggerTemplate.java Diff File
mod - symmetric-core/src/main/java/org/jumpmind/symmetric/AbstractSymmetricEngine.java Diff File

Issue History

Date Modified Username Field Change
2025-05-22 12:44 pbelov New Issue
2025-05-22 12:44 pbelov Status new => assigned
2025-05-22 12:44 pbelov Assigned To => pbelov
2025-05-22 13:11 pbelov Steps to Reproduce Updated View Revisions
2025-05-23 19:43 elong Summary The init() method of AbstractSymmetricEngine fails when SYM_PARAMETER table hod not yet been created => Init of engine fails to query non-existent sym_parameter table on DB2 for i
2025-05-23 19:43 elong Description Updated View Revisions
2025-05-23 19:46 elong Status assigned => resolved
2025-05-23 19:46 elong Resolution open => fixed
2025-05-23 19:46 elong Fixed in Version => 3.16.3
2025-05-23 19:53 elong Relationship added related to 0005774
2025-05-23 19:54 elong Relationship added related to 0005776
2025-05-23 20:00 admin Changeset attached => SymmetricDS 3.16 27d86423
2025-05-23 20:57 pbelov Status resolved => assigned
2025-05-23 20:57 pbelov Summary Init of engine fails to query non-existent sym_parameter table on DB2 for i => Init of engine fails to query non-existent sym_parameter table on DB2 for i (AS400)
2025-05-23 20:57 pbelov Note Added: 0002986
2025-05-23 20:58 pbelov Tag Attached: dialect: db2
2025-05-27 17:13 pbelov Assigned To pbelov => elong
2025-05-27 17:13 pbelov Status assigned => resolved