|
|
Re: [CDO][Xcore] Can't create resource on the base of Xcore defined model [message #1227493 is a reply to message #1220515] |
Sat, 04 January 2014 17:52 |
|
Am 12.12.2013 11:00, schrieb Dominik Leszyk:
> Hi all,
>
> I've tried to create a new resource in the CDO repository using UI tooling. The workflow looks like this:
>
>
> Create model using Xcore (http://wiki.eclipse.org/Xcore)
> Convert it to Ecore (http://wiki.eclipse.org/Xcore#Converting_an_Xcore_Model_to_a_GenModel)
> Start CDO Server (use CDO Master Server Example)
> Open the session (using CDO Sessions view)
> Register Ecore file generated from Xcore in the repository (Package Registry in context menu)
With CDO it's not recommended to use models with nsURIs that only have a local meaning. Can't you generate that model
and deploy it to your clients?
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
> Start a new transaction for the opened session
> Create a new resource and add a new object on the base of model created from Xcore
> When trying to commit the change (ctrl+s in the editor) I got an exception:
>
>
>
> Package 'org.sample.help.profile' contains unresolved proxy
> 'platform:/resource/org.eclipse.emf.ecore/model/Ecore.ecore#//EString'
> java.lang.IllegalStateException: Package 'org.sample.help.profile' contains unresolved proxy
> 'platform:/resource/org.eclipse.emf.ecore/model/Ecore.ecore#//EString'
> at org.eclipse.emf.cdo.common.model.CDOModelUtil.checkCrossResourceURIs(CDOModelUtil.java:630)
> at org.eclipse.emf.cdo.common.model.CDOModelUtil.writePackage(CDOModelUtil.java:596)
> at org.eclipse.emf.cdo.internal.common.model.CDOPackageUnitImpl.write(CDOPackageUnitImpl.java:270)
> at org.eclipse.emf.cdo.spi.common.protocol.CDODataOutputImpl.writeCDOPackageUnit(CDODataOutputImpl.java:92)
> at
> org.eclipse.emf.cdo.internal.net4j.protocol.CommitTransactionRequest.requestingCommit(CommitTransactionRequest.java:159)
> at org.eclipse.emf.cdo.internal.net4j.protocol.CommitTransactionRequest.requesting(CommitTransactionRequest.java:128)
> at
> org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientRequestWithMonitoring.requesting(CDOClientRequestWithMonitoring.java:92)
> at org.eclipse.net4j.signal.RequestWithMonitoring.requesting(RequestWithMonitoring.java:165)
> at org.eclipse.net4j.signal.RequestWithConfirmation.doExtendedOutput(RequestWithConfirmation.java:119)
> at org.eclipse.net4j.signal.Signal.doOutput(Signal.java:298)
> at org.eclipse.net4j.signal.RequestWithConfirmation.doExecute(RequestWithConfirmation.java:104)
> at org.eclipse.net4j.signal.RequestWithMonitoring.doExecute(RequestWithMonitoring.java:235)
> at org.eclipse.net4j.signal.SignalActor.execute(SignalActor.java:53)
> at org.eclipse.net4j.signal.Signal.runSync(Signal.java:253)
> at org.eclipse.net4j.signal.SignalProtocol.startSignal(SignalProtocol.java:442)
> at org.eclipse.net4j.signal.RequestWithConfirmation.doSend(RequestWithConfirmation.java:89)
> at org.eclipse.net4j.signal.RequestWithConfirmation.send(RequestWithConfirmation.java:75)
> at org.eclipse.net4j.signal.RequestWithMonitoring.send(RequestWithMonitoring.java:110)
> at org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientProtocol.send(CDOClientProtocol.java:518)
> at org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientProtocol.commitTransaction(CDOClientProtocol.java:393)
> at
> org.eclipse.emf.internal.cdo.session.DelegatingSessionProtocol.commitTransaction(DelegatingSessionProtocol.java:292)
> at
> org.eclipse.emf.internal.cdo.transaction.CDOSingleTransactionStrategyImpl.commit(CDOSingleTransactionStrategyImpl.java:72)
> at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commitSynced(CDOTransactionImpl.java:1219)
> at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commit(CDOTransactionImpl.java:1184)
> at org.eclipse.emf.cdo.internal.ui.editor.CDOEditor$22.run(CDOEditor.java:1845)
> at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
>
>
> Please also refer to my yesterday's post with the similar (exact?) problem in Texo and the answer from Ed Merks
> (http://www.eclipse.org/forums/index.php/t/628257/).
> Should I report it to the bugzilla?
>
> Cheers,
> Dominik
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
|
Re: [CDO][Xcore] Can't create resource on the base of Xcore defined model [message #1228235 is a reply to message #1227767] |
Mon, 06 January 2014 18:37 |
|
Am 05.01.2014 15:00, schrieb Ed Merks:
> I'm not sure of all the details but it sounds like he's trying to register a development time version of the model and
> that will in general contain references to other develop time models. How are those registered? Should
> org.eclipse.emf.cdo.internal.ui.editor.CDOEditor$22.run(CDOEditor.java:1845) be ensuring that all the referenced
> models in the workspace are transmitted at once?
I've fixed something in RegisterWorkspacePackagesAction:
424956: [UI] Problem with Xcore models in RegisterWorkspacePackagesAction
https://bugs.eclipse.org/bugs/show_bug.cgi?id=424956
But I have no Xcore to play with it. Dominik, can you report on that bug if it fixes the problem for you?
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
>
>
> On 04/01/2014 6:52 PM, Eike Stepper wrote:
>> Am 12.12.2013 11:00, schrieb Dominik Leszyk:
>>> Hi all,
>>>
>>> I've tried to create a new resource in the CDO repository using UI tooling. The workflow looks like this:
>>>
>>>
>>> Create model using Xcore (http://wiki.eclipse.org/Xcore)
>>> Convert it to Ecore (http://wiki.eclipse.org/Xcore#Converting_an_Xcore_Model_to_a_GenModel)
>>> Start CDO Server (use CDO Master Server Example)
>>> Open the session (using CDO Sessions view)
>>> Register Ecore file generated from Xcore in the repository (Package Registry in context menu)
>> With CDO it's not recommended to use models with nsURIs that only have a local meaning. Can't you generate that model
>> and deploy it to your clients?
>>
>> Cheers
>> /Eike
>>
>> ----
>> http://www.esc-net.de
>> http://thegordian.blogspot.com
>> http://twitter.com/eikestepper
>>
>>
>>> Start a new transaction for the opened session
>>> Create a new resource and add a new object on the base of model created from Xcore
>>> When trying to commit the change (ctrl+s in the editor) I got an exception:
>>>
>>>
>>>
>>> Package 'org.sample.help.profile' contains unresolved proxy
>>> 'platform:/resource/org.eclipse.emf.ecore/model/Ecore.ecore#//EString'
>>> java.lang.IllegalStateException: Package 'org.sample.help.profile' contains unresolved proxy
>>> 'platform:/resource/org.eclipse.emf.ecore/model/Ecore.ecore#//EString'
>>> at org.eclipse.emf.cdo.common.model.CDOModelUtil.checkCrossResourceURIs(CDOModelUtil.java:630)
>>> at org.eclipse.emf.cdo.common.model.CDOModelUtil.writePackage(CDOModelUtil.java:596)
>>> at org.eclipse.emf.cdo.internal.common.model.CDOPackageUnitImpl.write(CDOPackageUnitImpl.java:270)
>>> at org.eclipse.emf.cdo.spi.common.protocol.CDODataOutputImpl.writeCDOPackageUnit(CDODataOutputImpl.java:92)
>>> at
>>> org.eclipse.emf.cdo.internal.net4j.protocol.CommitTransactionRequest.requestingCommit(CommitTransactionRequest.java:159)
>>> at
>>> org.eclipse.emf.cdo.internal.net4j.protocol.CommitTransactionRequest.requesting(CommitTransactionRequest.java:128)
>>> at
>>> org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientRequestWithMonitoring.requesting(CDOClientRequestWithMonitoring.java:92)
>>> at org.eclipse.net4j.signal.RequestWithMonitoring.requesting(RequestWithMonitoring.java:165)
>>> at org.eclipse.net4j.signal.RequestWithConfirmation.doExtendedOutput(RequestWithConfirmation.java:119)
>>> at org.eclipse.net4j.signal.Signal.doOutput(Signal.java:298)
>>> at org.eclipse.net4j.signal.RequestWithConfirmation.doExecute(RequestWithConfirmation.java:104)
>>> at org.eclipse.net4j.signal.RequestWithMonitoring.doExecute(RequestWithMonitoring.java:235)
>>> at org.eclipse.net4j.signal.SignalActor.execute(SignalActor.java:53)
>>> at org.eclipse.net4j.signal.Signal.runSync(Signal.java:253)
>>> at org.eclipse.net4j.signal.SignalProtocol.startSignal(SignalProtocol.java:442)
>>> at org.eclipse.net4j.signal.RequestWithConfirmation.doSend(RequestWithConfirmation.java:89)
>>> at org.eclipse.net4j.signal.RequestWithConfirmation.send(RequestWithConfirmation.java:75)
>>> at org.eclipse.net4j.signal.RequestWithMonitoring.send(RequestWithMonitoring.java:110)
>>> at org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientProtocol.send(CDOClientProtocol.java:518)
>>> at org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientProtocol.commitTransaction(CDOClientProtocol.java:393)
>>> at
>>> org.eclipse.emf.internal.cdo.session.DelegatingSessionProtocol.commitTransaction(DelegatingSessionProtocol.java:292)
>>> at
>>> org.eclipse.emf.internal.cdo.transaction.CDOSingleTransactionStrategyImpl.commit(CDOSingleTransactionStrategyImpl.java:72)
>>> at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commitSynced(CDOTransactionImpl.java:1219)
>>> at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commit(CDOTransactionImpl.java:1184)
>>> at org.eclipse.emf.cdo.internal.ui.editor.CDOEditor$22.run(CDOEditor.java:1845)
>>> at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
>>>
>>>
>>> Please also refer to my yesterday's post with the similar (exact?) problem in Texo and the answer from Ed Merks
>>> (http://www.eclipse.org/forums/index.php/t/628257/).
>>> Should I report it to the bugzilla?
>>>
>>> Cheers,
>>> Dominik
>>
>
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
|
|
Re: [CDO][Xcore] Can't create resource on the base of Xcore defined model [message #1230892 is a reply to message #1229329] |
Mon, 13 January 2014 10:33 |
Paweł Doleciński Messages: 44 Registered: January 2014 |
Member |
|
|
Hi all,
I am playing with the same stuff right now.
Eike, I've checked your fix and it does not work.
One problem is with XCore itself that generated ecore has paths like: eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EString"
But anyway, let say, I created two standard ecore models: My.ecore and My1.ecore, with one class MyClass in 1st model and with one class My2Class in 2nd model, and has
My2Class extends MyClass. Then I opened a standalone CDOExplorer and tried to register model from filesystem. With the 1st one, of course, there was no problem.
With the 2nd one too, I could register it. But then I could not commit a instance of class from 2nd model.
Got this error:
URI of the resource (file:/C:/work/projects/demo/bundles/test/model/My.ecore) does not match the nsURI (test.com) of the top-level package;
this can be fixed by calling Resource.setURI(URI) after loading the packages,
or by configuring a URI mapping from nsURI's to location URI's before loading the packages,
and then loading them with their nsURI's
java.lang.IllegalStateException: URI of the resource (file:/C:/work/projects/demo/bundles/test/model/My.ecore) does not match the nsURI (test.com) of the top-level package;
this can be fixed by calling Resource.setURI(URI) after loading the packages,
or by configuring a URI mapping from nsURI's to location URI's before loading the packages,
and then loading them with their nsURI's
at org.eclipse.emf.cdo.common.model.CDOModelUtil.checkCrossResourceURIs(CDOModelUtil.java:712)
at org.eclipse.emf.cdo.common.model.CDOModelUtil.writePackage(CDOModelUtil.java:630)
at org.eclipse.emf.cdo.internal.common.model.CDOPackageUnitImpl.write(CDOPackageUnitImpl.java:270)
at org.eclipse.emf.cdo.spi.common.protocol.CDODataOutputImpl.writeCDOPackageUnit(CDODataOutputImpl.java:92)
at org.eclipse.emf.cdo.internal.net4j.protocol.CommitTransactionRequest.requestingCommit(CommitTransactionRequest.java:159)
at org.eclipse.emf.cdo.internal.net4j.protocol.CommitTransactionRequest.requesting(CommitTransactionRequest.java:128)
at org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientRequestWithMonitoring.requesting(CDOClientRequestWithMonitoring.java:92)
at org.eclipse.net4j.signal.RequestWithMonitoring.requesting(RequestWithMonitoring.java:165)
at org.eclipse.net4j.signal.RequestWithConfirmation.doExtendedOutput(RequestWithConfirmation.java:119)
at org.eclipse.net4j.signal.Signal.doOutput(Signal.java:301)
at org.eclipse.net4j.signal.RequestWithConfirmation.doExecute(RequestWithConfirmation.java:104)
at org.eclipse.net4j.signal.RequestWithMonitoring.doExecute(RequestWithMonitoring.java:235)
at org.eclipse.net4j.signal.SignalActor.execute(SignalActor.java:53)
at org.eclipse.net4j.signal.Signal.runSync(Signal.java:256)
at org.eclipse.net4j.signal.SignalProtocol.startSignal(SignalProtocol.java:442)
at org.eclipse.net4j.signal.RequestWithConfirmation.doSend(RequestWithConfirmation.java:89)
at org.eclipse.net4j.signal.RequestWithConfirmation.send(RequestWithConfirmation.java:75)
at org.eclipse.net4j.signal.RequestWithMonitoring.send(RequestWithMonitoring.java:110)
at org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientProtocol.send(CDOClientProtocol.java:538)
at org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientProtocol.commitTransaction(CDOClientProtocol.java:410)
at org.eclipse.emf.internal.cdo.session.DelegatingSessionProtocol.commitTransaction(DelegatingSessionProtocol.java:295)
at org.eclipse.emf.internal.cdo.transaction.CDOSingleTransactionStrategyImpl.commit(CDOSingleTransactionStrategyImpl.java:63)
at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commitSynced(CDOTransactionImpl.java:1237)
at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commit(CDOTransactionImpl.java:1206)
at org.eclipse.emf.cdo.internal.ui.editor.CDOEditor$22.run(CDOEditor.java:1909)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
I am not so sure if simply using EcorePlugin.computePlatformURIMap(true) will fix the problem.
|
|
|
|
Re: [CDO][Xcore] Can't create resource on the base of Xcore defined model [message #1231233 is a reply to message #1230925] |
Tue, 14 January 2014 05:45 |
Ed Merks Messages: 33218 Registered: July 2009 |
Senior Member |
|
|
Pawel,
This combination of my not knowing what these tools Eike has are doing
and Eike not being familiar with Xcore isn't helping address your
question, but it seems to me that this approach of trying to register
the development time artifacts is a bit odd. Normally one works with
instances created from the generated model and one registers that
model's nsURI with the CDO server (and it's irrelevant whether that
generated code was generated using Xcore or just a GenModel).
On 13/01/2014 12:36 PM, Paweł Doleciński wrote:
> I've got one additional question. The whole discussion is about
> registering packages.
> But what about creating new model in XCore and importing it as a
> resource. By this I mean creating new EClasses in resources without
> registering them. I know that ECore is a legacy model and so on, but
> still I've got such a case. When I import XCore resource to CDO I've
> got a lot of additional things, like Jvm Generic Type...
> I could generate ECore from XCore and then import ecore, but it means,
> again, problem with resolving. Any ideas?
>
> Cheers,
> Paweł.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.04832 seconds