View Issue Details

IDProjectCategoryView StatusLast Update
0004237SymmetricDSBugpublic2020-01-15 10:21
ReporterIsidius Assigned To 
Prioritynormal 
Status newResolutionopen 
Product Version3.11.3 
Summary0004237: Firebird + initial load
DescriptionTrying to sync Firebird -> MySQL

While SymDS tries to run an initial load of a table that I configured for monitoring, I get the following exception:

org.jumpmind.db.sql.SqlException: Error converting to long. DATA_ID
        at org.jumpmind.db.sql.AbstractSqlTemplate.translate(AbstractSqlTemplate.java:305)
        at org.jumpmind.db.platform.firebird.FirebirdJdbcSqlTemplate.translate(FirebirdJdbcSqlTemplate.java:62)
        at org.jumpmind.db.sql.AbstractSqlTemplate.translate(AbstractSqlTemplate.java:294)
        at org.jumpmind.db.sql.JdbcSqlTransaction.insertWithGeneratedKey(JdbcSqlTransaction.java:531)
        at org.jumpmind.symmetric.service.impl.DataService.insertData(DataService.java:1963)
        at org.jumpmind.symmetric.service.impl.DataService.insertDataAndDataEventAndOutgoingBatch(DataService.java:2070)
        at org.jumpmind.symmetric.service.impl.DataService.insertNodeSecurityUpdate(DataService.java:2139)
        at org.jumpmind.symmetric.service.impl.DataService.insertSqlEventsPriorToReload(DataService.java:1175)
        at org.jumpmind.symmetric.service.impl.DataService.insertReloadEvents(DataService.java:939)
        at org.jumpmind.symmetric.service.impl.InitialLoadService.processTableRequestLoads(InitialLoadService.java:243)
        at org.jumpmind.symmetric.service.impl.InitialLoadService.queueLoads(InitialLoadService.java:94)
        at org.jumpmind.symmetric.job.InitialLoadJob.doJob(InitialLoadJob.java:43)
        at org.jumpmind.symmetric.job.AbstractJob.invoke(AbstractJob.java:227)
        at org.jumpmind.symmetric.job.AbstractJob.run(AbstractJob.java:298)
        at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
Caused by: org.firebirdsql.jdbc.field.TypeConversionException: Error converting to long. DATA_ID
        at org.firebirdsql.jdbc.field.FBStringField.getLong(FBStringField.java:136)
        at org.firebirdsql.jdbc.field.FBWorkaroundStringField.getLong(FBWorkaroundStringField.java:46)
        at org.firebirdsql.jdbc.AbstractResultSet.getLong(AbstractResultSet.java:631)
        at org.apache.commons.dbcp.DelegatingResultSet.getLong(DelegatingResultSet.java:228)
        at org.apache.commons.dbcp.DelegatingResultSet.getLong(DelegatingResultSet.java:228)
        at org.jumpmind.db.sql.JdbcSqlTemplate.insertWithGeneratedKey(JdbcSqlTemplate.java:855)
        at org.jumpmind.db.sql.JdbcSqlTransaction.insertWithGeneratedKey(JdbcSqlTransaction.java:528)
        ... 18 more
Steps To ReproduceUnable to reproduce independant of database
Additional InformationThe statement that is executed at

        at org.apache.commons.dbcp.DelegatingResultSet.getLong(DelegatingResultSet.java:228)
        at org.jumpmind.db.sql.JdbcSqlTemplate.insertWithGeneratedKey(JdbcSqlTemplate.java:855)
        at org.jumpmind.db.sql.JdbcSqlTransaction.insertWithGeneratedKey(JdbcSqlTransaction.java:528)


is insert into sym_data (data_id, table_name, event_type, row_data, pk_data, old_data, trigger_hist_id, channel_id, external_data, node_list, is_prerouted, transaction_id, create_time) values(null, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, current_timestamp)
TagsNo tags attached.

Activities

Isidius

2020-01-14 14:25

reporter   ~0001676

Apparently, the column DATA_ID of table SYM_DATA is converted into a FBWorkaroundStringField and then a long value is taken although the DATA_ID column is of type double

elong

2020-01-14 14:37

developer   ~0001677

What is the column definition for data_id on sym_data in the database? What version of Firebird are you using?

Isidius

2020-01-14 15:13

reporter   ~0001678

Database: Firebird 3.0.2
Column definition: See screenshot (squirrelSQL client)
symdata.PNG (59,324 bytes)   
symdata.PNG (59,324 bytes)   

Isidius

2020-01-15 10:21

reporter   ~0001679

For convenience, here is the DDL for SYM_DATA as generated by squirrelSQL:
CREATE TABLE SYM_DATA
(
   DATA_ID double precision PRIMARY KEY NOT NULL,
   TABLE_NAME varchar(255) NOT NULL,
   EVENT_TYPE char(1) NOT NULL,
   ROW_DATA blob sub_type 1,
   PK_DATA blob sub_type 1,
   OLD_DATA blob sub_type 1,
   TRIGGER_HIST_ID integer NOT NULL,
   CHANNEL_ID varchar(128),
   TRANSACTION_ID varchar(255),
   SOURCE_NODE_ID varchar(50),
   EXTERNAL_DATA varchar(50),
   NODE_LIST varchar(255),
   IS_PREROUTED smallint DEFAULT 0 NOT NULL,
   CREATE_TIME timestamp
)
;
CREATE INDEX SYM_IDX_D_CHANNEL_ID ON SYM_DATA
(
  DATA_ID,
  CHANNEL_ID
)
;
CREATE UNIQUE INDEX RDB$PRIMARY112 ON SYM_DATA(DATA_ID)
;

Issue History

Date Modified Username Field Change
2020-01-14 14:21 Isidius New Issue
2020-01-14 14:25 Isidius Note Added: 0001676
2020-01-14 14:37 elong Note Added: 0001677
2020-01-14 15:13 Isidius File Added: symdata.PNG
2020-01-14 15:13 Isidius Note Added: 0001678
2020-01-15 10:21 Isidius Note Added: 0001679