Hi everyone,
I have a little issue when trying to sync data with CSPro Web Server in beta 7 (2017-01-05).
When trying to sync, I get this message:
Even when user and Pass are correct.
My CSPro Web Server is on IIS 10 and OS Windows 10.
Any comments about it are welcome.
Thanks to everyone and to this great community.
Regards.
CSPro Web Server Sync Issue
Re: CSPro Web Server Sync Issue
That error code (500) is not a problem with the username/password. That is an internal server error. In cases like this you can get more information from the log files. We intentionally keep the user facing error messages short and put the details in the log file. Since this is coming from a sync request look at the api.log in the logs folder on the server. It should have error details. You can post them here.
Re: CSPro Web Server Sync Issue
Hi Josh,
Thank you so much for your reply.
I had take a look at the api.log file and the exception says that there is no active transaction.
Here is the content at api.log file, so maybe you can help me to get more in context what could be about.
Thank you so much for you support guys.
Regards.
Thank you so much for your reply.
I had take a look at the api.log file and the exception says that there is no active transaction.
Here is the content at api.log file, so maybe you can help me to get more in context what could be about.
Code: Select all
[2017-02-07 10:55:44] CSPro API.INFO: > GET /cspro-rest-api/api/server [] []
[2017-02-07 10:55:44] CSPro API.INFO: < 200 [] []
[2017-02-07 10:55:44] CSPro API.INFO: Matched route "syncCases". {"route_parameters":{"_controller":"CSPro\\Controllers\\DictionaryController::syncCases","dictName":"ETAEP01","_route":"syncCases"},"request_uri":"http://localhost/cspro-rest-api/api/dictionaries/ETAEP01/syncs"} []
[2017-02-07 10:55:44] CSPro API.INFO: > POST /cspro-rest-api/api/dictionaries/ETAEP01/syncs [] []
[2017-02-07 10:55:44] CSPro API.DEBUG: Authtenticating User. [] []
[2017-02-07 10:55:45] CSPro API.INFO: startDocument!!! [] []
[2017-02-07 10:55:45] CSPro API.INFO: initSyncCases!!! [] []
[2017-02-07 10:55:45] CSPro API.INFO: Failed Syncing Cases to dictionary: ETAEP01 {"context":"exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 1364 Field 'revision' doesn't have a default value' in C:\\inetpub\\wwwroot\\cspro-rest-api\\vendor\\aura\\sql\\src\\ExtendedPdo.php:748\nStack trace:\n#0 C:\\inetpub\\wwwroot\\cspro-rest-api\\vendor\\aura\\sql\\src\\ExtendedPdo.php(748): PDOStatement->execute()\n#1 C:\\inetpub\\wwwroot\\cspro-rest-api\\src\\api\\app\\helpers.php(248): Aura\\Sql\\ExtendedPdo->perform('INSERT INTO csp...', Array)\n#2 C:\\inetpub\\wwwroot\\cspro-rest-api\\src\\api\\src\\CSPro\\SyncCasesJsonListener.php(137): addSyncHistoryEntry(Object(Silex\\Application), '64006a7edb05', 'ETAEP01', 'put', '')\n#3 C:\\inetpub\\wwwroot\\cspro-rest-api\\src\\api\\src\\CSPro\\SyncCasesJsonListener.php(357): CSPro\\SyncCasesJsonListener->initSyncCases()\n#4 C:\\inetpub\\wwwroot\\cspro-rest-api\\src\\api\\src\\CSPro\\SyncCasesJsonListener.php(396): CSPro\\SyncCasesJsonListener->startObject()\n#5 C:\\inetpub\\wwwroot\\cspro-rest-api\\vendor\\salsify\\json-streaming-parser\\src\\Parser.php(468): CSPro\\SyncCasesJsonListener->startArray()\n#6 C:\\inetpub\\wwwroot\\cspro-rest-api\\vendor\\salsify\\json-streaming-parser\\src\\Parser.php(445): JsonStreamingParser\\Parser->startArray()\n#7 C:\\inetpub\\wwwroot\\cspro-rest-api\\vendor\\salsify\\json-streaming-parser\\src\\Parser.php(251): JsonStreamingParser\\Parser->startValue('[')\n#8 C:\\inetpub\\wwwroot\\cspro-rest-api\\vendor\\salsify\\json-streaming-parser\\src\\Parser.php(162): JsonStreamingParser\\Parser->consumeChar('[')\n#9 C:\\inetpub\\wwwroot\\cspro-rest-api\\src\\api\\src\\CSPro\\Controllers\\DictionaryController.php(199): JsonStreamingParser\\Parser->parse()\n#10 [internal function]: CSPro\\Controllers\\DictionaryController->syncCases(Object(Silex\\Application), Object(Symfony\\Component\\HttpFoundation\\Request), 'ETAEP01')\n#11 C:\\inetpub\\wwwroot\\cspro-rest-api\\vendor\\symfony\\http-kernel\\HttpKernel.php(139): call_user_func_array(Array, Array)\n#12 C:\\inetpub\\wwwroot\\cspro-rest-api\\vendor\\symfony\\http-kernel\\HttpKernel.php(62): Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw(Object(Symfony\\Component\\HttpFoundation\\Request), 1)\n#13 C:\\inetpub\\wwwroot\\cspro-rest-api\\vendor\\silex\\silex\\src\\Silex\\Application.php(586): Symfony\\Component\\HttpKernel\\HttpKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#14 C:\\inetpub\\wwwroot\\cspro-rest-api\\vendor\\silex\\silex\\src\\Silex\\Application.php(563): Silex\\Application->handle(Object(Symfony\\Component\\HttpFoundation\\Request))\n#15 C:\\inetpub\\wwwroot\\cspro-rest-api\\api\\index.php(172): Silex\\Application->run()\n#16 {main}\n\nNext exception 'Exception' with message 'Failed to addSyncHistoryEntry ETAEP01' in C:\\inetpub\\wwwroot\\cspro-rest-api\\src\\api\\app\\helpers.php:254\nStack trace:\n#0 C:\\inetpub\\wwwroot\\cspro-rest-api\\src\\api\\src\\CSPro\\SyncCasesJsonListener.php(137): addSyncHistoryEntry(Object(Silex\\Application), '64006a7edb05', 'ETAEP01', 'put', '')\n#1 C:\\inetpub\\wwwroot\\cspro-rest-api\\src\\api\\src\\CSPro\\SyncCasesJsonListener.php(357): CSPro\\SyncCasesJsonListener->initSyncCases()\n#2 C:\\inetpub\\wwwroot\\cspro-rest-api\\src\\api\\src\\CSPro\\SyncCasesJsonListener.php(396): CSPro\\SyncCasesJsonListener->startObject()\n#3 C:\\inetpub\\wwwroot\\cspro-rest-api\\vendor\\salsify\\json-streaming-parser\\src\\Parser.php(468): CSPro\\SyncCasesJsonListener->startArray()\n#4 C:\\inetpub\\wwwroot\\cspro-rest-api\\vendor\\salsify\\json-streaming-parser\\src\\Parser.php(445): JsonStreamingParser\\Parser->startArray()\n#5 C:\\inetpub\\wwwroot\\cspro-rest-api\\vendor\\salsify\\json-streaming-parser\\src\\Parser.php(251): JsonStreamingParser\\Parser->startValue('[')\n#6 C:\\inetpub\\wwwroot\\cspro-rest-api\\vendor\\salsify\\json-streaming-parser\\src\\Parser.php(162): JsonStreamingParser\\Parser->consumeChar('[')\n#7 C:\\inetpub\\wwwroot\\cspro-rest-api\\src\\api\\src\\CSPro\\Controllers\\DictionaryController.php(199): JsonStreamingParser\\Parser->parse()\n#8 [internal function]: CSPro\\Controllers\\DictionaryController->syncCases(Object(Silex\\Application), Object(Symfony\\Component\\HttpFoundation\\Request), 'ETAEP01')\n#9 C:\\inetpub\\wwwroot\\cspro-rest-api\\vendor\\symfony\\http-kernel\\HttpKernel.php(139): call_user_func_array(Array, Array)\n#10 C:\\inetpub\\wwwroot\\cspro-rest-api\\vendor\\symfony\\http-kernel\\HttpKernel.php(62): Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw(Object(Symfony\\Component\\HttpFoundation\\Request), 1)\n#11 C:\\inetpub\\wwwroot\\cspro-rest-api\\vendor\\silex\\silex\\src\\Silex\\Application.php(586): Symfony\\Component\\HttpKernel\\HttpKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#12 C:\\inetpub\\wwwroot\\cspro-rest-api\\vendor\\silex\\silex\\src\\Silex\\Application.php(563): Silex\\Application->handle(Object(Symfony\\Component\\HttpFoundation\\Request))\n#13 C:\\inetpub\\wwwroot\\cspro-rest-api\\api\\index.php(172): Silex\\Application->run()\n#14 {main}"} []
[2017-02-07 10:55:45] CSPro API.CRITICAL: PDOException: There is no active transaction (uncaught exception) at C:\inetpub\wwwroot\cspro-rest-api\vendor\aura\sql\src\ExtendedPdo.php line 858 {"exception":"[object] (PDOException(code: 0): There is no active transaction at C:\\inetpub\\wwwroot\\cspro-rest-api\\vendor\\aura\\sql\\src\\ExtendedPdo.php:858)"} []
[2017-02-07 10:55:45] CSPro API.INFO: < 500 [] []
Regards.
Re: CSPro Web Server Sync Issue
Is it possible that you are using an old schema for the database when you got the latest beta sources for the API?
If you are using the latest code you will not be able to use the previous versions of the DB as the schema has changed.
Can you run your test by creating a new database? You can do this by
1.Removing config.php file in C:\Program Files (x86)\EasyPHP-DevServer-14.1VC11\data\localweb\cspro\src\api\app
2. Run the setup program again to point to your new DB.
If you are using the latest code you will not be able to use the previous versions of the DB as the schema has changed.
Can you run your test by creating a new database? You can do this by
1.Removing config.php file in C:\Program Files (x86)\EasyPHP-DevServer-14.1VC11\data\localweb\cspro\src\api\app
2. Run the setup program again to point to your new DB.
Re: CSPro Web Server Sync Issue
Thank you so much for your reply savy.
Yes, the problem is because, I was using an old schema for my database.
I was using the one that created for the previous beta version.
Now I created a new database and everything works great, even with a large amount of cases, everything works great.
Thanks to everyone.
Regards.
Yes, the problem is because, I was using an old schema for my database.
I was using the one that created for the previous beta version.
Now I created a new database and everything works great, even with a large amount of cases, everything works great.
Thanks to everyone.
Regards.