OK, this is kinda difficult to explain and I don’t think is is so much a bug with Servoy but it is an error I am having a difficult recovering from so any assistance from you guys would be GREATLY appreciated.
I have been doing Servoy development on my PC for some time now with no problems. All of our tables use db_identity for the primary key rather than servoy seq.
My developer just started working in Servoy; I sent him a copy of the latest version of our solution. He imported it and started making changes. He uploaded several revisions of changes and all seemed fine. We had a report of an issue (that was working before) that we tried to fix and could not figure out WHY it was not working. We decided - due to time - to roll back to the version before my developer started making changes(approx 5 versions back). We realized one of the changes he had made needed to be reimplemented immediately so he made the change and uploaded the changes, then users were not able to open the solution because they would get the error “Could not retrieve form data” as the solution launched. He posted to the forum and Marcel suggested that the pkeys were out of sequence (Could not retrieve form data - Classic Servoy - Servoy Community). I opened his copy of developer and noticed that several of the tables were set to servoy seq. I went through each table and set them to db_identity and synced the keys. We re-uploaded the solution - overriding sequence types with import version. The problem persisted.
I opened developer on the server and checked the sequence types and found there were still some set to servoy seq. I changed them all to database identity and re-synced the keys. Users were then able to open client and run the application.
We made some modifications to servoy in developer (local copy) and uploaded the changes to the server. The upload went fine but we got the same “Could not retrieve form data” error when connecting as client. We had to roll back in order for clients to be able to connect.
Then, there was a change that was made to one of the forms (removed 2 tabs from a tabless tab panel) that needed to be fixed. I made the fix on a local copy and uploaded it. We did not get the error when opening with client but the change did not seem to “take”. I had to open the solution in developer on the server, make the change and then relaunch servoy.
It is now working but I fear that if I make a change in my local developer that I will not be able to upload the changes. The best way I can describe this issus is that it seems like the repository is out of sync.
I hope there is enough information here to make sense to someone. If anyone has ideas of what the issue may be or a way to fix the problem (should I reinstall servoy and uplaod the latest version? Delete the solution from the server then re-upload the latest version?) I would appreciate any help you may be able to offer.
I think it is kinda difficult to see exactly what is going on but this following quote somewhat triggers/bothers me:
I opened his copy of developer and noticed that several of the tables were set to servoy seq. I went through each table and set them to db_identity and synced the keys. We re-uploaded the solution - overriding sequence types with import version. The problem persisted.
Are you working with more repositories on ONE live database? If not, syncing keys on a local/developer database/repository won’t do you any good for the server one. Syncing needs to be done on the central database.
We did sync the developer copy and OVERRIDE SEQUENCE TYPES ON SERVER. We had a problem opening client and later did the sync on the server - I didn’t realize that overriding them on the import would not fix them on the server - so I synced them on the server as well. This allowed clients to connect w/o error.
The problem we had after doing this was that the server refused to “TAKE” the form changes on the upload. It was as if it was ignoring form changes. To be clear, my developer made some changes (on his machine) but were later forced to roll back several versions (we rolled back to the version that was on MY machine) but the server was keeping SOME of the changes he had made. My upload would not override his changes.
QUESTION: So I am clear, changing sequence types and syncing with database on developer (locally) and uploading to server - overriding sequence types - will change the sequence types but will NOT update the keys (ID numbers) on the server?
This seems to be the first lesson learned from this experience. I still do not understand why the serer would not accept the changes I made after my developer had made changes of his own. Again to be clear on this issue: Version 110 of our solution was on my development machine, I gave my developer a copy of version 110, he did several updates so the server was on version 115, we had issues and had to roll back o version 110 on the server, I reprogrammed one of the features my developer had done on MY version 110 and uploaded it to the server. The server was still showing SOME of the version 115 “bugs”.
This is very difficult for me to explain - I am trying my best - so please ask questions if this does not make sense. I need my developer to be able to work in our solution and after this experience I am admittedly a little gun shy. If I can understand WHAT I/we did wrong then we can learn from it.
Thanks again for your response and taking the time to read my very long posts.
Hmm, from what i understand you are going back and fort with different version. Don’t know what impact that has but it obviously doesn’t bring you any good
QUESTION: So I am clear, changing sequence types and syncing with database on developer (locally) and uploading to server - overriding sequence types - will change the sequence types but will NOT update the keys (ID numbers) on the server?
Indeed, this can even be the cause of the issue. Sequences/ID’s will NEVER be imported/exported. Can’t be the case otherwise an export on you development machine could screw up your production server…
And now I also think I know why you have your difficulties. You say something about changing sequence types. You mean from servoy to database sequence or do you mean something like int to string types?
Have you been adding/deleting stuff from the databases on different machines. That can be an issue too… While adding fields to a database will also add them from an export/import but deleting will not be exported…
I think, from what you are telling here it is wise to export the solution you want to have. Create a backup of your database (with correct sequences) and create a new database. On that database you import your solution again. Now see what happens.
I am afraid I don’t have any other/better idea’s right now…
You mean from servoy to database sequence or do you mean something like int to string types?
From Servoy sequence to DB sequence.
We use PHP, mySQL and Servoy. We sometimes create new tables (outside of servoy) which are used to support the PHP site. Servoy will recognize them and automatically assume servoy seq for the keys. I had all of this changed on MY development machine (I change the seq type when we create new tables - or shortly after) We did not remember to do this on my developer’s machine (he just recently started working with servoy) and he did an export (not overriding sequence types) and at first things were OK but quickly fell apart.
Have you been adding/deleting stuff from the databases on different machines. That can be an issue too… While adding fields to a database will also add them from an export/import but deleting will not be exported…
Well, yes…I gave my developer the latest version of our solution which he imported into a new servoy developer insallation. He made several changes and sent several revisions to the server. We later ran into an issue with an important part of our solution not wrking. We could not find a reason why it was not working so we rolled back to version 110 (which was the original version I gave to him and was the “current” version on my machine). This should have effectively nullify any of the work he had done. When I later added back some of the functionality he had been working on and uploaded it to the server…the feces hit the rotating blades!
I think, from what you are telling here it is wise to export the solution you want to have. Create a backup of your database (with correct sequences) and create a new database. On that database you import your solution again. Now see what happens.
You are correct. I called a “Do over!” and completely deleted the solution from the server and re-uploaded it. Things are working now. I am just intereted in understanding specifically, where I went wrong. We both (my developer and I) need to work on this solution from time to time. I figured passing the latest version back and forth as needed would be fine. I am not sure if the issue was in the roll back or because it came from 2 different versions of developer.
If there are any folks out there that have more than 1 developer working on a solution and would care to share your versionning process, this may be very helpful.