Home » Eclipse Projects » Sirius » Problem in creating Representation file (Not able to create Representation for a custom xml file)
Problem in creating Representation file [message #1184242] |
Wed, 13 November 2013 05:12  |
Eclipse User |
|
|
|
Hello,
I'm trying to use a custom xml file with custom xml schema instance, for creating a representation file.
With EMF, this file is working fine. But, when I try to create a representation file for that file, its showing some errors.
Can custom xml files be used to create the representation file?
Is there any way we can change the code of sirius plugin and allow it to make use of this custom xml file?
Please, let me know..!!
I have attached the error message
Thank you.!
|
|
|
Re: Problem in creating Representation file [message #1184605 is a reply to message #1184242] |
Wed, 13 November 2013 10:14   |
Eclipse User |
|
|
|
Hi Rahul,
could you please clarify what you mean by "custom XML file" ? As long as
this xml file can be loaded as an EMF model (a quick way to test it is
to open it whith the Sample Reflective Ecore Editor), it will work with
sirius.
Best regards,
Alex
Le 13/11/2013 16:10, Rahul Nair a écrit :
> Hello,
>
> I'm trying to use a custom xml file with custom xml schema instance, for
> creating a representation file.
> With EMF, this file is working fine. But, when I try to create a
> representation file for that file, its showing some errors.
>
> Can custom xml files be used to create the representation file?
>
> Is there any way we can change the code of sirius plugin and allow it to
> make use of this custom xml file?
>
> Please, let me know..!!
>
> I have attached the error message
>
> Thank you.!
|
|
| |
Re: Problem in creating Representation file [message #1186167 is a reply to message #1186090] |
Thu, 14 November 2013 09:25   |
Eclipse User |
|
|
|
Hi Rahul,
this is normal: the Sirius Ecore Editor is only meant to work on ecore
models. I was asking you to try to open your model with the Sample
Reflective Editor to determine whether your model was well formed or not.
Ok so let's get back to your initial problem: you have a valid EMF
model, and "when you try to create a representation file for that file
its showing some errors". What kind of representation are you trying to
create? One you have defined for this model?
Best regards,
Alex
Le 14/11/2013 14:25, Rahul Nair a écrit :
> Hello Alex,
>
> Thanks for the reply, I tried opening this file with Sample Reflective
> Ecore Model Editor , its working fine. But, when I tried to open with
> Sirius Ecore Editor, its showing an error.
>
> java.net.MalformedURLException: unknown protocol: ea
>
> By Custom, xml file I meant, this is not a standard xml file, we are
> using our own namespace and all.
|
|
| | | |
Re: Problem in creating Representation file [message #1196554 is a reply to message #1196219] |
Tue, 19 November 2013 08:24   |
Eclipse User |
|
|
|
Le 19/11/2013 10:59, Rahul Nair a écrit :
> Hello David,
>
> I have a file inside a normal eclipse project , which is a semantic
> model (kind of uml). It is opening with the Sample Reflective Ecore
> Model editor, When I try to create the representation file for this
> semantic model, it gives me an error:
Thanks for the stack. When connecting a semantic model to a Sirius
representation model (which happens automatically when you create a
representation file from your semantic model), Sirius installs an
ECrossReferenceAdapter on your semantic model. This forces a resolution
of all the proxies in your semantic resource. In this case it seems one
of them has a proxy URI which uses the custom "ea" protocol (i.e. it is
of the form "ea:something"), but no protocol handler is
registered/visible for this non-standard scheme.
I see only two possibilities:
1. The protocol handler for your custom URI scheme is correctly
registered, but either a bug in Sirius or some kind of incompatibility
between Sirius, Sphinx and Xtext (all of which appear in the stack) make
it unavailable somewhere deep inside the resolution logic.
2. The protocol handler is not correctly registered, but this does not
show simply by opening the model in the "Sample Reflective Ecore Model
Editor" because just opening the model does not force a resolution of
the faulty proxy URI.
You can very easily check the second possibility: open your semantic
model in the "Sample Reflective Ecore Model Editor", but this time
select the root element, right click and in the context menu choose
"Validate". This will force the resolution of all the proxy URIs in your
model.
If you see the same error, it means the problem is somewhere on your
side in the way the "ea" protocol is registered. If the validation
works, then then bug may be related to Sirius in some way and we will
need to dig deeper.
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException:
> java.net.MalformedURLException: unknown protocol: ea
> 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.xtext.resource.XtextResourceSet.getResource(XtextResourceSet.java:201)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getEObject(ResourceSetImpl.java:220)
>
> at
> org.eclipse.sphinx.emf.ecore.proxymanagement.ProxyResolutionBehavior.eResolveProxyInResourceSet(ProxyResolutionBehavior.java:62)
>
> at
> org.eclipse.sphinx.emf.ecore.proxymanagement.ProxyResolutionBehavior.eResolveProxy(ProxyResolutionBehavior.java:46)
>
> at
> org.eclipse.sphinx.emf.ecore.ExtendedEObjectImpl.eResolveProxy(ExtendedEObjectImpl.java:34)
>
> at
> eastadl21.east_adl.structure.hardwaremodeling._instanceref.impl.HardwareConnector_portImpl.getHardwareComponentPrototype(HardwareConnector_portImpl.java:91)
>
> at
> eastadl21.east_adl.structure.hardwaremodeling._instanceref.impl.HardwareConnector_portImpl.eGet(HardwareConnector_portImpl.java:178)
>
> 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:403)
>
> at
> org.eclipse.emf.ecore.util.EcoreUtil$CrossReferencer.handleCrossReference(EcoreUtil.java:1738)
>
> at
> org.eclipse.emf.ecore.util.ECrossReferenceAdapter$InverseCrossReferencer.add(ECrossReferenceAdapter.java:140)
>
> at
> org.eclipse.emf.ecore.util.ECrossReferenceAdapter.setTarget(ECrossReferenceAdapter.java:692)
>
> at
> org.eclipse.emf.ecore.util.ECrossReferenceAdapter.setTarget(ECrossReferenceAdapter.java:674)
>
> at
> org.eclipse.emf.common.notify.impl.BasicNotifierImpl$EAdapterList.didAdd(BasicNotifierImpl.java:121)
>
> at
> org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList.java:419)
> at
> org.eclipse.emf.common.util.AbstractEList.add(AbstractEList.java:301)
> at
> org.eclipse.emf.common.notify.impl.BasicNotifierImpl$EAdapterList.add(BasicNotifierImpl.java:193)
>
> at
> org.eclipse.emf.ecore.util.ECrossReferenceAdapter.addAdapter(ECrossReferenceAdapter.java:820)
>
> at
> org.eclipse.emf.ecore.util.ECrossReferenceAdapter.setTarget(ECrossReferenceAdapter.java:700)
>
> at
> org.eclipse.emf.ecore.util.ECrossReferenceAdapter.setTarget(ECrossReferenceAdapter.java:674)
>
> at
> org.eclipse.emf.common.notify.impl.BasicNotifierImpl$EAdapterList.didAdd(BasicNotifierImpl.java:121)
>
> at
> org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList.java:419)
> at
> org.eclipse.emf.common.util.AbstractEList.add(AbstractEList.java:301)
> at
> org.eclipse.emf.common.notify.impl.BasicNotifierImpl$EAdapterList.add(BasicNotifierImpl.java:193)
>
> at
> org.eclipse.emf.ecore.util.ECrossReferenceAdapter.addAdapter(ECrossReferenceAdapter.java:820)
>
> at
> org.eclipse.emf.ecore.util.ECrossReferenceAdapter.setTarget(ECrossReferenceAdapter.java:700)
>
> at
> org.eclipse.emf.ecore.util.ECrossReferenceAdapter.setTarget(ECrossReferenceAdapter.java:674)
>
> at
> org.eclipse.emf.common.notify.impl.BasicNotifierImpl$EAdapterList.didAdd(BasicNotifierImpl.java:121)
>
> at
> org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList.java:419)
> at
> org.eclipse.emf.common.util.AbstractEList.add(AbstractEList.java:301)
> at
> org.eclipse.emf.common.notify.impl.BasicNotifierImpl$EAdapterList.add(BasicNotifierImpl.java:193)
>
> at
> org.eclipse.emf.ecore.util.ECrossReferenceAdapter.addAdapter(ECrossReferenceAdapter.java:820)
>
> at
> org.eclipse.emf.ecore.util.ECrossReferenceAdapter.setTarget(ECrossReferenceAdapter.java:700)
>
> at
> org.eclipse.emf.ecore.util.ECrossReferenceAdapter.setTarget(ECrossReferenceAdapter.java:674)
>
> at
> org.eclipse.emf.common.notify.impl.BasicNotifierImpl$EAdapterList.didAdd(BasicNotifierImpl.java:121)
>
> at
> org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList.java:419)
> at
> org.eclipse.emf.common.util.AbstractEList.add(AbstractEList.java:301)
> at
> org.eclipse.emf.common.notify.impl.BasicNotifierImpl$EAdapterList.add(BasicNotifierImpl.java:193)
>
> at
> org.eclipse.emf.ecore.util.ECrossReferenceAdapter.addAdapter(ECrossReferenceAdapter.java:820)
>
> at
> org.eclipse.emf.ecore.util.ECrossReferenceAdapter.setTarget(ECrossReferenceAdapter.java:700)
>
> at
> org.eclipse.emf.ecore.util.ECrossReferenceAdapter.setTarget(ECrossReferenceAdapter.java:674)
>
> at
> org.eclipse.emf.common.notify.impl.BasicNotifierImpl$EAdapterList.didAdd(BasicNotifierImpl.java:121)
>
> at
> org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList.java:419)
> at
> org.eclipse.emf.common.util.AbstractEList.add(AbstractEList.java:301)
> at
> org.eclipse.emf.common.notify.impl.BasicNotifierImpl$EAdapterList.add(BasicNotifierImpl.java:193)
>
> at
> org.eclipse.emf.ecore.util.ECrossReferenceAdapter.addAdapter(ECrossReferenceAdapter.java:820)
>
> at
> org.eclipse.emf.ecore.util.ECrossReferenceAdapter.setTarget(ECrossReferenceAdapter.java:700)
>
> at
> org.eclipse.emf.ecore.util.ECrossReferenceAdapter.setTarget(ECrossReferenceAdapter.java:674)
>
> at
> org.eclipse.emf.common.notify.impl.BasicNotifierImpl$EAdapterList.didAdd(BasicNotifierImpl.java:121)
>
> at
> org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList.java:419)
> at
> org.eclipse.emf.common.util.AbstractEList.add(AbstractEList.java:301)
> at
> org.eclipse.emf.common.notify.impl.BasicNotifierImpl$EAdapterList.add(BasicNotifierImpl.java:193)
>
> at
> org.eclipse.emf.ecore.util.ECrossReferenceAdapter.addAdapter(ECrossReferenceAdapter.java:820)
>
> at
> org.eclipse.emf.ecore.util.ECrossReferenceAdapter.setTarget(ECrossReferenceAdapter.java:700)
>
> at
> org.eclipse.emf.ecore.util.ECrossReferenceAdapter.setTarget(ECrossReferenceAdapter.java:674)
>
> at
> org.eclipse.emf.common.notify.impl.BasicNotifierImpl$EAdapterList.didAdd(BasicNotifierImpl.java:121)
>
> at
> org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList.java:419)
> at
> org.eclipse.emf.common.util.AbstractEList.add(AbstractEList.java:301)
> at
> org.eclipse.emf.common.notify.impl.BasicNotifierImpl$EAdapterList.add(BasicNotifierImpl.java:193)
>
> at
> org.eclipse.emf.ecore.util.ECrossReferenceAdapter.addAdapter(ECrossReferenceAdapter.java:820)
>
> at
> org.eclipse.emf.ecore.util.ECrossReferenceAdapter.setTarget(ECrossReferenceAdapter.java:718)
>
> at
> org.eclipse.emf.ecore.util.ECrossReferenceAdapter.setTarget(ECrossReferenceAdapter.java:678)
>
> at
> org.eclipse.sirius.common.tools.api.util.LazyCrossReferencer.setTarget(LazyCrossReferencer.java:169)
>
> at
> org.eclipse.emf.common.notify.impl.BasicNotifierImpl$EAdapterList.didAdd(BasicNotifierImpl.java:121)
>
> at
> org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList.java:419)
> at
> org.eclipse.emf.common.util.AbstractEList.add(AbstractEList.java:301)
> at
> org.eclipse.emf.common.notify.impl.BasicNotifierImpl$EAdapterList.add(BasicNotifierImpl.java:193)
>
> at
> org.eclipse.sirius.business.internal.session.danalysis.DAnalysisSessionImpl.registerResourceInCrossReferencer(DAnalysisSessionImpl.java:820)
>
> at
> org.eclipse.sirius.business.internal.session.danalysis.DAnalysisSessionImpl.doAddSemanticResource(DAnalysisSessionImpl.java:793)
>
> at
> org.eclipse.sirius.business.internal.session.danalysis.DAnalysisSessionImpl.addSemanticResource(DAnalysisSessionImpl.java:682)
>
> at
> org.eclipse.sirius.business.internal.session.danalysis.DAnalysisSessionImpl.addSemanticResource(DAnalysisSessionImpl.java:753)
>
> at
> org.eclipse.sirius.business.internal.session.danalysis.DAnalysisSessionImpl.addSemanticResource(DAnalysisSessionImpl.java:766)
>
> at
> org.eclipse.sirius.tools.api.command.semantic.AddSemanticResourceCommand.doExecute(AddSemanticResourceCommand.java:98)
>
> at
> org.eclipse.emf.transaction.RecordingCommand.execute(RecordingCommand.java:135)
>
> at
> org.eclipse.emf.workspace.EMFCommandOperation.doExecute(EMFCommandOperation.java:119)
>
> at
> org.eclipse.emf.workspace.AbstractEMFOperation.execute(AbstractEMFOperation.java:150)
>
> at
> org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:513)
>
> at
> org.eclipse.emf.workspace.impl.WorkspaceCommandStackImpl.doExecute(WorkspaceCommandStackImpl.java:208)
>
> at
> org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:165)
>
> at
> org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:219)
>
> at
> org.eclipse.sirius.ui.tools.internal.wizards.NewSessionWizard$SessionCreationOperation.execute(NewSessionWizard.java:278)
>
> at
> org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
>
> at
> org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2345)
> at
> org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
>
> at
> org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
>
> Caused by: java.net.MalformedURLException: unknown protocol: ea
> 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:187)
>
> 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)
>
> ... 86 more
>
> If the representation file is made properly, then only I can convert the
> project into an Modelling project, then only I can proceed further.
|
|
| | |
Goto Forum:
Current Time: Sat Jul 05 01:21:23 EDT 2025
Powered by FUDForum. Page generated in 0.04276 seconds
|