commit Media issue after upgrade to 6.1

I’ve upgraded from 6.0 to 6.1 and now I can’t commit media files. The issue is similar to this topic: teamsupport commit Media issue, Servoy 5.2.

In .metadata\log I’ve found this:

org.json.JSONException: Expected a ':' after a key at character 323 of {[
{
mimeType:"image/png",
name:"ireport.png",
typeid:37,
uuid:"F8A9E1C2-ECEE-477B-9F6E-73EA1AA88F56"
},
{
mimeType:"image/gif",
name:"nav_right_grey_whiteBg.gif",
typeid:37,
uuid:"EBBAC2D1-549C-42AB-B20B-C69E0C88701F"
},
{
mimeType:"image/png",
name:"nuevo.png",
typeid:37,
uuid:"281ED290-CBE6-4B22-AF02-7C4B40EC6563"
}
]}
	at org.json.JSONTokener.syntaxError(JSONTokener.java:451)
	at org.json.JSONObject.<init>(JSONObject.java:204)
	at org.json.JSONObject.<init>(JSONObject.java:327)
	at com.servoy.j2db.util.ServoyJSONObject.<init>(ServoyJSONObject.java:67)
	at com.servoy.j2db.util.ServoyJSONObject.<init>(ServoyJSONObject.java:62)
	at com.servoy.eclipse.model.repository.SolutionDeserializer.getUUID(SolutionDeserializer.java:1884)
	at com.servoy.eclipse.core.resource.PersistMatchingStrategy.findUuidParent(PersistMatchingStrategy.java:78)
	at com.servoy.eclipse.core.resource.PersistMatchingStrategy.matches(PersistMatchingStrategy.java:64)
	at org.eclipse.ui.internal.EditorManager.findEditors(EditorManager.java:510)
	at org.eclipse.ui.internal.EditorManager.findEditors(EditorManager.java:457)
	at org.eclipse.ui.internal.EditorManager.findEditor(EditorManager.java:420)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2887)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2850)
	at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2842)
	at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2793)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2789)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2773)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2764)
	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651)
	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610)
	at org.eclipse.ui.actions.OpenFileAction.openFile(OpenFileAction.java:99)
	at org.eclipse.ui.actions.OpenSystemEditorAction.run(OpenSystemEditorAction.java:99)
	at org.eclipse.ui.actions.BaseSelectionListenerAction.runWithEvent(BaseSelectionListenerAction.java:168)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)

I’ve reinstalled Servoy 6.1 from scratch, but I can’t get rid of this problem, so I had to downgrade to 6.0

I’ve installed Servoy on another computer, but I get the same error…

The stack you posted is from opening an editor. Do you have any other exceptions in developer log ?

In .metadata\log I’ve also found this (just before the stack I posted):

!ENTRY com.servoy.eclipse.model 2 0 2012-08-29 11:13:39.585
!MESSAGE Cannot get uuid from file D:\servoy61_workbench\mod_common\medias.obj
!STACK 0

juan.cristobo:
In .metadata\log I’ve also found this (just before the stack I posted):

!ENTRY com.servoy.eclipse.model 2 0 2012-08-29 11:13:39.585

!MESSAGE Cannot get uuid from file D:\servoy61_workbench\mod_common\medias.obj
!STACK 0

What does this file:

D:\servoy61_workbench\mod_common\medias.obj

contain ?

I’ve imported a media file to “mod_common” module, I see the image in the Medias node and I can see this in the medias.obj file:

[
{
mimeType:"image/gif",
name:"nav_right_red_whiteBg.gif",
typeid:37,
uuid:"2954E4BF-65B2-413E-BE19-4D27E50E143B"
}
]

Then, I’ve commited the module without problem (there’s nothing in the log). Now, I’ve selected Team > Synchronize and Servoy tells me I have to update the image (!?). I’ve selected Update and then me image file dissaperas from the Medias node (but I can see the code in the medias.obj file)

juan.cristobo:
I’ve imported a media file to “mod_common” module, I see the image in the Medias node and I can see this in the medias.obj file:

[

{
mimeType:“image/gif”,
name:“nav_right_red_whiteBg.gif”,
typeid:37,
uuid:“2954E4BF-65B2-413E-BE19-4D27E50E143B”
}
]




Then, I've commited the module without problem (there's nothing in the log). Now, I've selected *Team > Synchronize* and Servoy tells me I have to update the image (!?). I've selected *Update* and then me image file dissaperas from the Medias node (but I can see the code in the **medias.obj** file)

Strange, please create a case in JIRA pointing to this thread so we can investigate further.

Case created: SVY-2994

I am also experiencing this same problem. I have been too busy rewriting my code from Servoy 4 to Servoy 6 to make a case, but I thought I would chime in when I saw this.
Steve in L.A.