View Issue Details

IDProjectCategoryView StatusLast Update
0003953SymmetricDSBugpublic2019-05-17 13:25
ReporterenwonyAssigned Toelong 
Prioritynormal 
Status resolvedResolutionfixed 
Product Version3.10.2 
Target Version3.10.3Fixed in Version3.10.3 
Summary0003953: Firebird 2.5 trying to recreate existing tables (metadata problem with Jaybird 3.x driver)
DescriptionIt looks like lower-case table name used for searching while upper-case name created initally.

Part of logfile from second restart, all tables already exists in database:

2019-05-11 05:06:37,739 INFO [server] [Firebird21SymmetricDialect] [symmetric-engine-startup-1] Checking if SymmetricDS tables need created or altered
2019-05-11 05:06:38,145 DEBUG [server] [ModelComparator] [symmetric-engine-startup-1] Table SYM_CHANNEL needs to be added
...
2019-05-11 05:06:38,176 INFO [server] [Firebird21SymmetricDialect] [symmetric-engine-startup-1] There are SymmetricDS tables that needed altered
2019-05-11 05:06:38,192 WARN [server] [Firebird21SymmetricDialect] [symmetric-engine-startup-1] DDL failed: CREATE TABLE "SYM_CHANNEL"(
...

I found message on sourceforge that may rely to this (first message mention same situation, but it refer to older versions)
https://sourceforge.net/p/symmetricds/discussion/739236/thread/02bddf3b/

PS: reproduced even if I specify encoding in server.properties
Steps To Reproduce1. Installed JRE1.8.0.211
2. Installed firebird 2.5.8.27089
3. Installed Symmetrics DS 3.10.2
4. Tuned conf/log4j.xml for extended logging
5. Tuned one engine file (attached).
6. Created empty local DB in firebird.
7. Started symmetricds server, wait 1 min to populate database with Sym_* tables.
8. Restart symmetricds server, got error in log (unsuccessful metadata update; Table SYM_CHANNEL already exists) and no longer in-sync

Expected: symmetricsds server continue work after restart.
Tagsdialect: firebird, install

Activities

enwony

2019-05-10 15:20

reporter  

server.properties (265 bytes)
symmetric.log (166,848 bytes)

elong

2019-05-13 13:28

developer   ~0001468

Does it work if you remove the "native" from the db.url? That's how the unit tests run, using the pure Java driver.

enwony

2019-05-13 14:34

reporter   ~0001470

I set driver as java (db.url=jdbc:firebirdsql://localhost/C:/TestSync/mydb.fdb) in server.properties and restarted server, same error message appear.

elong

2019-05-13 15:55

developer   ~0001473

Reproduced using SymmetricDS 3.10.2 and Firebird 2.5 on Windows. Needs to be running on Windows to reproduce. Using SymmetricDS 3.9.20 works fine.

elong

2019-05-13 16:09

developer   ~0001474

It appears to be the Jaybird JDBC driver. If I take the jaybird 2.1.6 JDBC driver from SymmetricDS 3.9 and use it with SymmetricDS 3.10, then everything is working.

enwony

2019-05-16 12:19

reporter   ~0001491

Original problematic Jaybird version is 3.0.5; after deleting lib/jaybird-jdk18-3.0.5.jar and placing lib/jaybird-2.1.6.jar from symmetric-server-3.10.2.zip everything work fine (can be used as workaround).

Anyway, what is source of that?

Issue reproduced with jaybird 2.2.15.

As I understood, issue depends on things described in p. 3.4.5 of https://www.firebirdsql.org/file/documentation/drivers_documentation/java/2.2.15/release_notes.html (changes since 2.2 release in jaybird).
It states that In Jaybird 3.0 meta data methods will no longer do the following:
* Remove quotes around object names
* Trying the uppercase value, when the original parameter value failed to produce results
in order to follow stricter JDBC compliance

In log I can see application uses create query with quoted identifiers (CREATE TABLE "SYM_CHANNEL" ...), so should it check existance also uppercased?

Issue History

Date Modified Username Field Change
2019-05-10 15:20 enwony New Issue
2019-05-10 15:20 enwony File Added: server.properties
2019-05-10 15:20 enwony File Added: symmetric.log
2019-05-10 16:46 elong Tag Attached: dialect: firebird
2019-05-10 16:46 elong Tag Attached: install
2019-05-13 13:28 elong Note Added: 0001468
2019-05-13 13:29 elong Status new => feedback
2019-05-13 14:34 enwony Note Added: 0001470
2019-05-13 14:34 enwony Status feedback => new
2019-05-13 15:55 elong Status new => confirmed
2019-05-13 15:55 elong Note Added: 0001473
2019-05-13 16:09 elong Note Added: 0001474
2019-05-16 12:19 enwony Note Added: 0001491
2019-05-17 13:20 elong Summary Firebird 2.5 trying to recreate existing tables (error in case-sensivity?) => Firebird 2.5 trying to recreate existing tables (metadata problem with Jaybird 3.x driver)
2019-05-17 13:20 elong Description Updated View Revisions
2019-05-17 13:20 elong Steps to Reproduce Updated View Revisions
2019-05-17 13:25 elong Assigned To => elong
2019-05-17 13:25 elong Status confirmed => resolved
2019-05-17 13:25 elong Resolution open => fixed
2019-05-17 13:25 elong Fixed in Version => 3.10.3
2019-05-17 13:25 elong Target Version => 3.10.3