Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Getting exception while saving into resource set(Getting exception while saving into resource set)
Getting exception while saving into resource set [message #1797949] Fri, 09 November 2018 06:27 Go to next message
Sharmila D is currently offline Sharmila DFriend
Messages: 79
Registered: June 2018
Member
Hii

Iam getting the below exception while writing into resource set of semantic model file. Iam getting exception at res.save
Please anyone help me in this

!ENTRY org.eclipse.sirius 4 0 2018-11-09 11:32:42.194
!MESSAGE Can't handle resource change : platform:/resource/check2/check2.autosartoplevelstructure
!STACK 0
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: java.net.MalformedURLException: unknown protocol: ar
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDemandLoadException(ResourceSetImpl.java:319)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:278)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$ResourceLocator.demandLoadHelper(ResourceSetImpl.java:804)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$MappedResourceLocator.getResource(ResourceSetImpl.java:1204)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:352)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getEObject(ResourceSetImpl.java:220)
at org.eclipse.sphinx.emf.ecore.proxymanagement.ProxyResolutionBehavior.eResolveProxyInResourceSet(ProxyResolutionBehavior.java:63)
at org.eclipse.sphinx.emf.ecore.proxymanagement.ProxyResolutionBehavior.eResolveProxy(ProxyResolutionBehavior.java:47)
at org.eclipse.sphinx.emf.ecore.ExtendedMinimalEObjectImpl.eResolveProxy(ExtendedMinimalEObjectImpl.java:28)
at autosar40.commonstructure.datadefproperties.impl.SwDataDefPropsContentImpl.getImplementationDataType(SwDataDefPropsContentImpl.java:1242)
at autosar40.commonstructure.datadefproperties.impl.SwDataDefPropsContentImpl.eGet(SwDataDefPropsContentImpl.java:2007)
at autosar40.commonstructure.datadefproperties.impl.SwDataDefPropsConditionalImpl.eGet(SwDataDefPropsConditionalImpl.java:400)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1011)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1003)
at org.eclipse.emf.ecore.util.EContentsEList$FeatureIteratorImpl.hasNext(EContentsEList.java:439)
at org.eclipse.emf.ecore.util.EcoreUtil$CrossReferencer.handleCrossReference(EcoreUtil.java:1792)
at org.eclipse.emf.ecore.util.ECrossReferenceAdapter$InverseCrossReferencer.add(ECrossReferenceAdapter.java:216)
at org.eclipse.emf.ecore.util.ECrossReferenceAdapter.setTarget(ECrossReferenceAdapter.java:770)
at org.eclipse.emf.ecore.util.ECrossReferenceAdapter.setTarget(ECrossReferenceAdapter.java:752)
at org.eclipse.sirius.common.tools.api.util.LazyCrossReferencer.setTarget(LazyCrossReferencer.java:150)
at org.eclipse.sphinx.emf.ecore.MinimalEObjectImpl2$1ArrayDelegatingAdapterList.didAdd(MinimalEObjectImpl2.java:440)
at org.eclipse.sphinx.emf.ecore.MinimalEObjectImpl2$1ArrayDelegatingAdapterList.didAdd(MinimalEObjectImpl2.java:1)
at org.eclipse.emf.common.util.ArrayDelegatingEList.addUnique(ArrayDelegatingEList.java:389)
at org.eclipse.emf.common.util.AbstractEList.add(AbstractEList.java:303)
at org.eclipse.sirius.common.tools.api.util.SiriusCrossReferenceAdapterImpl.addAdapter(SiriusCrossReferenceAdapterImpl.java:89)
at org.eclipse.emf.ecore.util.ECrossReferenceAdapter.setTarget(ECrossReferenceAdapter.java:778)
at org.eclipse.emf.ecore.util.ECrossReferenceAdapter.setTarget(ECrossReferenceAdapter.java:752)
at org.eclipse.sirius.common.tools.api.util.LazyCrossReferencer.setTarget(LazyCrossReferencer.java:150)
at org.eclipse.sphinx.emf.ecore.MinimalEObjectImpl2$1ArrayDelegatingAdapterList.didAdd(MinimalEObjectImpl2.java:440)
at org.eclipse.sphinx.emf.ecore.MinimalEObjectImpl2$1ArrayDelegatingAdapterList.didAdd(MinimalEObjectImpl2.java:1)
at org.eclipse.emf.common.util.ArrayDelegatingEList.addUnique(ArrayDelegatingEList.java:389)
at org.eclipse.emf.common.util.AbstractEList.add(AbstractEList.java:303)
at org.eclipse.sirius.common.tools.api.util.SiriusCrossReferenceAdapterImpl.addAdapter(SiriusCrossReferenceAdapterImpl.java:89)
at org.eclipse.emf.ecore.util.ECrossReferenceAdapter.setTarget(ECrossReferenceAdapter.java:778)
at org.eclipse.emf.ecore.util.ECrossReferenceAdapter.setTarget(ECrossReferenceAdapter.java:752)
at org.eclipse.sirius.common.tools.api.util.LazyCrossReferencer.setTarget(LazyCrossReferencer.java:150)
at org.eclipse.sphinx.emf.ecore.MinimalEObjectImpl2$1ArrayDelegatingAdapterList.didAdd(MinimalEObjectImpl2.java:440)
at org.eclipse.sphinx.emf.ecore.MinimalEObjectImpl2$1ArrayDelegatingAdapterList.didAdd(MinimalEObjectImpl2.java:1)
at org.eclipse.emf.common.util.ArrayDelegatingEList.addUnique(ArrayDelegatingEList.java:389)
at org.eclipse.emf.common.util.AbstractEList.add(AbstractEList.java:303)
at org.eclipse.sirius.common.tools.api.util.SiriusCrossReferenceAdapterImpl.addAdapter(SiriusCrossReferenceAdapterImpl.java:89)
at org.eclipse.emf.ecore.util.ECrossReferenceAdapter.setTarget(ECrossReferenceAdapter.java:778)
at org.eclipse.emf.ecore.util.ECrossReferenceAdapter.setTarget(ECrossReferenceAdapter.java:752)
at org.eclipse.sirius.common.tools.api.util.LazyCrossReferencer.setTarget(LazyCrossReferencer.java:150)
at org.eclipse.sphinx.emf.ecore.MinimalEObjectImpl2$1ArrayDelegatingAdapterList.didAdd(MinimalEObjectImpl2.java:440)
at org.eclipse.sphinx.emf.ecore.MinimalEObjectImpl2$1ArrayDelegatingAdapterList.didAdd(MinimalEObjectImpl2.java:1)
at org.eclipse.emf.common.util.ArrayDelegatingEList.addUnique(ArrayDelegatingEList.java:389)
at org.eclipse.emf.common.util.AbstractEList.add(AbstractEList.java:303)
at org.eclipse.sirius.common.tools.api.util.SiriusCrossReferenceAdapterImpl.addAdapter(SiriusCrossReferenceAdapterImpl.java:89)
at org.eclipse.emf.ecore.util.ECrossReferenceAdapter.setTarget(ECrossReferenceAdapter.java:778)
at org.eclipse.emf.ecore.util.ECrossReferenceAdapter.setTarget(ECrossReferenceAdapter.java:752)
at org.eclipse.sirius.common.tools.api.util.LazyCrossReferencer.setTarget(LazyCrossReferencer.java:150)
at org.eclipse.sphinx.emf.ecore.MinimalEObjectImpl2$1ArrayDelegatingAdapterList.didAdd(MinimalEObjectImpl2.java:440)
at org.eclipse.sphinx.emf.ecore.MinimalEObjectImpl2$1ArrayDelegatingAdapterList.didAdd(MinimalEObjectImpl2.java:1)
at org.eclipse.emf.common.util.ArrayDelegatingEList.addUnique(ArrayDelegatingEList.java:389)
at org.eclipse.emf.common.util.AbstractEList.add(AbstractEList.java:303)
at org.eclipse.sirius.common.tools.api.util.SiriusCrossReferenceAdapterImpl.addAdapter(SiriusCrossReferenceAdapterImpl.java:89)
at org.eclipse.emf.ecore.util.ECrossReferenceAdapter.setTarget(ECrossReferenceAdapter.java:778)
at org.eclipse.emf.ecore.util.ECrossReferenceAdapter.setTarget(ECrossReferenceAdapter.java:752)
at org.eclipse.sirius.common.tools.api.util.LazyCrossReferencer.setTarget(LazyCrossReferencer.java:150)
at org.eclipse.sphinx.emf.ecore.MinimalEObjectImpl2$1ArrayDelegatingAdapterList.didAdd(MinimalEObjectImpl2.java:440)
at org.eclipse.sphinx.emf.ecore.MinimalEObjectImpl2$1ArrayDelegatingAdapterList.didAdd(MinimalEObjectImpl2.java:1)
at org.eclipse.emf.common.util.ArrayDelegatingEList.addUnique(ArrayDelegatingEList.java:389)
at org.eclipse.emf.common.util.AbstractEList.add(AbstractEList.java:303)
at org.eclipse.sirius.common.tools.api.util.SiriusCrossReferenceAdapterImpl.addAdapter(SiriusCrossReferenceAdapterImpl.java:89)
at org.eclipse.emf.ecore.util.ECrossReferenceAdapter.setTarget(ECrossReferenceAdapter.java:778)
at org.eclipse.emf.ecore.util.ECrossReferenceAdapter.setTarget(ECrossReferenceAdapter.java:752)
at org.eclipse.sirius.common.tools.api.util.LazyCrossReferencer.setTarget(LazyCrossReferencer.java:150)
at org.eclipse.sphinx.emf.ecore.MinimalEObjectImpl2$1ArrayDelegatingAdapterList.didAdd(MinimalEObjectImpl2.java:440)
at org.eclipse.sphinx.emf.ecore.MinimalEObjectImpl2$1ArrayDelegatingAdapterList.didAdd(MinimalEObjectImpl2.java:1)
at org.eclipse.emf.common.util.ArrayDelegatingEList.addUnique(ArrayDelegatingEList.java:389)
at org.eclipse.emf.common.util.AbstractEList.add(AbstractEList.java:303)
at org.eclipse.sirius.common.tools.api.util.SiriusCrossReferenceAdapterImpl.addAdapter(SiriusCrossReferenceAdapterImpl.java:89)
at org.eclipse.emf.ecore.util.ECrossReferenceAdapter.selfAdapt(ECrossReferenceAdapter.java:582)
at org.eclipse.sirius.business.internal.session.danalysis.SessionLazyCrossReferencer.selfAdapt(SessionLazyCrossReferencer.java:96)
at org.eclipse.emf.ecore.util.ECrossReferenceAdapter.notifyChanged(ECrossReferenceAdapter.java:502)
at org.eclipse.sirius.common.tools.api.util.LazyCrossReferencer.notifyChanged(LazyCrossReferencer.java:142)
at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1538)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1297)
at org.eclipse.sirius.business.internal.session.danalysis.SessionResourcesSynchronizer$1.run(SessionResourcesSynchronizer.java:200)
at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.runExclusive(TransactionalEditingDomainImpl.java:328)
at org.eclipse.sirius.business.internal.session.danalysis.SessionResourcesSynchronizer.reloadResource(SessionResourcesSynchronizer.java:209)
at org.eclipse.sirius.business.internal.session.danalysis.SessionResourcesSynchronizer.processAction(SessionResourcesSynchronizer.java:170)
at org.eclipse.sirius.business.internal.session.danalysis.SessionResourcesSynchronizer.processActions(SessionResourcesSynchronizer.java:159)
at org.eclipse.sirius.business.internal.session.danalysis.SessionResourcesSynchronizer.statusesChanged(SessionResourcesSynchronizer.java:109)
at org.eclipse.sirius.common.tools.api.resource.ResourceSetSync.notifyClientsInBatch(ResourceSetSync.java:392)
at org.eclipse.sirius.common.tools.api.resource.ResourceSetSync.statusesChanged(ResourceSetSync.java:447)
at org.eclipse.sirius.common.tools.internal.resource.ResourceSyncClientNotifier.run(ResourceSyncClientNotifier.java:77)
at org.eclipse.sirius.common.tools.internal.resource.EditingSessionWorkspaceListener.resourceChanged(EditingSessionWorkspaceListener.java:59)
at org.eclipse.core.internal.events.NotificationManager$1.run(NotificationManager.java:299)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:289)
at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:152)
at org.eclipse.core.internal.resources.Workspace.broadcastPostChange(Workspace.java:374)
at org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java:1469)
at org.eclipse.core.internal.resources.File.setContents(File.java:344)
at org.eclipse.core.internal.resources.File.setContents(File.java:434)
at org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandlerImpl$PlatformResourceOutputStream.flush(PlatformResourceURIHandlerImpl.java:133)
at sun.nio.cs.StreamEncoder.implFlush(Unknown Source)
at sun.nio.cs.StreamEncoder.flush(Unknown Source)
at java.io.OutputStreamWriter.flush(Unknown Source)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.write(XMLSaveImpl.java:1017)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.save(XMLSaveImpl.java:261)
at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doSave(XMLResourceImpl.java:389)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1430)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:999)
at com.avin.arxml.generation.handlers.GenerateDesign.generateSiriusResource(GenerateDesign.java:474)
at com.avin.arxml.generation.handlers.GenerateDesign.readArxmlResource(GenerateDesign.java:407)
at com.avin.arxml.generation.handlers.GenerateDesign.readSiriusResource(GenerateDesign.java:347)
at com.avin.importArxml.AvinFileSystemImportOperation.run(AvinFileSystemImportOperation.java:88)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)
Caused by: java.net.MalformedURLException: unknown protocol: ar
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at org.eclipse.emf.ecore.resource.impl.URIHandlerImpl.createInputStream(URIHandlerImpl.java:199)
at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.createInputStream(ExtensibleURIConverterImpl.java:360)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1269)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:259)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
... 110 more
Re: Getting exception while saving into resource set [message #1798208 is a reply to message #1797949] Wed, 14 November 2018 08:59 Go to previous message
Laurent Fasani is currently offline Laurent FasaniFriend
Messages: 157
Registered: October 2014
Senior Member
Hello

It looks like you are saving the semantic resource outside the Sirius Session.
Then the change is seen as external changes from Sirius Session which catches the event of resource change (at org.eclipse.sirius.common.tools.internal.resource.EditingSessionWorkspaceListener.resourceChanged(EditingSessionWorkspaceListener.java:59)) and then will reload the resource in its ResourceSet.
Then while reloading it seems that an instance of SwDataDefPropsContentImpl have a proxy with a malformed URL. You have to debug it to understand what is the URL and why it is like this.

At a glance I would say your mistake has nothing to see with the fact that the resource is changed outside the Sirius ResourceSet but I would nevertheless advice, if possible, to save the resourceSet through the Sirius Session using session.save

Regards
Laurent




Laurent Fasani - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:OCL features, Acceleo and Sirius
Next Topic:How to create EParameter under Eoperation in eclipse sirius
Goto Forum:
  


Current Time: Thu Aug 22 22:24:07 GMT 2019

Powered by FUDForum. Page generated in 0.02010 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top