The problem is when I upload my solution in the servoy server and run the client. The application works for all the module we have (10 different modules) but when I try to open one of the modules, it will pop up with the error “can’t setup form …” and I don’t understand why that happens for that specific form and not the others. (I have attached a picture of the error message to this post as well).
So when the error pops up and I look at the server log, I can see several errors (a portion of the error log is attached).I can’t seem to find the problem and I really don’t know how can I debug the problem as when I run the solution in the developer it runs fine with no errors, that mean the error is not in the code and it seems like a database connection problem.
so the procedure that I follow to upload my solution is as follow:
1- put the server into maintenance mode in Servoy Server Administration
2- import the solution
3- update servoy sequences for all tables and all active servers under “Database Servers” section.
4- exit from maintenance mode
5- restart the servoy service in windows
6- run the application
It looks like the PK constraint on your client_stats table is being violated. Updating the PK sequence for this table seems unsuccesful. Perhaps you could backup the client_stats table and empty it. It should be possible though to get the key sequence in synch.
Thanks for your response Omar. I just checked our databases in the test server environment (application database and repository Database) and I realized that the table “client_stats” is missing from the repository database and instead it’s been created in the other database while it should be in the repository database instead. I have no idea why this happens as when I compare it with our development databases, the “clien_stats” table is presented in the repository DB not the development DB.
I deleted all the tables we had in the application database and emptied the repository database to update them both, but after update I still see the the “client_stats” being created in the development database and not in the repository database.
I suspect there is some information (table structures, metadata etc.) that changes some stuff in the databases when I export the solution from my workspace environment and upload it to the server.
Any ideas? Anyway that I can realize the cause of this problem as I can’t seem to replicate it in my development environment and debug it some how!
I saw in the release notes of Servoy 6.1 that there has been a change regarding the client_stats table.
As of Servoy 6.1 access to tables in the Servoy Repository is restricted by default for security reasons. The “servoy_client_stats” table that resided in the Servoy Repository is now deprecated. Instead of the “servoy_client_stats” table the session tracking is now done in the "client_stats_ table in the database server marked as Log Server. If there is no Log server defined or it does not contain a table named “client_stats”, either the old “servoy_client_stats” in the Servoy Repository will still be used if it exists or otherwise there will be no session tracking information recorded.
I’m back with a similar problem.
The server settings have been fixed like suggested by Omar and the error disappeared but came back after I deleted the stylesheet we used.
There is no errors (just warnings that some elements use a style sheet that does not exist) in the solution and in Developer it runs just fine.
However, on the server this kind of messages are output in the java console.
Also, the form is being loaded forever, everything freezes like north pole.