Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] commit ends in NullPointerException
[CDO] commit ends in NullPointerException [message #431516] Tue, 14 July 2009 21:28 Go to next message
Eclipse UserFriend
Originally posted by: AM-81.web.de

This is a multi-part message in MIME format.
--------------060004000804030005040604
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit

Hi,
I have the following problem. For better understanding I made a little
test case and attached my projects for import. I work with the
downloaded package eclipse-modeling-galileo-incubation-win32.

Well, there are two simple ecore models. One has three classes c1,c2 and
c3, while c1 is superclass of c2 and every class has one attribute.
In the second model is only one class c4 which has c2 from the first
model as superclass.
Now I try to persist class c4 with an CDO server. I use the server as an
eclipse app and the standard config I found in the wiki, just change the
databaseName.
I open the CDO Session View, open a session, register the package from
the second model, open a transaction, create a resource, add a c4
object as a new root, fill something in the attributes and commit the
transaction.
Till now everything works without errors. Now the problem. If I change
the attribute a2 or a4 and try to commit, I get an protocol problem in
CDOSession with an NullPointerException:

java.lang.NullPointerException
org.eclipse.net4j.signal.RemoteException: java.lang.NullPointerException
at
org.eclipse.net4j.signal.RequestWithConfirmation.setRemoteEx ception(RequestWithConfirmation.java:128)
at
org.eclipse.net4j.signal.SignalProtocol.handleRemoteExceptio n(SignalProtocol.java:491)
at
org.eclipse.net4j.signal.RemoteExceptionIndication.indicatin g(RemoteExceptionIndication.java:53)
at org.eclipse.net4j.signal.Indication.doExtendedInput(Indicati on.java:55)
at org.eclipse.net4j.signal.Signal.doInput(Signal.java:312)
at org.eclipse.net4j.signal.Indication.execute(Indication.java: 49)
at org.eclipse.net4j.signal.Signal.runSync(Signal.java:239)
at org.eclipse.net4j.signal.Signal.run(Signal.java:147)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unkno wn Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at
org.eclipse.emf.ecore.util.FeatureMapUtil.isFeatureMap(Featu reMapUtil.java:150)
at
org.eclipse.emf.cdo.internal.common.revision.delta.CDOSingle ValueFeatureDeltaImpl. <init>(CDOSingleValueFeatureDeltaImpl.java:51)
at
org.eclipse.emf.cdo.internal.common.revision.delta.CDOSetFea tureDeltaImpl. <init>(CDOSetFeatureDeltaImpl.java:38)
at
org.eclipse.emf.cdo.internal.common.io.CDODataInputImpl.read CDOFeatureDelta(CDODataInputImpl.java:308)
at
org.eclipse.emf.cdo.internal.common.revision.delta.CDORevisi onDeltaImpl. <init>(CDORevisionDeltaImpl.java:109)
at
org.eclipse.emf.cdo.internal.common.io.CDODataInputImpl.read CDORevisionDelta(CDODataInputImpl.java:295)
at
org.eclipse.emf.cdo.internal.server.protocol.CommitTransacti onIndication.indicatingCommit(CommitTransactionIndication.ja va:301)
at
org.eclipse.emf.cdo.internal.server.protocol.CommitTransacti onIndication.indicating(CommitTransactionIndication.java:197 )
at
org.eclipse.emf.cdo.internal.server.protocol.CommitTransacti onIndication.indicating(CommitTransactionIndication.java:140 )
at
org.eclipse.net4j.signal.IndicationWithMonitoring.indicating (IndicationWithMonitoring.java:84)
at
org.eclipse.net4j.signal.IndicationWithResponse.doExtendedIn put(IndicationWithResponse.java:90)
at org.eclipse.net4j.signal.Signal.doInput(Signal.java:312)
at
org.eclipse.net4j.signal.IndicationWithResponse.execute(Indi cationWithResponse.java:63)
at
org.eclipse.net4j.signal.IndicationWithMonitoring.execute(In dicationWithMonitoring.java:63)
... 5 more

Changing attribute a1 and commit is no problem, but the others fails.
Now the other thing. When I close the session, open a new one and load
the resource which I stored before, there is class c4 in it, but has
only the attribute a4. Where are the others?

So, I hope someone can told me if it is my mistake or is it not possible
to persist such a data structure with CDO.



Many thanks,

Andr
Re: [CDO] commit ends in NullPointerException [message #431521 is a reply to message #431516] Wed, 15 July 2009 09:30 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6460
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------030806010404010004040306
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit

Andr


Re: [CDO] commit ends in NullPointerException [message #431656 is a reply to message #431521] Mon, 20 July 2009 23:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: AM-81.web.de

Hi Eike,

sorry for my late reply and thanks for your help.
Well it seems to work now. The JRE was not important but the thing
with the automatic registering. If I export my plugins to the dropins
folder everythings works.
Is there a reason why it doesn't work by manually registering them from
the workspace?


Regards,

André



Eike Stepper schrieb:
> André,
>
> I tried your example in both HEAD and R2_0_maintenance and it works
> without problems. I attached the client log from running the HEAD client.
>
> But I changed the following:
> 1) In your model plugins I used J2SE-1.5 instead of JavaSE-1.6
> 2) I used the automatic package registry (the default) instead of
> manually registering your models
>
> Can you try that, too?
>
> Cheers
> /Eike
>
> ----
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>
>
>
> André Müller schrieb:
>> Hi,
>> I have the following problem. For better understanding I made a little
>> test case and attached my projects for import. I work with the
>> downloaded package eclipse-modeling-galileo-incubation-win32.
>>
>> Well, there are two simple ecore models. One has three classes c1,c2
>> and c3, while c1 is superclass of c2 and every class has one attribute.
>> In the second model is only one class c4 which has c2 from the first
>> model as superclass.
>> Now I try to persist class c4 with an CDO server. I use the server as
>> an eclipse app and the standard config I found in the wiki, just
>> change the
>> databaseName.
>> I open the CDO Session View, open a session, register the package from
>> the second model, open a transaction, create a resource, add a c4
>> object as a new root, fill something in the attributes and commit the
>> transaction.
>> Till now everything works without errors. Now the problem. If I change
>> the attribute a2 or a4 and try to commit, I get an protocol problem in
>> CDOSession with an NullPointerException:
>>
>> java.lang.NullPointerException
>> org.eclipse.net4j.signal.RemoteException: java.lang.NullPointerException
>> at
>> org.eclipse.net4j.signal.RequestWithConfirmation.setRemoteEx ception(RequestWithConfirmation.java:128)
>>
>> at
>> org.eclipse.net4j.signal.SignalProtocol.handleRemoteExceptio n(SignalProtocol.java:491)
>>
>> at
>> org.eclipse.net4j.signal.RemoteExceptionIndication.indicatin g(RemoteExceptionIndication.java:53)
>>
>> at
>> org.eclipse.net4j.signal.Indication.doExtendedInput(Indicati on.java:55)
>> at org.eclipse.net4j.signal.Signal.doInput(Signal.java:312)
>> at org.eclipse.net4j.signal.Indication.execute(Indication.java: 49)
>> at org.eclipse.net4j.signal.Signal.runSync(Signal.java:239)
>> at org.eclipse.net4j.signal.Signal.run(Signal.java:147)
>> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unkno wn
>> Source)
>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>> at java.lang.Thread.run(Unknown Source)
>> Caused by: java.lang.NullPointerException
>> at
>> org.eclipse.emf.ecore.util.FeatureMapUtil.isFeatureMap(Featu reMapUtil.java:150)
>>
>> at
>> org.eclipse.emf.cdo.internal.common.revision.delta.CDOSingle ValueFeatureDeltaImpl. <init>(CDOSingleValueFeatureDeltaImpl.java:51)
>>
>> at
>> org.eclipse.emf.cdo.internal.common.revision.delta.CDOSetFea tureDeltaImpl. <init>(CDOSetFeatureDeltaImpl.java:38)
>>
>> at
>> org.eclipse.emf.cdo.internal.common.io.CDODataInputImpl.read CDOFeatureDelta(CDODataInputImpl.java:308)
>>
>> at
>> org.eclipse.emf.cdo.internal.common.revision.delta.CDORevisi onDeltaImpl. <init>(CDORevisionDeltaImpl.java:109)
>>
>> at
>> org.eclipse.emf.cdo.internal.common.io.CDODataInputImpl.read CDORevisionDelta(CDODataInputImpl.java:295)
>>
>> at
>> org.eclipse.emf.cdo.internal.server.protocol.CommitTransacti onIndication.indicatingCommit(CommitTransactionIndication.ja va:301)
>>
>> at
>> org.eclipse.emf.cdo.internal.server.protocol.CommitTransacti onIndication.indicating(CommitTransactionIndication.java:197 )
>>
>> at
>> org.eclipse.emf.cdo.internal.server.protocol.CommitTransacti onIndication.indicating(CommitTransactionIndication.java:140 )
>>
>> at
>> org.eclipse.net4j.signal.IndicationWithMonitoring.indicating (IndicationWithMonitoring.java:84)
>>
>> at
>> org.eclipse.net4j.signal.IndicationWithResponse.doExtendedIn put(IndicationWithResponse.java:90)
>>
>> at org.eclipse.net4j.signal.Signal.doInput(Signal.java:312)
>> at
>> org.eclipse.net4j.signal.IndicationWithResponse.execute(Indi cationWithResponse.java:63)
>>
>> at
>> org.eclipse.net4j.signal.IndicationWithMonitoring.execute(In dicationWithMonitoring.java:63)
>>
>> ... 5 more
>>
>> Changing attribute a1 and commit is no problem, but the others fails.
>> Now the other thing. When I close the session, open a new one and load
>> the resource which I stored before, there is class c4 in it, but has
>> only the attribute a4. Where are the others?
>>
>> So, I hope someone can told me if it is my mistake or is it not
>> possible to persist such a data structure with CDO.
>>
>>
>>
>> Many thanks,
>>
>> André
Re: [CDO] commit ends in NullPointerException [message #431657 is a reply to message #431656] Tue, 21 July 2009 04:34 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6460
Registered: July 2009
Senior Member
André Müller schrieb:
> Hi Eike,
>
> sorry for my late reply and thanks for your help.
> Well it seems to work now. The JRE was not important but the thing
> with the automatic registering. If I export my plugins to the dropins
> folder everythings works.
That's good ;-)

> Is there a reason why it doesn't work by manually registering them
> from the workspace?
Since it's a while back I can't remember all the details of what you've
done. What exactly do you mean by "manually registering them from the
workspace"? Does that mean you registered EPackages that were
dynamically loaded from the .ecore files in the workspace? Or does that
mean you included the plugin projects of the models into a launch
config, i.e. generated models from the host workspace?

Cheers
/Eike

----
http://thegordian.blogspot.com
http://twitter.com/eikestepper




>
>
> Regards,
>
> André
>
>
>
> Eike Stepper schrieb:
>> André,
>>
>> I tried your example in both HEAD and R2_0_maintenance and it works
>> without problems. I attached the client log from running the HEAD
>> client.
>>
>> But I changed the following:
>> 1) In your model plugins I used J2SE-1.5 instead of JavaSE-1.6
>> 2) I used the automatic package registry (the default) instead of
>> manually registering your models
>>
>> Can you try that, too?
>>
>> Cheers
>> /Eike
>>
>> ----
>> http://thegordian.blogspot.com
>> http://twitter.com/eikestepper
>>
>>
>>
>>
>> André Müller schrieb:
>>> Hi,
>>> I have the following problem. For better understanding I made a little
>>> test case and attached my projects for import. I work with the
>>> downloaded package eclipse-modeling-galileo-incubation-win32.
>>>
>>> Well, there are two simple ecore models. One has three classes c1,c2
>>> and c3, while c1 is superclass of c2 and every class has one attribute.
>>> In the second model is only one class c4 which has c2 from the first
>>> model as superclass.
>>> Now I try to persist class c4 with an CDO server. I use the server as
>>> an eclipse app and the standard config I found in the wiki, just
>>> change the
>>> databaseName.
>>> I open the CDO Session View, open a session, register the package from
>>> the second model, open a transaction, create a resource, add a c4
>>> object as a new root, fill something in the attributes and commit the
>>> transaction.
>>> Till now everything works without errors. Now the problem. If I change
>>> the attribute a2 or a4 and try to commit, I get an protocol problem in
>>> CDOSession with an NullPointerException:
>>>
>>> java.lang.NullPointerException
>>> org.eclipse.net4j.signal.RemoteException:
>>> java.lang.NullPointerException
>>> at
>>> org.eclipse.net4j.signal.RequestWithConfirmation.setRemoteEx ception(RequestWithConfirmation.java:128)
>>>
>>>
>>> at
>>> org.eclipse.net4j.signal.SignalProtocol.handleRemoteExceptio n(SignalProtocol.java:491)
>>>
>>>
>>> at
>>> org.eclipse.net4j.signal.RemoteExceptionIndication.indicatin g(RemoteExceptionIndication.java:53)
>>>
>>>
>>> at
>>> org.eclipse.net4j.signal.Indication.doExtendedInput(Indicati on.java:55)
>>> at org.eclipse.net4j.signal.Signal.doInput(Signal.java:312)
>>> at org.eclipse.net4j.signal.Indication.execute(Indication.java: 49)
>>> at org.eclipse.net4j.signal.Signal.runSync(Signal.java:239)
>>> at org.eclipse.net4j.signal.Signal.run(Signal.java:147)
>>> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unkno wn
>>> Source)
>>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
>>> Source)
>>> at java.lang.Thread.run(Unknown Source)
>>> Caused by: java.lang.NullPointerException
>>> at
>>> org.eclipse.emf.ecore.util.FeatureMapUtil.isFeatureMap(Featu reMapUtil.java:150)
>>>
>>>
>>> at
>>> org.eclipse.emf.cdo.internal.common.revision.delta.CDOSingle ValueFeatureDeltaImpl. <init>(CDOSingleValueFeatureDeltaImpl.java:51)
>>>
>>>
>>> at
>>> org.eclipse.emf.cdo.internal.common.revision.delta.CDOSetFea tureDeltaImpl. <init>(CDOSetFeatureDeltaImpl.java:38)
>>>
>>>
>>> at
>>> org.eclipse.emf.cdo.internal.common.io.CDODataInputImpl.read CDOFeatureDelta(CDODataInputImpl.java:308)
>>>
>>>
>>> at
>>> org.eclipse.emf.cdo.internal.common.revision.delta.CDORevisi onDeltaImpl. <init>(CDORevisionDeltaImpl.java:109)
>>>
>>>
>>> at
>>> org.eclipse.emf.cdo.internal.common.io.CDODataInputImpl.read CDORevisionDelta(CDODataInputImpl.java:295)
>>>
>>>
>>> at
>>> org.eclipse.emf.cdo.internal.server.protocol.CommitTransacti onIndication.indicatingCommit(CommitTransactionIndication.ja va:301)
>>>
>>>
>>> at
>>> org.eclipse.emf.cdo.internal.server.protocol.CommitTransacti onIndication.indicating(CommitTransactionIndication.java:197 )
>>>
>>>
>>> at
>>> org.eclipse.emf.cdo.internal.server.protocol.CommitTransacti onIndication.indicating(CommitTransactionIndication.java:140 )
>>>
>>>
>>> at
>>> org.eclipse.net4j.signal.IndicationWithMonitoring.indicating (IndicationWithMonitoring.java:84)
>>>
>>>
>>> at
>>> org.eclipse.net4j.signal.IndicationWithResponse.doExtendedIn put(IndicationWithResponse.java:90)
>>>
>>>
>>> at org.eclipse.net4j.signal.Signal.doInput(Signal.java:312)
>>> at
>>> org.eclipse.net4j.signal.IndicationWithResponse.execute(Indi cationWithResponse.java:63)
>>>
>>>
>>> at
>>> org.eclipse.net4j.signal.IndicationWithMonitoring.execute(In dicationWithMonitoring.java:63)
>>>
>>>
>>> ... 5 more
>>>
>>> Changing attribute a1 and commit is no problem, but the others fails.
>>> Now the other thing. When I close the session, open a new one and load
>>> the resource which I stored before, there is class c4 in it, but has
>>> only the attribute a4. Where are the others?
>>>
>>> So, I hope someone can told me if it is my mistake or is it not
>>> possible to persist such a data structure with CDO.
>>>
>>>
>>>
>>> Many thanks,
>>>
>>> André


Re: [CDO] commit ends in NullPointerException [message #431695 is a reply to message #431657] Tue, 21 July 2009 23:25 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: AM-81.web.de

Eike Stepper schrieb:
> André Müller schrieb:
>> Hi Eike,
>>
>> sorry for my late reply and thanks for your help.
>> Well it seems to work now. The JRE was not important but the thing
>> with the automatic registering. If I export my plugins to the dropins
>> folder everythings works.
> That's good ;-)
>
>> Is there a reason why it doesn't work by manually registering them
>> from the workspace?
> Since it's a while back I can't remember all the details of what you've
> done. What exactly do you mean by "manually registering them from the
> workspace"? Does that mean you registered EPackages that were
> dynamically loaded from the .ecore files in the workspace? Or does that
> mean you included the plugin projects of the models into a launch
> config, i.e. generated models from the host workspace?

Well, I'm not really sure if thats what I do, but I think I register
EPackages that were dynamically loaded from the .ecore files.
(I create the ecore model, generate the model code and open a Session in
the CDO UI and register the packages over the "Register Workspace
Packages..." item in the context menu of Session.)


Regards,

André

>
> Cheers
> /Eike
>
> ----
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>
>
>
>>
>> Regards,
>>
>> André
>>
>>
>>
>> Eike Stepper schrieb:
>>> André,
>>>
>>> I tried your example in both HEAD and R2_0_maintenance and it works
>>> without problems. I attached the client log from running the HEAD
>>> client.
>>>
>>> But I changed the following:
>>> 1) In your model plugins I used J2SE-1.5 instead of JavaSE-1.6
>>> 2) I used the automatic package registry (the default) instead of
>>> manually registering your models
>>>
>>> Can you try that, too?
>>>
>>> Cheers
>>> /Eike
>>>
>>> ----
>>> http://thegordian.blogspot.com
>>> http://twitter.com/eikestepper
>>>
>>>
>>>
>>>
>>> André Müller schrieb:
>>>> Hi,
>>>> I have the following problem. For better understanding I made a little
>>>> test case and attached my projects for import. I work with the
>>>> downloaded package eclipse-modeling-galileo-incubation-win32.
>>>>
>>>> Well, there are two simple ecore models. One has three classes c1,c2
>>>> and c3, while c1 is superclass of c2 and every class has one attribute.
>>>> In the second model is only one class c4 which has c2 from the first
>>>> model as superclass.
>>>> Now I try to persist class c4 with an CDO server. I use the server as
>>>> an eclipse app and the standard config I found in the wiki, just
>>>> change the
>>>> databaseName.
>>>> I open the CDO Session View, open a session, register the package from
>>>> the second model, open a transaction, create a resource, add a c4
>>>> object as a new root, fill something in the attributes and commit the
>>>> transaction.
>>>> Till now everything works without errors. Now the problem. If I change
>>>> the attribute a2 or a4 and try to commit, I get an protocol problem in
>>>> CDOSession with an NullPointerException:
>>>>
>>>> java.lang.NullPointerException
>>>> org.eclipse.net4j.signal.RemoteException:
>>>> java.lang.NullPointerException
>>>> at
>>>> org.eclipse.net4j.signal.RequestWithConfirmation.setRemoteEx ception(RequestWithConfirmation.java:128)
>>>>
>>>>
>>>> at
>>>> org.eclipse.net4j.signal.SignalProtocol.handleRemoteExceptio n(SignalProtocol.java:491)
>>>>
>>>>
>>>> at
>>>> org.eclipse.net4j.signal.RemoteExceptionIndication.indicatin g(RemoteExceptionIndication.java:53)
>>>>
>>>>
>>>> at
>>>> org.eclipse.net4j.signal.Indication.doExtendedInput(Indicati on.java:55)
>>>> at org.eclipse.net4j.signal.Signal.doInput(Signal.java:312)
>>>> at org.eclipse.net4j.signal.Indication.execute(Indication.java: 49)
>>>> at org.eclipse.net4j.signal.Signal.runSync(Signal.java:239)
>>>> at org.eclipse.net4j.signal.Signal.run(Signal.java:147)
>>>> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unkno wn
>>>> Source)
>>>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
>>>> Source)
>>>> at java.lang.Thread.run(Unknown Source)
>>>> Caused by: java.lang.NullPointerException
>>>> at
>>>> org.eclipse.emf.ecore.util.FeatureMapUtil.isFeatureMap(Featu reMapUtil.java:150)
>>>>
>>>>
>>>> at
>>>> org.eclipse.emf.cdo.internal.common.revision.delta.CDOSingle ValueFeatureDeltaImpl. <init>(CDOSingleValueFeatureDeltaImpl.java:51)
>>>>
>>>>
>>>> at
>>>> org.eclipse.emf.cdo.internal.common.revision.delta.CDOSetFea tureDeltaImpl. <init>(CDOSetFeatureDeltaImpl.java:38)
>>>>
>>>>
>>>> at
>>>> org.eclipse.emf.cdo.internal.common.io.CDODataInputImpl.read CDOFeatureDelta(CDODataInputImpl.java:308)
>>>>
>>>>
>>>> at
>>>> org.eclipse.emf.cdo.internal.common.revision.delta.CDORevisi onDeltaImpl. <init>(CDORevisionDeltaImpl.java:109)
>>>>
>>>>
>>>> at
>>>> org.eclipse.emf.cdo.internal.common.io.CDODataInputImpl.read CDORevisionDelta(CDODataInputImpl.java:295)
>>>>
>>>>
>>>> at
>>>> org.eclipse.emf.cdo.internal.server.protocol.CommitTransacti onIndication.indicatingCommit(CommitTransactionIndication.ja va:301)
>>>>
>>>>
>>>> at
>>>> org.eclipse.emf.cdo.internal.server.protocol.CommitTransacti onIndication.indicating(CommitTransactionIndication.java:197 )
>>>>
>>>>
>>>> at
>>>> org.eclipse.emf.cdo.internal.server.protocol.CommitTransacti onIndication.indicating(CommitTransactionIndication.java:140 )
>>>>
>>>>
>>>> at
>>>> org.eclipse.net4j.signal.IndicationWithMonitoring.indicating (IndicationWithMonitoring.java:84)
>>>>
>>>>
>>>> at
>>>> org.eclipse.net4j.signal.IndicationWithResponse.doExtendedIn put(IndicationWithResponse.java:90)
>>>>
>>>>
>>>> at org.eclipse.net4j.signal.Signal.doInput(Signal.java:312)
>>>> at
>>>> org.eclipse.net4j.signal.IndicationWithResponse.execute(Indi cationWithResponse.java:63)
>>>>
>>>>
>>>> at
>>>> org.eclipse.net4j.signal.IndicationWithMonitoring.execute(In dicationWithMonitoring.java:63)
>>>>
>>>>
>>>> ... 5 more
>>>>
>>>> Changing attribute a1 and commit is no problem, but the others fails.
>>>> Now the other thing. When I close the session, open a new one and load
>>>> the resource which I stored before, there is class c4 in it, but has
>>>> only the attribute a4. Where are the others?
>>>>
>>>> So, I hope someone can told me if it is my mistake or is it not
>>>> possible to persist such a data structure with CDO.
>>>>
>>>>
>>>>
>>>> Many thanks,
>>>>
>>>> André
Re: [CDO] commit ends in NullPointerException [message #431696 is a reply to message #431695] Wed, 22 July 2009 04:09 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6460
Registered: July 2009
Senior Member
André Müller schrieb:
> [...]
>
> Well, I'm not really sure if thats what I do, but I think I register
> EPackages that were dynamically loaded from the .ecore files.
> (I create the ecore model, generate the model code and open a Session
> in the CDO UI and register the packages over the "Register Workspace
> Packages..." item in the context menu of Session.)
I need to better understand your deployment scenario. Is the CDO UI
deployed into your host IDE or are you launching a runtime workbench
from there (or an RCP app)?

The point is that if you generate Java code from an Ecore model this
Java code usually must be deployed to a runnable Eclipse instance. That
is what happens when you launch a runtime workbench. By deploying the
generated model plugins the generated packages automatically get
registered with the global package registry of EMF.

When you open a CDOSession through the CDO UI (in your runtime
workbench!) there's an option "Automatic Package Registry" which is on
by default. That means that the package registry of that new CDOSession
will be (unidirectionally) synchronized with the EMF global package
registry, which already knows your packages. In short: If you do
everything right all your models should automagically end up being
accessible from your CDOSession.

Please let me know if anything in this description does not match your
setup ;-)

Cheers
/Eike

----
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Previous Topic:[TENEO]Store Resource problem
Next Topic:[Net4j]HeartBeatProtocol can't be used
Goto Forum:
  


Current Time: Sun Dec 15 02:06:03 GMT 2019

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

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

Back to the top