Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Current database schema must be updated from 0 to 0" #773

Open
nicolas-raoul opened this issue Apr 5, 2019 · 1 comment
Open

"Current database schema must be updated from 0 to 0" #773

nicolas-raoul opened this issue Apr 5, 2019 · 1 comment
Labels

Comments

@nicolas-raoul
Copy link
Contributor

nicolas-raoul commented Apr 5, 2019

Command line version, specifying the config file path as an argument.

First run:

2019-04-01 11:34:46,636 [1] INFO  CmisSync.Console.CmisSyncConsole [(null)] - Starting. Version: 2.13.1.0
2019-04-01 11:34:46,686 [1] INFO  CmisSync.Lib.RepoBase [(null)] - Repo Synchronized folder for unit tests - Set poll interval to 5000ms
2019-04-01 11:34:46,686 [1] INFO  CmisSync.Lib.Sync.CmisRepo [(null)] - Synchronized folder for unit tests
2019-04-01 11:34:51,692 [5] DEBUG CmisSync.Lib.Sync.CmisRepo+SynchronizedFolder [(null)] - SyncInBackground: IsSyncing(): True
2019-04-01 11:34:51,698 [5] DEBUG CmisSync.Lib.Sync.CmisRepo+SynchronizedFolder [(null)] - syncWorker 1632407116: starting work
2019-04-01 11:34:51,698 [5] INFO  CmisSync.Lib.RepoBase [(null)] -  Sync Started: C:\Users\nico\AppData\Local\Temp\CmisSync_test_qjuaub20.2fi\data
2019-04-01 11:34:51,705 [5] INFO  CmisSync.Auth.Authentication [(null)] - Your password is not obfuscated.
2019-04-01 11:34:51,839 [5] DEBUG DotCMIS.Binding.Impl.HttpUtils [(null)] - About to call conn.GetResponse() with HttpWebRequest.Timeout=3600000ms and HttpWebRequest.ReadWriteTimeout=21600000ms
2019-04-01 11:34:53,914 [5] DEBUG DotCMIS.Binding.Impl.HttpUtils [(null)] - conn.GetResponse() result: System.Net.HttpWebResponse
2019-04-01 11:34:54,384 [5] INFO  CmisSync.Auth.Authentication [(null)] - VendorName: Alfresco
2019-04-01 11:34:54,384 [5] INFO  CmisSync.Auth.Authentication [(null)] - ProductName: Alfresco Community
2019-04-01 11:34:54,385 [5] INFO  CmisSync.Auth.Authentication [(null)] - ProductVersion: 4.2.0 (r54676-b4795)
2019-04-01 11:34:54,385 [5] INFO  CmisSync.Auth.Authentication [(null)] - CmisVersionSupported: 1.1
2019-04-01 11:34:54,386 [5] INFO  CmisSync.Auth.Authentication [(null)] - Name: 
2019-04-01 11:34:54,386 [5] INFO  CmisSync.Auth.Authentication [(null)] - Description: 
2019-04-01 11:34:54,386 [5] DEBUG CmisSync.Lib.Sync.CmisRepo+SynchronizedFolder [(null)] - Created CMIS session: DotCMIS.Client.Impl.Session
2019-04-01 11:34:54,395 [5] DEBUG CmisSync.Lib.Sync.CmisRepo+SynchronizedFolder [(null)] - ChangeLog capability: True
2019-04-01 11:34:54,395 [5] DEBUG CmisSync.Lib.Sync.CmisRepo+SynchronizedFolder [(null)] - Get folder tree support: True
2019-04-01 11:34:54,395 [5] DEBUG CmisSync.Lib.Sync.CmisRepo+SynchronizedFolder [(null)] - Get descendants support: True
2019-04-01 11:34:54,395 [5] DEBUG CmisSync.Lib.Sync.CmisRepo+SynchronizedFolder [(null)] - Chunked Up/Download disabled
2019-04-01 11:34:54,402 [5] DEBUG DotCMIS.Binding.Impl.HttpUtils [(null)] - About to call conn.GetResponse() with HttpWebRequest.Timeout=3600000ms and HttpWebRequest.ReadWriteTimeout=21600000ms
2019-04-01 11:34:55,072 [5] DEBUG DotCMIS.Binding.Impl.HttpUtils [(null)] - conn.GetResponse() result: System.Net.HttpWebResponse
2019-04-01 11:34:55,217 [5] DEBUG DotCMIS.Binding.Impl.HttpUtils [(null)] - About to call conn.GetResponse() with HttpWebRequest.Timeout=3600000ms and HttpWebRequest.ReadWriteTimeout=21600000ms
2019-04-01 11:34:55,252 [5] DEBUG DotCMIS.Binding.Impl.HttpUtils [(null)] - conn.GetResponse() result: System.Net.HttpWebResponse
2019-04-01 11:34:55,375 [5] DEBUG CmisSync.Lib.Sync.CmisRepo+SynchronizedFolder [(null)] - First sync, apply local changes then invoke a full crawl sync
2019-04-01 11:34:55,396 [5] INFO  CmisSync.Lib.Database.Database [(null)] - Checking whether database C:\Users\nico\AppData\Local\Temp\CmisSync_test_qjuaub20.2fi\configuration\Synchronized folder for unit tests.cmissync exists
2019-04-01 11:34:55,968 [3] DEBUG CmisSync.Lib.Watcher [(null)] - Created: C:\Users\nico\AppData\Local\Temp\CmisSync_test_qjuaub20.2fi\data\Subfolder
2019-04-01 11:34:59,504 [6] DEBUG CmisSync.Lib.Sync.CmisRepo+SynchronizedFolder [(null)] - SyncInBackground: Sync already running in background: C:\Users\nico\AppData\Local\Temp\CmisSync_test_qjuaub20.2fi\data

Second run:

2019-04-05 17:08:58,286 [1] INFO  CmisSync.Console.CmisSyncConsole [(null)] - Starting. Version: 2.13.1.0
2019-04-05 17:09:36,738 [1] INFO  CmisSync.Lib.RepoBase [(null)] - Repo Synchronized folder for unit tests - Set poll interval to 5000ms
2019-04-05 17:09:36,746 [1] INFO  CmisSync.Lib.Sync.CmisRepo [(null)] - Synchronized folder for unit tests
2019-04-05 17:09:48,162 [6] DEBUG CmisSync.Lib.Sync.CmisRepo+SynchronizedFolder [(null)] - SyncInBackground: Sync already running in background: C:\Users\nico\AppData\Local\Temp\CmisSync_test_qjuaub20.2fi\data
2019-04-05 17:09:48,227 [5] DEBUG CmisSync.Lib.Sync.CmisRepo+SynchronizedFolder [(null)] - SyncInBackground: IsSyncing(): True
2019-04-05 17:09:48,508 [6] DEBUG CmisSync.Lib.Sync.CmisRepo+SynchronizedFolder [(null)] - syncWorker 343533769: starting work
2019-04-05 17:09:48,512 [6] INFO  CmisSync.Lib.RepoBase [(null)] -  Sync Started: C:\Users\nico\AppData\Local\Temp\CmisSync_test_qjuaub20.2fi\data
2019-04-05 17:09:49,194 [6] INFO  CmisSync.Auth.Authentication [(null)] - Your password is not obfuscated.
2019-04-05 17:09:50,630 [6] DEBUG DotCMIS.Binding.Impl.HttpUtils [(null)] - About to call conn.GetResponse() with HttpWebRequest.Timeout=3600000ms and HttpWebRequest.ReadWriteTimeout=21600000ms
2019-04-05 17:09:52,855 [6] DEBUG DotCMIS.Binding.Impl.HttpUtils [(null)] - conn.GetResponse() result: System.Net.HttpWebResponse
2019-04-05 17:09:53,166 [5] DEBUG CmisSync.Lib.Sync.CmisRepo+SynchronizedFolder [(null)] - SyncInBackground: Sync already running in background: C:\Users\nico\AppData\Local\Temp\CmisSync_test_qjuaub20.2fi\data
2019-04-05 17:09:54,275 [6] INFO  CmisSync.Auth.Authentication [(null)] - VendorName: Alfresco
2019-04-05 17:09:54,276 [6] INFO  CmisSync.Auth.Authentication [(null)] - ProductName: Alfresco Community
2019-04-05 17:09:54,276 [6] INFO  CmisSync.Auth.Authentication [(null)] - ProductVersion: 4.2.0 (r54676-b4795)
2019-04-05 17:09:54,276 [6] INFO  CmisSync.Auth.Authentication [(null)] - CmisVersionSupported: 1.1
2019-04-05 17:09:54,276 [6] INFO  CmisSync.Auth.Authentication [(null)] - Name: 
2019-04-05 17:09:54,276 [6] INFO  CmisSync.Auth.Authentication [(null)] - Description: 
2019-04-05 17:09:54,276 [6] DEBUG CmisSync.Lib.Sync.CmisRepo+SynchronizedFolder [(null)] - Created CMIS session: DotCMIS.Client.Impl.Session
2019-04-05 17:09:54,276 [6] DEBUG CmisSync.Lib.Sync.CmisRepo+SynchronizedFolder [(null)] - ChangeLog capability: True
2019-04-05 17:09:54,276 [6] DEBUG CmisSync.Lib.Sync.CmisRepo+SynchronizedFolder [(null)] - Get folder tree support: True
2019-04-05 17:09:54,276 [6] DEBUG CmisSync.Lib.Sync.CmisRepo+SynchronizedFolder [(null)] - Get descendants support: True
2019-04-05 17:09:54,276 [6] DEBUG CmisSync.Lib.Sync.CmisRepo+SynchronizedFolder [(null)] - Chunked Up/Download disabled
2019-04-05 17:09:54,434 [6] DEBUG DotCMIS.Binding.Impl.HttpUtils [(null)] - About to call conn.GetResponse() with HttpWebRequest.Timeout=3600000ms and HttpWebRequest.ReadWriteTimeout=21600000ms
2019-04-05 17:09:54,956 [6] DEBUG DotCMIS.Binding.Impl.HttpUtils [(null)] - conn.GetResponse() result: System.Net.HttpWebResponse
2019-04-05 17:09:55,210 [6] DEBUG DotCMIS.Binding.Impl.HttpUtils [(null)] - About to call conn.GetResponse() with HttpWebRequest.Timeout=3600000ms and HttpWebRequest.ReadWriteTimeout=21600000ms
2019-04-05 17:09:55,260 [6] DEBUG DotCMIS.Binding.Impl.HttpUtils [(null)] - conn.GetResponse() result: System.Net.HttpWebResponse
2019-04-05 17:09:55,563 [6] DEBUG CmisSync.Lib.Sync.CmisRepo+SynchronizedFolder [(null)] - First sync, apply local changes then invoke a full crawl sync
2019-04-05 17:09:56,524 [6] INFO  CmisSync.Lib.Database.Database [(null)] - Checking whether database C:\Users\nico\AppData\Local\Temp\CmisSync_test_qjuaub20.2fi\configuration\Synchronized folder for unit tests.cmissync exists
2019-04-05 17:09:58,168 [5] DEBUG CmisSync.Lib.Sync.CmisRepo+SynchronizedFolder [(null)] - SyncInBackground: Sync already running in background: C:\Users\nico\AppData\Local\Temp\CmisSync_test_qjuaub20.2fi\data
2019-04-05 17:09:58,493 [6] INFO  CmisSync.Lib.Database.DatabaseMigration [(null)] - Checking whether database C:\Users\nico\AppData\Local\Temp\CmisSync_test_qjuaub20.2fi\configuration\Synchronized folder for unit tests.cmissync exists
2019-04-05 17:09:58,702 [6] DEBUG CmisSync.Lib.Database.DatabaseMigration [(null)] - Current database schema must be updated from 0 to 0
2019-04-05 17:09:59,204 [6] INFO  CmisSync.Lib.Utils [(null)] - CmisSync needs to upgrade its own local data for folder "-default-".
Please stay on the network during that time, sorry for the inconvenience.
It can take up to HOURS if you have many files, thank you for your patience.
A notification will pop up when it is done.
2019-04-05 17:09:59,246 [6] INFO  CmisSync.Auth.Authentication [(null)] - Your password is not obfuscated.
2019-04-05 17:09:59,246 [6] DEBUG DotCMIS.Binding.Impl.HttpUtils [(null)] - About to call conn.GetResponse() with HttpWebRequest.Timeout=3600000ms and HttpWebRequest.ReadWriteTimeout=21600000ms
2019-04-05 17:10:01,001 [6] DEBUG DotCMIS.Binding.Impl.HttpUtils [(null)] - conn.GetResponse() result: System.Net.HttpWebResponse
2019-04-05 17:10:01,043 [6] INFO  CmisSync.Auth.Authentication [(null)] - VendorName: Alfresco
2019-04-05 17:10:01,043 [6] INFO  CmisSync.Auth.Authentication [(null)] - ProductName: Alfresco Community
2019-04-05 17:10:01,043 [6] INFO  CmisSync.Auth.Authentication [(null)] - ProductVersion: 4.2.0 (r54676-b4795)
2019-04-05 17:10:01,043 [6] INFO  CmisSync.Auth.Authentication [(null)] - CmisVersionSupported: 1.1
2019-04-05 17:10:01,043 [6] INFO  CmisSync.Auth.Authentication [(null)] - Name: 
2019-04-05 17:10:01,043 [6] INFO  CmisSync.Auth.Authentication [(null)] - Description: 
2019-04-05 17:10:02,083 [6] ERROR CmisSync.Lib.Database.DatabaseMigration [(null)] - Could not execute SQL: INSERT OR REPLACE INTO general (key, value) VALUES ("PathPrefix", @prefix); {"prefix":"C:\\Users\\nico\\AppData\\Local\\Temp\\CmisSync_test_qjuaub20.2fi\\data"}
code = Error (1), message = System.Data.SQLite.SQLiteException (0x800007BF): SQL logic error
no such table: general
   at System.Data.SQLite.SQLite3.Prepare(SQLiteConnection cnn, String strSql, SQLiteStatement previous, UInt32 timeoutMS, String& strRemain)
   at System.Data.SQLite.SQLiteCommand.BuildNextCommand()
   at System.Data.SQLite.SQLiteDataReader.NextResult()
   at System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCommand cmd, CommandBehavior behave)
   at System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior)
   at System.Data.SQLite.SQLiteCommand.ExecuteNonQuery(CommandBehavior behavior)
   at CmisSync.Lib.Database.DatabaseMigrationBase.ExecuteSQLAction(SQLiteConnection connection, String text, Dictionary`2 parameters) in C:\Users\nico\src\CmisSync\CmisSync.Lib\Database\DatabaseMigrationBase.cs:line 144
2019-04-05 17:10:02,516 [6] INFO  CmisSync.Lib.Database.DatabaseMigrationToVersion3 [(null)] - Failed to migrate "-default-".
code = Error (1), message = System.Data.SQLite.SQLiteException (0x800007BF): SQL logic error
no such table: general
   at System.Data.SQLite.SQLite3.Prepare(SQLiteConnection cnn, String strSql, SQLiteStatement previous, UInt32 timeoutMS, String& strRemain)
   at System.Data.SQLite.SQLiteCommand.BuildNextCommand()
   at System.Data.SQLite.SQLiteDataReader.NextResult()
   at System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCommand cmd, CommandBehavior behave)
   at System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior)
   at System.Data.SQLite.SQLiteCommand.ExecuteNonQuery(CommandBehavior behavior)
   at CmisSync.Lib.Database.DatabaseMigrationBase.ExecuteSQLAction(SQLiteConnection connection, String text, Dictionary`2 parameters) in C:\Users\nico\src\CmisSync\CmisSync.Lib\Database\DatabaseMigrationBase.cs:line 149
   at CmisSync.Lib.Database.DatabaseMigrationToVersion3.FillMissingData(Folder syncFolder, SQLiteConnection connection) in C:\Users\nico\src\CmisSync\CmisSync.Lib\Database\DatabaseMigrationToVersion3.cs:line 222
2019-04-05 17:10:02,517 [6] INFO  CmisSync.Lib.Utils [(null)] - Failure while migrating folder "-default-".
2019-04-05 17:10:02,625 [6] ERROR CmisSync.Lib.Database.DatabaseMigration [(null)] - Error migrating database: SQL logic error
no such table: general
code = Error (1), message = System.Data.SQLite.SQLiteException (0x800007BF): SQL logic error
no such table: general
   at System.Data.SQLite.SQLite3.Prepare(SQLiteConnection cnn, String strSql, SQLiteStatement previous, UInt32 timeoutMS, String& strRemain)
   at System.Data.SQLite.SQLiteCommand.BuildNextCommand()
   at System.Data.SQLite.SQLiteDataReader.NextResult()
   at System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCommand cmd, CommandBehavior behave)
   at System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior)
   at System.Data.SQLite.SQLiteCommand.ExecuteNonQuery(CommandBehavior behavior)
   at CmisSync.Lib.Database.DatabaseMigrationBase.ExecuteSQLAction(SQLiteConnection connection, String text, Dictionary`2 parameters) in C:\Users\nico\src\CmisSync\CmisSync.Lib\Database\DatabaseMigrationBase.cs:line 149
   at CmisSync.Lib.Database.DatabaseMigrationToVersion3.FillMissingData(Folder syncFolder, SQLiteConnection connection) in C:\Users\nico\src\CmisSync\CmisSync.Lib\Database\DatabaseMigrationToVersion3.cs:line 230
   at CmisSync.Lib.Database.DatabaseMigrationToVersion3.Migrate(Folder syncFolder, SQLiteConnection connection, Int32 currentVersion) in C:\Users\nico\src\CmisSync\CmisSync.Lib\Database\DatabaseMigrationToVersion3.cs:line 47
   at CmisSync.Lib.Database.DatabaseMigration.Migrate(String dbFile) in C:\Users\nico\src\CmisSync\CmisSync.Lib\Database\DatabaseMigration.cs:line 78
2019-04-05 17:10:02,701 [6] ERROR CmisSync.Lib.Database.Database [(null)] - Error creating database: SQL logic error
no such table: general
code = Error (1), message = System.Data.SQLite.SQLiteException (0x800007BF): SQL logic error
no such table: general
   at System.Data.SQLite.SQLite3.Prepare(SQLiteConnection cnn, String strSql, SQLiteStatement previous, UInt32 timeoutMS, String& strRemain)
   at System.Data.SQLite.SQLiteCommand.BuildNextCommand()
   at System.Data.SQLite.SQLiteDataReader.NextResult()
   at System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCommand cmd, CommandBehavior behave)
   at System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior)
   at System.Data.SQLite.SQLiteCommand.ExecuteNonQuery(CommandBehavior behavior)
   at CmisSync.Lib.Database.DatabaseMigrationBase.ExecuteSQLAction(SQLiteConnection connection, String text, Dictionary`2 parameters) in C:\Users\nico\src\CmisSync\CmisSync.Lib\Database\DatabaseMigrationBase.cs:line 149
   at CmisSync.Lib.Database.DatabaseMigrationToVersion3.FillMissingData(Folder syncFolder, SQLiteConnection connection) in C:\Users\nico\src\CmisSync\CmisSync.Lib\Database\DatabaseMigrationToVersion3.cs:line 230
   at CmisSync.Lib.Database.DatabaseMigrationToVersion3.Migrate(Folder syncFolder, SQLiteConnection connection, Int32 currentVersion) in C:\Users\nico\src\CmisSync\CmisSync.Lib\Database\DatabaseMigrationToVersion3.cs:line 47
   at CmisSync.Lib.Database.DatabaseMigration.Migrate(String dbFile) in C:\Users\nico\src\CmisSync\CmisSync.Lib\Database\DatabaseMigration.cs:line 93
   at CmisSync.Lib.Database.Database.GetSQLiteConnection() in C:\Users\nico\src\CmisSync\CmisSync.Lib\Database\Database.cs:line 210
2019-04-05 17:10:02,736 [6] ERROR CmisSync.Lib.Sync.CmisRepo+SynchronizedFolder [(null)] - SQL logic error
no such table: general
@nicolas-raoul
Copy link
Contributor Author

Problem: No "general" table has been created at the first run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant