I’ve imported a solution, uploaded it to Git, worked on it, commit, push, etc, but after a merge I get an error saying that the solution cannot be activated. The Solution or some of its modules was created or updated by a newer version of Servoy. Either switch to a newer version of Servoy or rollback the changes made.
!ENTRY com.servoy.eclipse.model 4 0 2015-03-11 13:16:58.283
!MESSAGE Unexpected Exception
!STACK 0
com.servoy.j2db.persistence.RepositoryException: java.lang.RuntimeException: org.json.JSONException: Missing value at character 10 of {methods:{\nonActionMethodID:{\narguments:[\nnull,\n"‘dev_development_list_frm_tbl’“\n]\n}\n}}
at com.servoy.eclipse.model.repository.SolutionDeserializer.updateSolution(SolutionDeserializer.java:294)
at com.servoy.eclipse.model.repository.SolutionDeserializer.readSolution(SolutionDeserializer.java:209)
at com.servoy.eclipse.model.repository.EclipseRepository.loadRootObject(EclipseRepository.java:218)
at com.servoy.j2db.persistence.RootObjectCache.getRootObject(RootObjectCache.java:236)
at com.servoy.j2db.persistence.RootObjectCache.getActiveRootObject(RootObjectCache.java:170)
at com.servoy.j2db.persistence.RootObjectCache.getActiveRootObject(RootObjectCache.java:178)
at com.servoy.j2db.persistence.AbstractRepository.getActiveRootObject(AbstractRepository.java:427)
at com.servoy.eclipse.model.nature.ServoyProject.getSolution(ServoyProject.java:128)
at com.servoy.eclipse.core.ServoyModel$9.run(ServoyModel.java:1114)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: java.lang.RuntimeException: org.json.JSONException: Missing value at character 10 of {methods:{\nonActionMethodID:{\narguments:[\nnull,\n”‘dev_development_list_frm_tbl’“\n]\n}\n}}
at com.servoy.j2db.util.JSONWrapperMap.getJson(JSONWrapperMap.java:66)
at com.servoy.j2db.util.JSONWrapperMap.containsKey(JSONWrapperMap.java:104)
at com.servoy.j2db.persistence.AbstractBase.getCustomPropertyLocal(AbstractBase.java:878)
at com.servoy.j2db.persistence.AbstractBase.getCustomProperty(AbstractBase.java:846)
at com.servoy.j2db.persistence.AbstractBase.hasOverrideCustomProperty(AbstractBase.java:1118)
at com.servoy.eclipse.model.repository.SolutionDeserializer.completePersist(SolutionDeserializer.java:1829)
at com.servoy.eclipse.model.repository.SolutionDeserializer.updateSolution(SolutionDeserializer.java:263)
… 9 more
Caused by: org.json.JSONException: Missing value at character 10 of {methods:{\nonActionMethodID:{\narguments:[\nnull,\n”‘dev_development_list_frm_tbl’"\n]\n}\n}}
at org.json.JSONTokener.syntaxError(JSONTokener.java:451)
at org.json.JSONTokener.nextValue(JSONTokener.java:349)
at org.json.JSONObject.(JSONObject.java:191)
at org.json.JSONTokener.nextValue(JSONTokener.java:319)
at org.json.JSONObject.(JSONObject.java:206)
at org.json.JSONObject.(JSONObject.java:327)
at com.servoy.j2db.util.ServoyJSONObject.(ServoyJSONObject.java:76)
at com.servoy.j2db.util.ServoyJSONObject.(ServoyJSONObject.java:71)
at com.servoy.j2db.util.JSONWrapperMap.getJson(JSONWrapperMap.java:62)
… 15 more
!ENTRY com.servoy.eclipse.model 4 0 2015-03-11 13:16:58.285
!MESSAGE Error activating solution. It is not properly initialized. Please check for problems in the underlying file representation.
I believe it was caused by the way the line endings were initially generated in the source file, then when pushed to git they were converted to unix format and when pulled from the repository were somehow converted to Windows, but the \ were left there.
I hope it’s helpful for people struggling with this error. I’ve spent quite some time on it.
I’m having the same issues but only with solutions I have not created from within this Servoy installation.
I’m moving my solution from my old SVN repository to a GIT repository. What I’ve done is in a clean new installation of Servoy I have checkd out the solutions from the SVN repository. Then I have disconnected them and share them on my GIT repository. So far so good but when I try to switch between solutions I got the error:
[attachment=1]GitError.png[/attachment]
The weird thing is that I have no problems with a solution that I have created in that new installation.
If setting the .gitattributes still does not work, try creating a new project, import/checkout files from cvs and make sure that switching between solutions work before pushing to git.
Then push to git and check out from git in another blank project. This way you know for sure that it will work on another installation.
It usually means your fileVersion is newer than what your current Servoy version is using. Did you check out solutions from a newer version?
Check what the fileVersion properties of the different solution/modules are. You find it in the root level of the solution/module directory in the rootmetadata.obj file (which is plain text). Each ‘project’ directory has one.
I actually keep a list with what version is using what fileVersion.
The fileVersion thing is in [yourSolutionDir]/rootmetadata.obj.
We found that disabling autocrlf on windows can spare you a lot of trouble with Git. It depends I guess on what you need.
You can set that globally to false - even at the system settings level. See the screenshot above that has it listed and set to true.
Just in case you are not talking about the git attributes file.
It usually means your fileVersion is newer than what your current Servoy version is using. Did you check out solutions from a newer version?
Check what the fileVersion properties of the different solution/modules are. You find it in the root level of the solution/module directory in the rootmetadata.obj file (which is plain text). Each ‘project’ directory has one.
I actually keep a list with what version is using what fileVersion.
Sorry Robert. I think that you’ve posted this while I was replying, that’s the reason for the missunderstanding.
Yes, Git will not mess automatically with line endings (convert them between unix/win formats) so you won’t commit by mistake only changes to line endings that you didn’t want to commit. It happened to us a few times.