View Issue Details

IDProjectCategoryView StatusLast Update
0004211SymmetricDSBugpublic2020-01-02 14:42
Reportermmichalek Assigned Toelong  
Prioritynormal 
Status closedResolutionfixed 
Product Version3.11.2 
Target Version3.11.3Fixed in Version3.11.3 
Summary0004211: MSSQL JDBC 7.4 with Azure causing NullPointerException while reading tables
DescriptionReport on open source forums:

I was writing up this post to ask for help getting the tutorial to work with Azure SQL and MSSQL JDBC, but in the process I discovered that it was MSSQL JDBC 7.4 that was the problem, 7.2 works properly, at least with SymmetricDS 3.11.2.

When the service starts, the key error message is not very descriptive or helpful:

[corp-000] - AbstractSymmetricEngine - Stopping SymmetricDS externalId=000 version=3.11.2 database=?
[corp-000] - SymmetricEngineHolder -
java.lang.NullPointerException
at org.jumpmind.db.platform.mssql.MsSqlDdlReader.readTable(MsSqlDdlReader.java:99)
at org.jumpmind.db.platform.AbstractJdbcDdlReader$3.execute(AbstractJdbcDdlReader.java:588)
at org.jumpmind.db.platform.AbstractJdbcDdlReader$3.execute(AbstractJdbcDdlReader.java:573)
at org.jumpmind.db.sql.JdbcSqlTemplate.execute(JdbcSqlTemplate.java:517)
at org.jumpmind.db.platform.AbstractJdbcDdlReader.readTable(AbstractJdbcDdlReader.java:573)
at org.jumpmind.db.platform.AbstractDatabasePlatform.readTableFromDatabase(AbstractDatabasePlatform.java:273)
at org.jumpmind.symmetric.AbstractSymmetricEngine.init(AbstractSymmetricEngine.java:321)
at org.jumpmind.symmetric.ClientSymmetricEngine.init(ClientSymmetricEngine.java:202)
at org.jumpmind.symmetric.web.ServerSymmetricEngine.init(ServerSymmetricEngine.java:80)
at org.jumpmind.symmetric.ClientSymmetricEngine.<init>(ClientSymmetricEngine.java:158)
at org.jumpmind.symmetric.web.ServerSymmetricEngine.<init>(ServerSymmetricEngine.java:59)
at org.jumpmind.symmetric.web.SymmetricEngineHolder.create(SymmetricEngineHolder.java:285)
at org.jumpmind.symmetric.web.SymmetricEngineHolder$EngineStarter.run(SymmetricEngineHolder.java:597)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)</init></init>

Outside of running the server, other commands (like dbimport and symadmin) connect to Azure SQL properly to create and populate the sym_ and sample tables. This gave me the mistaken impression that the MSSQL driver was working as expected.

Ultimately, my solution was to switch to the 7.2 driver (put mssql-jdbc-7.2.2.jre8.jar in symmetric-server/lib) with openjdk 1.8 (openjdk-8-jdk-headless on Ubuntu 18.04), at which point everything works as expected. I'm posting this in the hopes that that the next person in my situation won't have to spend 3 days figuring this out.

TagsNo tags attached.

Activities

There are no notes attached to this issue.

Related Changesets

SymmetricDS: 3.11 84f01d29

2019-12-18 12:09:22

admin

Details Diff
0004211: MSSQL JDBC 7.4 with Azure causing NullPointerException while
reading tables
Affected Issues
0004211
mod - symmetric-jdbc/src/main/java/org/jumpmind/db/platform/mssql/MsSqlDdlReader.java Diff File

Issue History

Date Modified Username Field Change
2019-12-18 16:51 mmichalek New Issue
2019-12-18 17:11 elong Assigned To => elong
2019-12-18 17:11 elong Status new => resolved
2019-12-18 17:11 elong Resolution open => fixed
2019-12-18 17:11 elong Fixed in Version => 3.11.3
2019-12-18 17:11 elong Target Version => 3.11.3
2019-12-18 18:00 admin Changeset attached => SymmetricDS 3.11 84f01d29
2020-01-02 14:42 admin Status resolved => closed