Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] newbie - NPE when saving.
[CDO] newbie - NPE when saving. [message #533960] Mon, 17 May 2010 14:38 Go to next message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
Hi there,

I am starting with CDO, it's really nice to connect to the server, and
create some objects etc...

Regarding my own package, I follow the instructions, my package is
CDO'ed, but it doesn't show up in the "Register generated package.."
context menu from the session. Shou;d this be the case?

So, I add my package from workspace, and I can indeed add my packages.
and they show up in the Package Registry as "DYNAMIC" with status "NEW"

Next I create a resource and a root object. (For the resource name I
leave it to /res1). When I save, I get the error below.


Any idea, what could be wrong here?
Thanks, Christophe Bouhier


*****************************


Thread-7 [debug.protocol] Reading 1 new objects
[ERROR] NullPointerException
java.lang.NullPointerException
at
org.eclipse.emf.cdo.common.model.CDOModelUtil.isCorePackage( CDOModelUtil.java:127)
at
org.eclipse.emf.cdo.common.model.CDOModelUtil.getType(CDOMod elUtil.java:213)
at
org.eclipse.emf.cdo.common.model.CDOModelUtil.getType(CDOMod elUtil.java:190)
at
org.eclipse.emf.cdo.internal.common.io.CDODataInputImpl.read CDOFeatureValue(CDODataInputImpl.java:281)
at
org.eclipse.emf.cdo.spi.common.revision.AbstractCDORevision. readValues(AbstractCDORevision.java:624)
at
org.eclipse.emf.cdo.spi.common.revision.AbstractCDORevision. <init>(AbstractCDORevision.java:138)
at
org.eclipse.emf.cdo.internal.common.revision.CDORevisionImpl . <init>(CDORevisionImpl.java:44)
at
org.eclipse.emf.cdo.internal.common.io.CDODataInputImpl.read CDORevision(CDODataInputImpl.java:217)
at
org.eclipse.emf.cdo.internal.server.protocol.CommitTransacti onIndication.indicatingCommit(CommitTransactionIndication.ja va:289)
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)
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(Threa dPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo lExecutor.java:908)
at java.lang.Thread.run(Thread.java:637)
Re: [CDO] newbie - NPE when saving. [message #533961 is a reply to message #533960] Mon, 17 May 2010 14:55 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Hi Christophe,

There seem to be two separate issues. Regarding usage of your generated
package, are you sure that you included the generated model plugin and
eventually the generated edit plugin in your launch
configuration/deployment?

Regarding the NPE, I could not find out which version of CDO you're
using because your stack trace does neither match the HEAD of CDO 3.0
nor CDO 2.0. Is it possible that you try that again with the latest
sources via http://wiki.eclipse.org/CDO_Source_Installation ?

BTW. in CDO 3.0 there's no need anymore to register generated packages
in advance.

Cheers
/Eike

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



Am 17.05.2010 16:38, schrieb Christophe Bouhier:
> Hi there,
>
> I am starting with CDO, it's really nice to connect to the server, and
> create some objects etc...
>
> Regarding my own package, I follow the instructions, my package is
> CDO'ed, but it doesn't show up in the "Register generated package.."
> context menu from the session. Shou;d this be the case?
>
> So, I add my package from workspace, and I can indeed add my packages.
> and they show up in the Package Registry as "DYNAMIC" with status "NEW"
>
> Next I create a resource and a root object. (For the resource name I
> leave it to /res1). When I save, I get the error below.
>
>
> Any idea, what could be wrong here?
> Thanks, Christophe Bouhier
>
>
> *****************************
>
>
> Thread-7 [debug.protocol] Reading 1 new objects
> [ERROR] NullPointerException
> java.lang.NullPointerException
> at
> org.eclipse.emf.cdo.common.model.CDOModelUtil.isCorePackage( CDOModelUtil.java:127)
>
> at
> org.eclipse.emf.cdo.common.model.CDOModelUtil.getType(CDOMod elUtil.java:213)
>
> at
> org.eclipse.emf.cdo.common.model.CDOModelUtil.getType(CDOMod elUtil.java:190)
>
> at
> org.eclipse.emf.cdo.internal.common.io.CDODataInputImpl.read CDOFeatureValue(CDODataInputImpl.java:281)
>
> at
> org.eclipse.emf.cdo.spi.common.revision.AbstractCDORevision. readValues(AbstractCDORevision.java:624)
>
> at
> org.eclipse.emf.cdo.spi.common.revision.AbstractCDORevision. <init>(AbstractCDORevision.java:138)
>
> at
> org.eclipse.emf.cdo.internal.common.revision.CDORevisionImpl . <init>(CDORevisionImpl.java:44)
>
> at
> org.eclipse.emf.cdo.internal.common.io.CDODataInputImpl.read CDORevision(CDODataInputImpl.java:217)
>
> at
> org.eclipse.emf.cdo.internal.server.protocol.CommitTransacti onIndication.indicatingCommit(CommitTransactionIndication.ja va:289)
>
> 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)
>
> 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(Threa dPoolExecutor.java:886)
>
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo lExecutor.java:908)
>
> at java.lang.Thread.run(Thread.java:637)


Re: [CDO] newbie - NPE when saving. [message #533983 is a reply to message #533961] Mon, 17 May 2010 15:19 Go to previous messageGo to next message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
Hi Eike,

Thanks for the swift response.

- Ah, I need to include my plugins ...right makes sense. I did it and
now but still I don't see them as generated?

- The version, I am using is packaged with Galileo Modeling distro, the
plugin versions start with 2.0.0: so this is the version I guess..

I could try with 3.0, which seems rather cumbersome to install (in the
install instruction). Would 3.0 also work with a Galileo distro ? (EMF
2.5).

Also worth to mention, is that my models, are annotated with OCL for
generation of derived features etc... (I know it won't work on an CDO
repo, but still the annotations are in the ecore models).

rgds Christophe



Eike Stepper wrote:
> Hi Christophe,
>
> There seem to be two separate issues. Regarding usage of your generated
> package, are you sure that you included the generated model plugin and
> eventually the generated edit plugin in your launch
> configuration/deployment?
>
> Regarding the NPE, I could not find out which version of CDO you're
> using because your stack trace does neither match the HEAD of CDO 3.0
> nor CDO 2.0. Is it possible that you try that again with the latest
> sources via http://wiki.eclipse.org/CDO_Source_Installation ?
>
> BTW. in CDO 3.0 there's no need anymore to register generated packages
> in advance.
>
> Cheers
> /Eike
>
> ----
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>
>
> Am 17.05.2010 16:38, schrieb Christophe Bouhier:
>> Hi there,
>>
>> I am starting with CDO, it's really nice to connect to the server, and
>> create some objects etc...
>>
>> Regarding my own package, I follow the instructions, my package is
>> CDO'ed, but it doesn't show up in the "Register generated package.."
>> context menu from the session. Shou;d this be the case?
>>
>> So, I add my package from workspace, and I can indeed add my packages.
>> and they show up in the Package Registry as "DYNAMIC" with status "NEW"
>>
>> Next I create a resource and a root object. (For the resource name I
>> leave it to /res1). When I save, I get the error below.
>>
>>
>> Any idea, what could be wrong here?
>> Thanks, Christophe Bouhier
>>
>>
>> *****************************
>>
>>
>> Thread-7 [debug.protocol] Reading 1 new objects
>> [ERROR] NullPointerException
>> java.lang.NullPointerException
>> at
>> org.eclipse.emf.cdo.common.model.CDOModelUtil.isCorePackage( CDOModelUtil.java:127)
>>
>> at
>> org.eclipse.emf.cdo.common.model.CDOModelUtil.getType(CDOMod elUtil.java:213)
>>
>> at
>> org.eclipse.emf.cdo.common.model.CDOModelUtil.getType(CDOMod elUtil.java:190)
>>
>> at
>> org.eclipse.emf.cdo.internal.common.io.CDODataInputImpl.read CDOFeatureValue(CDODataInputImpl.java:281)
>>
>> at
>> org.eclipse.emf.cdo.spi.common.revision.AbstractCDORevision. readValues(AbstractCDORevision.java:624)
>>
>> at
>> org.eclipse.emf.cdo.spi.common.revision.AbstractCDORevision. <init>(AbstractCDORevision.java:138)
>>
>> at
>> org.eclipse.emf.cdo.internal.common.revision.CDORevisionImpl . <init>(CDORevisionImpl.java:44)
>>
>> at
>> org.eclipse.emf.cdo.internal.common.io.CDODataInputImpl.read CDORevision(CDODataInputImpl.java:217)
>>
>> at
>> org.eclipse.emf.cdo.internal.server.protocol.CommitTransacti onIndication.indicatingCommit(CommitTransactionIndication.ja va:289)
>>
>> 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)
>>
>> 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(Threa dPoolExecutor.java:886)
>>
>> at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo lExecutor.java:908)
>>
>> at java.lang.Thread.run(Thread.java:637)
Re: [CDO] newbie - NPE when saving. [message #534135 is a reply to message #533983] Tue, 18 May 2010 08:06 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 17.05.2010 17:19, schrieb Christophe Bouhier:
> Hi Eike,
>
> Thanks for the swift response.
>
> - Ah, I need to include my plugins ...right makes sense. I did it and
> now but still I don't see them as generated?
Where exactly are you looking and hoping to see them?

>
> - The version, I am using is packaged with Galileo Modeling distro,
> the plugin versions start with 2.0.0: so this is the version I guess..
You should also try to update the binary 2.0 plugins from
https://build.eclipse.org/hudson/job/emf-cdo-maintenance/las tSuccessfulBuild/artifact/result/site.p2/
to get the latest changes. Does that help?

>
> I could try with 3.0, which seems rather cumbersome to install (in the
> install instruction).
It is not :P But instead of setting up a complete source workspace for
CDO you can also try to install from
https://build.eclipse.org/hudson/job/emf-cdo-integration/las tSuccessfulBuild/artifact/result/site.p2/
to get the latest 3.0 changes in binary form.

> Would 3.0 also work with a Galileo distro ? (EMF 2.5).
Users have reported that, but it's not officially supported in the
newsgroup. Some (minor) functionality like legacy mode would probably
not work because of needed changes in EMF Core 2.6.

>
> Also worth to mention, is that my models, are annotated with OCL for
> generation of derived features etc... (I know it won't work on an CDO
> repo, but still the annotations are in the ecore models).
The annotations should not harm, but your derived features should be
also declared as transient to prevent them from being persisted in the
CDO repo.

Cheers
/Eike

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


>
> rgds Christophe
>
>
>
> Eike Stepper wrote:
>> Hi Christophe,
>>
>> There seem to be two separate issues. Regarding usage of your
>> generated package, are you sure that you included the generated model
>> plugin and eventually the generated edit plugin in your launch
>> configuration/deployment?
>>
>> Regarding the NPE, I could not find out which version of CDO you're
>> using because your stack trace does neither match the HEAD of CDO 3.0
>> nor CDO 2.0. Is it possible that you try that again with the latest
>> sources via http://wiki.eclipse.org/CDO_Source_Installation ?
>>
>> BTW. in CDO 3.0 there's no need anymore to register generated
>> packages in advance.
>>
>> Cheers
>> /Eike
>>
>> ----
>> http://thegordian.blogspot.com
>> http://twitter.com/eikestepper
>>
>>
>>
>> Am 17.05.2010 16:38, schrieb Christophe Bouhier:
>>> Hi there,
>>>
>>> I am starting with CDO, it's really nice to connect to the server,
>>> and create some objects etc...
>>>
>>> Regarding my own package, I follow the instructions, my package is
>>> CDO'ed, but it doesn't show up in the "Register generated package.."
>>> context menu from the session. Shou;d this be the case?
>>>
>>> So, I add my package from workspace, and I can indeed add my packages.
>>> and they show up in the Package Registry as "DYNAMIC" with status "NEW"
>>>
>>> Next I create a resource and a root object. (For the resource name I
>>> leave it to /res1). When I save, I get the error below.
>>>
>>>
>>> Any idea, what could be wrong here?
>>> Thanks, Christophe Bouhier
>>>
>>>
>>> *****************************
>>>
>>>
>>> Thread-7 [debug.protocol] Reading 1 new objects
>>> [ERROR] NullPointerException
>>> java.lang.NullPointerException
>>> at
>>> org.eclipse.emf.cdo.common.model.CDOModelUtil.isCorePackage( CDOModelUtil.java:127)
>>>
>>> at
>>> org.eclipse.emf.cdo.common.model.CDOModelUtil.getType(CDOMod elUtil.java:213)
>>>
>>> at
>>> org.eclipse.emf.cdo.common.model.CDOModelUtil.getType(CDOMod elUtil.java:190)
>>>
>>> at
>>> org.eclipse.emf.cdo.internal.common.io.CDODataInputImpl.read CDOFeatureValue(CDODataInputImpl.java:281)
>>>
>>> at
>>> org.eclipse.emf.cdo.spi.common.revision.AbstractCDORevision. readValues(AbstractCDORevision.java:624)
>>>
>>> at
>>> org.eclipse.emf.cdo.spi.common.revision.AbstractCDORevision. <init>(AbstractCDORevision.java:138)
>>>
>>> at
>>> org.eclipse.emf.cdo.internal.common.revision.CDORevisionImpl . <init>(CDORevisionImpl.java:44)
>>>
>>> at
>>> org.eclipse.emf.cdo.internal.common.io.CDODataInputImpl.read CDORevision(CDODataInputImpl.java:217)
>>>
>>> at
>>> org.eclipse.emf.cdo.internal.server.protocol.CommitTransacti onIndication.indicatingCommit(CommitTransactionIndication.ja va:289)
>>>
>>> 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)
>>>
>>> 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(Threa dPoolExecutor.java:886)
>>>
>>> at
>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo lExecutor.java:908)
>>>
>>> at java.lang.Thread.run(Thread.java:637)


Previous Topic:How to find Helios M7 in CVS
Next Topic:inherit Ecore.ecore in my ecore file
Goto Forum:
  


Current Time: Fri Apr 26 17:27:24 GMT 2024

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

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

Back to the top