Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » NPE - In EMF 2.5 it works fine, because setting delegates are adding newly in EMP2.6
NPE - In EMF 2.5 it works fine, because setting delegates are adding newly in EMP2.6 [message #553567] Wed, 18 August 2010 04:20 Go to next message
Naag is currently offline NaagFriend
Messages: 19
Registered: July 2009
Junior Member
Hi ALL,

i am currently facing the below issue. It would be really helpful if some one can solve me issue.

With EMF 2.6 i am facing following NPE while setting feature, can someone explain why this will happens and how to solve it as well.
Note:- In EMF 2.5 it works fine, because setting delegates are adding newly in EMP2.6

java.lang.NullPointerException
at org.eclipse.emf.ecore.util.EcoreUtil.getSettingDelegates(Eco reUtil.java:4163)
at org.eclipse.emf.ecore.util.EcoreUtil.getSettingDelegateFacto ry(EcoreUtil.java:4220)
at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl.getSetting Delegate(EStructuralFeatureImpl.java:842)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSettingDelegate (BasicEObjectImpl.java:1571)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDynamicSet(Basi cEObjectImpl.java:1137)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjec tImpl.java:1111)
at com.nokia.tools.editing.model.impl.EditObjectImpl.eSet(EditO bjectImpl.java:264)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjec tImpl.java:1081)


Regards
NAAG
Re: NPE - In EMF 2.5 it works fine, because setting delegates are adding newly in EMP2.6 [message #553578 is a reply to message #553567] Wed, 18 August 2010 05:39 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
HI NAAG

It looks as if you are invoking eSet for a dynamic feature on your
EClass before you define the EPackage container of that EClass.

The problem should go away if you associate the EClass with an EPackage
before you use dynamic functionality.

Are you sure that you have re-invoked genmodel consistently on all your
models?

The NPE looks like an unhelpful but useful diagnosis that your
code/build is broken. The NPE at 4220 of EcoreUtil could be 'fixed' but
then other problems might just get a strange nothing-happens behaviour.

Regards

Ed Willink


On 18/08/2010 05:22, Naag wrote:
> Hi ALL,
>
> i am currently facing the below issue. It would be really helpful if
> some one can solve me issue.
>
> With EMF 2.6 i am facing following NPE while setting feature, can
> someone explain why this will happens and how to solve it as well.
> Note:- In EMF 2.5 it works fine, because setting delegates are adding
> newly in EMP2.6
>
> java.lang.NullPointerException
> at org.eclipse.emf.ecore.util.EcoreUtil.getSettingDelegates(Eco
> reUtil.java:4163)
> at org.eclipse.emf.ecore.util.EcoreUtil.getSettingDelegateFacto
> ry(EcoreUtil.java:4220)
> at org.eclipse.emf.ecore.impl.EStructuralFeatureImpl.getSetting
> Delegate(EStructuralFeatureImpl.java:842)
> at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSettingDelegate
> (BasicEObjectImpl.java:1571)
> at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDynamicSet(Basi
> cEObjectImpl.java:1137)
> at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjec
> tImpl.java:1111)
> at com.nokia.tools.editing.model.impl.EditObjectImpl.eSet(EditO
> bjectImpl.java:264)
> at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjec
> tImpl.java:1081)
>
>
> Regards
> NAAG
Previous Topic:Multiple Inheritance - Some mix-ins not created?
Next Topic:EMF Query: Searching on custom type
Goto Forum:
  


Current Time: Thu Apr 25 22:41:01 GMT 2024

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

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

Back to the top