[URGENT] Solution cannot be activated with Git use

Discuss all problems you have with Servoy here. It might help to mention the Servoy version and Operating System version you are using

[URGENT] Solution cannot be activated with Git use

Postby gabid » Wed Mar 11, 2015 12:59 pm

Hi guys,

I'm using Servoy 7.4.3 build 2036

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.

2015_03_11_12_48_03_Servoy_Design_Servoy_Developer.jpg
2015_03_11_12_48_03_Servoy_Design_Servoy_Developer.jpg (40.53 KiB) Viewed 10973 times


I have rolled back by checking out past commits but nothings works.

I haven't committed the .metadata folder because I believe that is specific to my Servoy install and should not be shared.

What am I doing wrong and what can I do to fix it?

Please give me any feedback as soon as possible, as I have lost all changes done before the merge!

Thanks
Gabriel
User avatar
gabid
 
Posts: 44
Joined: Fri Aug 15, 2008 10:25 am
Location: Craiova, Romania

Re: [URGENT] Solution cannot be activated with Git use

Postby gabid » Wed Mar 11, 2015 1:17 pm

!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.<init>(JSONObject.java:191)
at org.json.JSONTokener.nextValue(JSONTokener.java:319)
at org.json.JSONObject.<init>(JSONObject.java:206)
at org.json.JSONObject.<init>(JSONObject.java:327)
at com.servoy.j2db.util.ServoyJSONObject.<init>(ServoyJSONObject.java:76)
at com.servoy.j2db.util.ServoyJSONObject.<init>(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.
User avatar
gabid
 
Posts: 44
Joined: Fri Aug 15, 2008 10:25 am
Location: Craiova, Romania

Re: [URGENT] Solution cannot be activated with Git use

Postby gabid » Wed Mar 11, 2015 2:07 pm

It seems that somehow in the serialized form there are two versions of onActionMethodID:

Code: Select all
customProperties:"methods:{\
onActionMethodID:{\
arguments:[\
null,\
\"'addrbk_addressbook_detail_frm'\"\
]\
}\
}",


and
Code: Select all
onActionMethodID:"-1",
User avatar
gabid
 
Posts: 44
Joined: Fri Aug 15, 2008 10:25 am
Location: Craiova, Romania

Re: [URGENT] Solution cannot be activated with Git use

Postby gabid » Wed Mar 11, 2015 4:44 pm

Forget the last comment.
I have fixed it. It was due to the way the line endings were configured.

I had to update the *.frm code from:
Code: Select all
customProperties:"methods:{\
onActionMethodID:{\
arguments:[\
null,\
\"'addrbk_addressbook_detail_frm'\"\
]\
}\
}",


to

Code: Select all
customProperties:"methods:{onActionMethodID:{arguments:[null, \"'addrbk_addressbook_detail_frm'\"]}}",


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.
User avatar
gabid
 
Posts: 44
Joined: Fri Aug 15, 2008 10:25 am
Location: Craiova, Romania

Re: [URGENT] Solution cannot be activated with Git use

Postby jgarfield » Wed Mar 11, 2015 7:46 pm

I've found adding the following to the .gitattributes file for your project is invaluable:

Code: Select all
*.frm -text
*.val -text
*.tbl -text
*.rel -text
*.obj -text
*.dbi -text
*.sec -text
*.css -text
Programmer.
adBlocks
http://www.adblocks.com
jgarfield
 
Posts: 223
Joined: Wed Sep 28, 2005 9:02 pm
Location: Boston, US

Re: [URGENT] Solution cannot be activated with Git use

Postby gabid » Thu Mar 12, 2015 10:24 am

Thanks for the suggestion.

I've added them as so I won't hit the same problem again.
User avatar
gabid
 
Posts: 44
Joined: Fri Aug 15, 2008 10:25 am
Location: Craiova, Romania

Re: [URGENT] Solution cannot be activated with Git use

Postby jasantana » Mon Feb 22, 2016 3:34 pm

Hi all.

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:

GitError.png
GitError.png (39.37 KiB) Viewed 10533 times


The weird thing is that I have no problems with a solution that I have created in that new installation.

My configuration is as follows:

GitError0002.png
GitError0002.png (31.32 KiB) Viewed 10533 times


And the gitignore file has the following entries:
Code: Select all
# Compiled Source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
*.gitignore_global

# Servoy Metadata #
###################
*/.metadata/
.metadata/
.metadata\
*metadata/
*metadata\
*\.metadata\

# Packages #
############
*.7z
*.dmg
*.gz
*.iso
*.jar
*.tar

# Logs and databases #
######################
*.log

# OS Generated Files #
######################
.DS_Store
.DS_Store?
._*
.Spotlight-v100
.Trashes
ehthumbs.db
Thumbs.db


Any one can help please? Thanks in advance
Best regards,
Juan Antonio Santana Medina
jasantana@nephos-solutions.co.uk
Servoy MVP 2015
Servoy 6.x - Servoy 7.x - Servoy 8.x - MySQL - PostgreSQL - Visual Foxpro 9
User avatar
jasantana
 
Posts: 555
Joined: Tue Aug 10, 2010 11:40 am
Location: Leeds - West Yorkshire - United Kingdom

Re: [URGENT] Solution cannot be activated with Git use

Postby gabid » Mon Feb 22, 2016 4:22 pm

Have you also tried the git attributes settings?

https://www.servoy.com/forum/viewtopic.php?f=8&t=20818#p111752
User avatar
gabid
 
Posts: 44
Joined: Fri Aug 15, 2008 10:25 am
Location: Craiova, Romania

Re: [URGENT] Solution cannot be activated with Git use

Postby gabid » Mon Feb 22, 2016 4:26 pm

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.
User avatar
gabid
 
Posts: 44
Joined: Fri Aug 15, 2008 10:25 am
Location: Craiova, Romania

Re: [URGENT] Solution cannot be activated with Git use

Postby ROCLASI » Mon Feb 22, 2016 4:31 pm

Hi Juan Antonio,

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.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: [URGENT] Solution cannot be activated with Git use

Postby jasantana » Mon Feb 22, 2016 4:33 pm

Thanks for your response.

Where should that file be?
Best regards,
Juan Antonio Santana Medina
jasantana@nephos-solutions.co.uk
Servoy MVP 2015
Servoy 6.x - Servoy 7.x - Servoy 8.x - MySQL - PostgreSQL - Visual Foxpro 9
User avatar
jasantana
 
Posts: 555
Joined: Tue Aug 10, 2010 11:40 am
Location: Leeds - West Yorkshire - United Kingdom

Re: [URGENT] Solution cannot be activated with Git use

Postby ROCLASI » Mon Feb 22, 2016 4:35 pm

jasantana wrote:Thanks for your response.

Where should that file be?


Who are you asking ? :)
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: [URGENT] Solution cannot be activated with Git use

Postby jasantana » Mon Feb 22, 2016 4:50 pm

ROCLASI wrote:
jasantana wrote:Thanks for your response.

Where should that file be?


Who are you asking ? :)


Nope, where. Which folder has to contain that file?
Best regards,
Juan Antonio Santana Medina
jasantana@nephos-solutions.co.uk
Servoy MVP 2015
Servoy 6.x - Servoy 7.x - Servoy 8.x - MySQL - PostgreSQL - Visual Foxpro 9
User avatar
jasantana
 
Posts: 555
Joined: Tue Aug 10, 2010 11:40 am
Location: Leeds - West Yorkshire - United Kingdom

Re: [URGENT] Solution cannot be activated with Git use

Postby Andrei Costescu » Mon Feb 22, 2016 5:01 pm

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. :)
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 1018
Joined: Tue Jun 26, 2007 3:14 pm

Re: [URGENT] Solution cannot be activated with Git use

Postby jasantana » Mon Feb 22, 2016 5:08 pm

Thanks Andrei.

I've got some Macs in my team as well. Will it make any difference?

And yes, I was talking about the git attributes file
Best regards,
Juan Antonio Santana Medina
jasantana@nephos-solutions.co.uk
Servoy MVP 2015
Servoy 6.x - Servoy 7.x - Servoy 8.x - MySQL - PostgreSQL - Visual Foxpro 9
User avatar
jasantana
 
Posts: 555
Joined: Tue Aug 10, 2010 11:40 am
Location: Leeds - West Yorkshire - United Kingdom

Next

Return to Discuss possible Issues and Bugs

Who is online

Users browsing this forum: No registered users and 6 guests

cron