olca-app icon indicating copy to clipboard operation
olca-app copied to clipboard

Issue with File Attachments Syncing via LCA Collaboration Server

Open jianchuanqi opened this issue 9 months ago • 0 comments

Hello openLCA Team,

I am encountering an issue when syncing file attachments through the openLCA LCA Collaboration Server (CS). Below is a detailed description of the problem:

Environment Setup: I am using the openLCA LCA Collaboration Server (v2.1) at a remote server, and openLCA (v2.1.1) connected to the server on a machine. Local Behavior: On my local openLCA database, I can add file attachments (e.g., images in sources) which display normally. Push to CS: I can push the database to the CS, and everything appears normal on the CS. The files are downloadable without any issues. Pulling on Another Computer: When I attempt to pull the database to another computer, it results in an error like this:

image

org.eclipse.swt.SWTException: Unsupported or unrecognized format at org.eclipse.swt.SWT.error(SWT.java:4918) at org.eclipse.swt.SWT.error(SWT.java:4833) at org.eclipse.swt.SWT.error(SWT.java:4804) at org.eclipse.swt.internal.image.FileFormat.load(FileFormat.java:88) at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:155) at org.eclipse.swt.graphics.ImageLoader.load(ImageLoader.java:182) at org.eclipse.swt.graphics.ImageDataLoader.load(ImageDataLoader.java:29) at org.eclipse.swt.graphics.ImageData.<init>(ImageData.java:380) at org.eclipse.swt.graphics.Image.<init>(Image.java:633) at org.openlca.app.editors.processes.ImageSection.createControls(ImageSection.java:86) at java.base/java.util.ArrayList.forEach(Unknown Source) at org.openlca.app.editors.processes.ImageSection.update(ImageSection.java:68) at org.openlca.app.editors.processes.ImageSection.<init>(ImageSection.java:39) at org.openlca.app.editors.processes.InfoPage.createFormContent(InfoPage.java:52) at org.eclipse.ui.forms.editor.FormPage.lambda$0(FormPage.java:166) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:74) at org.eclipse.ui.forms.editor.FormPage.createPartControl(FormPage.java:166) at org.eclipse.ui.forms.editor.FormEditor.pageChange(FormEditor.java:480) at org.eclipse.ui.part.MultiPageEditorPart.setActivePage(MultiPageEditorPart.java:1030) at org.eclipse.ui.forms.editor.FormEditor.setActivePage(FormEditor.java:612) at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:337) at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPartControl(CompatibilityPart.java:158) at org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor.createPartControl(CompatibilityEditor.java:96) at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:365) at jdk.internal.reflect.GeneratedMethodAccessor55.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58) at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:995) at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:960) at org.eclipse.e4.core.internal.di.InjectorImpl.internalInject(InjectorImpl.java:140) at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:403) at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:330) at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:202) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:91) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:60) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:42) at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:132) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:995) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:659) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:763) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:728) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:712) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.lambda$0(PartServiceImpl.java:105) at org.eclipse.e4.ui.services.internal.events.UIEventHandler.lambda$0(UIEventHandler.java:38) at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:183) at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:133) at org.eclipse.swt.widgets.Display.syncExec(Display.java:4785) at org.eclipse.e4.ui.workbench.swt.DisplayUISynchronize.syncExec(DisplayUISynchronize.java:34) at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:38) at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:205) at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:203) at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234) at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:151) at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:133) at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:75) at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:44) at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:55) at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:63) at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:424) at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElementGen(ElementContainerImpl.java:170) at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElement(ElementContainerImpl.java:188) at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.showElementInWindow(ModelServiceImpl.java:660) at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.bringToTop(ModelServiceImpl.java:624) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.delegateBringToTop(PartServiceImpl.java:790) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.bringToTop(PartServiceImpl.java:401) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:1264) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:3210) at org.eclipse.ui.internal.WorkbenchPage.lambda$9(WorkbenchPage.java:3100) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:74) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3098) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3068) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3051) at org.openlca.app.editors.Editors$OpenInUIJob.runInUIThread(Editors.java:169) at org.eclipse.ui.progress.UIJob.lambda$0(UIJob.java:148) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:132) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4029) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3645) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1155) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155) at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:643) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:550) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:171) at org.openlca.app.rcp.RcpApplication.start(RcpApplication.java:13) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:402) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596) at org.eclipse.equinox.launcher.Main.run(Main.java:1467)

Additional Attempt: I tried creating a new repository on the CS by uploading a JSON-LD file, but syncing it back also led to an error. Suspected Issue: I suspect there might be a configuration issue with Git on local openLCA concerning the handling of binary files like ZIP, PDF, PNG, JPEG, etc. These file types sync and function normally locally but cause errors when processed through the CS.

Could you please assist in resolving this issue? Any guidance or potential fixes would be greatly appreciated.

Thank you for your support!

Best regards, Jianchuan

jianchuanqi avatar Apr 30 '24 12:04 jianchuanqi