sqlite-sync / SQLite-sync.com

AMPLI-SYNC is a framework for synchronizing data between a Sqlite database and an MS SQL/MySQL/Oracle/PostgreSQL database. With this framework your application can work completely offline (Airplane Mode), then perform an automated Bidirectional Synchronization when an internet connection becomes available.
https://ampliapps.com/sqlite-sync/
BSD 3-Clause "New" or "Revised" License
328 stars 82 forks source link

Version 3.2.3 cannot connect to MSSQL Server #10

Open ITA003 opened 5 years ago

ITA003 commented 5 years ago

Hi, I'm using the sqlite-sync in our project since 2018 with success.

Recently you released the 3.2.3 version, I tried to install but I cannot connect to MSSQL Server. the config file i s the same used for the 3.1.9 version:

DB_ENGINE = mssql DBURL = jdbc:sqlserver://crt-sql01.crottiant.local:1433;databaseName=CrottiDB DBUSER = crotti DBPASS = xxxxxxx DBDRIVER = com.microsoft.sqlserver.jdbc.SQLServerDriver DATE_FORMAT = yyyy-MM-dd HH:mm:ss HISTORY_DAYS = 30 LOG_LEVEL = 3

The config file change with 3.2.3 version?

Thanks. G. Raccuia

massimopasquali commented 4 years ago

Ciao io ho lo stesso problema, hai per caso risolto?

2019-11-21 14:33:45,620 ERROR SQLiteSyncConfig->Load() c:\working_dir\config\sync.properties (Impossibile trovare il file specificato) 2019-11-21 14:33:46,574 ERROR SQLiteSyncConfig->Load() c:\working_dir\config\sync.properties (Impossibile trovare il file specificato) 2019-11-21 14:34:18,731 ERROR GetDBConnection() Connections could not be acquired from the underlying database! 2019-11-21 14:34:18,732 ERROR GetDBConnection() Access denied for user 'root'@'localhost' (using password: YES)

DB_ENGINE = mssql DBURL = jdbc:sqlserver//DESKTOP-RTBHCP8\SQLEXPRESS2017:1433;databaseName=Prova;user=xxx;password=xxxxx;integratedSecurity=false

ITA003 commented 4 years ago

Ciao Massimo, io non ho risolto il mio problema, sembra un po' diverso dal tuo che non trova il file sync.properties:

c:\working_dir\config\sync.properties (Impossibile trovare il file specificato)

Verifica che sia scritto corretto (anche le lettere maiuscole/minuscole

sqlite-sync commented 4 years ago
  1. Check what is your working dir in web.xml under your Tomcat application. Example: C:\ampli-sync\working-dir\
  2. Make sure you have \ at the end.
  3. Inside C:\ampli-sync\working-dir\ you should have 'config' directory with sync.properies in it.
  4. Restart tomcat.
massimopasquali commented 4 years ago

I have checked. API[3.2.15] SQLite-Sync.COM is working correctly! Error creating database connection.

<env-entry>
    <env-entry-name>working-dir</env-entry-name>
    <env-entry-type>java.lang.String</env-entry-type>
    <env-entry-value>C:\working_dir\config\</env-entry-value>
</env-entry>

C:\working_dir\config

inside sync.properties.txt

massimopasquali commented 4 years ago

Ma te hai docuto installare

Microsoft JDBC DRIVER 4.1 per SQL Server

sqlite-sync commented 4 years ago

Remove extension .txt from sync.properties.txt Should be: sync.properties

massimopasquali commented 4 years ago

I 'll hold on

massimopasquali commented 4 years ago

ok now I have

2019-11-22 10:57:03,100 INFO Working dir is set to C:\working-dir\ 2019-11-22 10:57:03,121 INFO Database type is set to mssql 2019-11-22 10:57:35,060 ERROR GetDBConnection() Connections could not be acquired from the underlying database! 2019-11-22 10:57:35,060 ERROR GetDBConnection() com.microsoft.sqlserver.jdbc.SQLServerDriver

sqlite-sync commented 4 years ago

The error you are getting means that the user you used to connect to the database has no right to create a connection. Change the user or give higher permissions. Double check your connection string in properties.

massimopasquali commented 4 years ago

ok Hold on

massimopasquali commented 4 years ago

amplifier4 amplifier5

massimopasquali commented 4 years ago

but my log not change

2019-11-22 11:13:01,534 INFO Working dir is set to C:\working-dir\ 2019-11-22 11:13:01,560 INFO Database type is set to mssql 2019-11-22 11:13:33,224 ERROR GetDBConnection() Connections could not be acquired from the underlying database! 2019-11-22 11:13:33,224 ERROR GetDBConnection() com.microsoft.sqlserver.jdbc.SQLServerDriver 2019-11-22 11:17:09,450 ERROR GetDBConnection() Connections could not be acquired from the underlying database! 2019-11-22 11:17:09,450 ERROR GetDBConnection() com.microsoft.sqlserver.jdbc.SQLServerDriver

sqlite-sync commented 4 years ago

Do you have 'sa' account? Check if it working on that account. Can you provide sync.properties?

massimopasquali commented 4 years ago

I have just tried, "sa" but the log is the same.

massimopasquali commented 4 years ago

but the question I have installed

C:\Program Files\Microsoft JDBC DRIVER 4.1 per SQL Server\sqljdbc_4.1 and C:\Program Files\Microsoft JDBC Driver 7.4 for SQL Server\sqljdbc_7.4

is correct or They not are necessary or I should installer something else?

massimopasquali commented 4 years ago

now I have

DB_ENGINE = mssql DBURL = jdbc:sqlserver//DESKTOP-RTBHCP8\SQLEXPRESS2017 Catalog=7bell;Persist Security Info=True DBUSER = sa DBPASS = xxxxxxxx DBDRIVER = com.microsoft.sqlserver.jdbc.SQLServerDriver

DATE_FORMAT =yyyy-MM-dd HH:mm:ss TIMESTAMP_FORMAT =yyyy-MM-dd HH:mm:ssZ

how long files with sync data will be kept

HISTORY_DAYS=7

4: TRACE, DEBUG, INFO, WARN; 3: DEBUG, INFO, WARN; 2: INFO,WARN; 1: WARN; 0 - disable logs

LOG_LEVEL =4

massimopasquali commented 4 years ago

my log

2019-11-22 14:15:27,134 INFO Working dir is set to C:\working-dir\ 2019-11-22 14:15:27,165 INFO Database type is set to mssql 2019-11-22 14:16:00,736 ERROR GetDBConnection() Connections could not be acquired from the underlying database! 2019-11-22 14:16:00,736 ERROR GetDBConnection() com.microsoft.sqlserver.jdbc.SQLServerDriver

massimopasquali commented 4 years ago

Ciao Massimo, io non ho risolto il mio problema, sembra un po' diverso dal tuo che non trova il file sync.properties:

c:\working_dir\config\sync.properties (Impossibile trovare il file specificato)

Verifica che sia scritto corretto (anche le lettere maiuscole/minuscole

Ciao,

ti volevo chiedere ma te hai installato : Microsoft JDBC Driver 7.4 for SQL Server?

che errore da a te?

massimopasquali commented 4 years ago

Not Works

DB_ENGINE = mssql DBURL = jdbc:sqlserver//127.0.0.1\SQLEXPRESS2017;databaseName=7bell DBUSER = sa DBPASS = xxxxxx DBDRIVER = com.microsoft.sqlserver.jdbc.SQLServerDriver

DATE_FORMAT =yyyy-MM-dd HH:mm:ss TIMESTAMP_FORMAT =yyyy-MM-dd HH:mm:ssZ

how long files with sync data will be kept

HISTORY_DAYS=7

4: TRACE, DEBUG, INFO, WARN; 3: DEBUG, INFO, WARN; 2: INFO,WARN; 1: WARN; 0 - disable logs

LOG_LEVEL =4

massimopasquali commented 4 years ago

Good morning,

I followed all your indications on git, that your programmer gave me, but it doesn't works. Can you simlulate on you pc. You have my 7Bell DB for SQL server.

Windows 10 Pro SQL Server 17 express Tomcat 9

in C:\working-dir :

C:\working-dir\config\sync.properties

DB_ENGINE = mssql DBURL = jdbc:sqlserver//127.0.0.1\SQLEXPRESS2017;databaseName=7bell;trustServerCertificate=true;​ DBUSER = web​ DBPASS = *** DBDRIVER = com.microsoft.sqlserver.jdbc.SQLServerDriver ​ ​ DATE_FORMAT =yyyy-MM-dd HH:mm:ss​ TIMESTAMP_FORMAT =yyyy-MM-dd HH:mm:ssZ​

how long files with sync data will be kept​

HISTORY_DAYS=7​

4: TRACE, DEBUG, INFO, WARN; 3: DEBUG, INFO, WARN; 2: INFO,WARN; 1: WARN; 0 - disable logs​

LOG_LEVEL =4

C:\working-dir\config\logs\sync.log

2019-11-24 13:51:48,197 INFO Working dir is set to C:\working-dir\ 2019-11-24 13:51:48,297 INFO Database type is set to mssql​ 2019-11-24 13:52:19,787 ERROR GetDBConnection() Connections could not be acquired from the underlying database!​ 2019-11-24 13:52:19,787 ERROR GetDBConnection() com.microsoft.sqlserver.jdbc.SQLServerDriver

in C:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0\webapps\SqliteSync\WEB-INF

C:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0\webapps\SqliteSync\WEB-INF\web.xml

<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"​ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"​ xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"​ version="3.1">​ ​

SQLite-sync.com RESTful webservice​ ​ sqlite-sync-serlvetorg.glassfish.jersey.servlet.ServletContainerjersey.config.server.provider.packagescom.sqlitesync.ws1​ ​ sqlite-sync-serlvet/*​ ​ working-dirjava.lang.StringC:\working-dir\​ ​ in C:\Program Files I have C:\Program Files\Microsoft JDBC DRIVER 4.1 per SQL Server and C:\Program Files\Microsoft JDBC Driver 7.4 for SQL Server tanks in advance
Craby-Patty commented 4 years ago

You figure this one out? I am having a similar issue;

Going to http://localhost:8080/SqliteSync/API3 Shows API[3.2.16] SQLite-Sync.COM is working correctly! Error creating database connection.

Log file shows: 2020-02-26 11:36:50,189 INFO Working dir is set to C:\SqliteSync\working-dir\ 2020-02-26 11:36:50,203 INFO Database type is set to mssql 2020-02-26 11:37:20,860 ERROR GetDBConnection() Connections could not be acquired from the underlying database! 2020-02-26 11:37:20,861 ERROR GetDBConnection() com.microsoft.sqlserver.jdbc.SQLServerDriver â??

The "â??" is included in the log file?

Sync.properties are DB_ENGINE = mssql DBURL = jdbc:sqlserver://127.0.0.1/SQLEXPRESS;databaseName=MyDb;trustServerCertificate=true;​ DBUSER = sa DBPASS = ***** DBDRIVER = com.microsoft.sqlserver.jdbc.SQLServerDriver ​ DATE_FORMAT = yyyy-MM-dd HH:mm:ss TIMESTAMP_FORMAT = yyyy-MM-dd HH:mm:ssZ HISTORY_DAYS = 7 LOG_LEVEL = 4

Have also installed both; C:\Program Files\Microsoft JDBC DRIVER 4.1 for SQL Server C:\Program Files\Microsoft JDBC Driver 7.4 for SQL Server

supertom495 commented 3 years ago
DB_ENGINE   =mssql
DBURL       =jdbc:sqlserver://127.0.0.1:1433;DatabaseName=baodao;
DBUSER      =sa
DBPASS      =*************
DBDRIVER    =com.microsoft.sqlserver.jdbc.SQLServerDriver

DATE_FORMAT =yyyy-MM-dd HH:mm:ss
TIMESTAMP_FORMAT =yyyy-MM-dd HH:mm:ssZ
#how long files with sync data will be kept
HISTORY_DAYS=7
#4: TRACE, DEBUG, INFO, WARN; 3: DEBUG, INFO, WARN; 2: INFO,WARN; 1: WARN; 0 - disable logs
LOG_LEVEL   =4

This work for me 3.2.16