Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » NoSuchMethodError in org.eclipse.emf.ecore.EPackage$Registry.getEFactory
NoSuchMethodError in org.eclipse.emf.ecore.EPackage$Registry.getEFactory [message #430378] Tue, 19 May 2009 09:44 Go to next message
Anne Robert is currently offline Anne RobertFriend
Messages: 14
Registered: July 2009
Junior Member
Hi,

I have a application using an Ecore model. I have developped it with
eclipse 3.2 and EMF 2.2.
When I try to move to eclipse 3.4 with EMF 2.4.2 (version 2009021), I have
successfully regenerated the genmodel, and the model code. But during the
execution, when I create the objects using
ModulesFactory.eINSTANCE.createSystem(),
i have the following error:
Exception in thread "main" java.lang.NoSuchMethodError:
org.eclipse.emf.ecore.EPackage$Registry.getEFactory(Ljava/la ng/String;)Lorg/eclipse/emf/ecore/EFactory;
at
ujf.verimag.bip.Core.Modules.impl.ModulesFactoryImpl.init(Mo dulesFactoryImpl.java:36)
at
ujf.verimag.bip.Core.Modules.ModulesFactory.<clinit>(ModulesFactory.java:26)
...

What may be bad in my code?

Regards,
Anne Robert.
Re: NoSuchMethodError in org.eclipse.emf.ecore.EPackage$Registry.getEFactory [message #430413 is a reply to message #430378] Wed, 20 May 2009 10:14 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
Anne,

It sounds like you've developed with 3.4 but are still trying to run it
on 2.2.


Anne Robert wrote:
> Hi,
>
> I have a application using an Ecore model. I have developped it with
> eclipse 3.2 and EMF 2.2.
> When I try to move to eclipse 3.4 with EMF 2.4.2 (version 2009021), I
> have successfully regenerated the genmodel, and the model code. But
> during the execution, when I create the objects using
> ModulesFactory.eINSTANCE.createSystem(),
> i have the following error:
> Exception in thread "main" java.lang.NoSuchMethodError:
> org.eclipse.emf.ecore.EPackage$Registry.getEFactory(Ljava/la ng/String;)Lorg/eclipse/emf/ecore/EFactory;
>
> at
> ujf.verimag.bip.Core.Modules.impl.ModulesFactoryImpl.init(Mo dulesFactoryImpl.java:36)
>
> at
> ujf.verimag.bip.Core.Modules.ModulesFactory.<clinit>(ModulesFactory.java:26)
>
> ..
>
> What may be bad in my code?
>
> Regards,
> Anne Robert.
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: NoSuchMethodError in org.eclipse.emf.ecore.EPackage$Registry.getEFactory [message #430424 is a reply to message #430413] Wed, 20 May 2009 11:41 Go to previous messageGo to next message
Anne Robert is currently offline Anne RobertFriend
Messages: 14
Registered: July 2009
Junior Member
Hi,
Thank you for your response.

I have never imported EMF 2.1 in eclipse 3.4. But unfortunatly, it seem
that eclipse 3.4 read the eclipse 3.2 extension location.
if the configuration detail, I have:

/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.classpat hVariable.EMF_CODEGEN_ECORE=/usr/local/src/cadp/eclipse/plug ins/org.eclipse.emf.codegen.ecore_2.1.0.jar

(/usr/local/src/cadp/eclipse was the eclipse 3.2 extension location)

How can I remove this extension location from eclipse 3.4 configuration?

Thanks,
Anne.
Re: NoSuchMethodError in org.eclipse.emf.ecore.EPackage$Registry.getEFactory [message #430426 is a reply to message #430424] Wed, 20 May 2009 13:03 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
Anne,

Java->Build Path->Classpath Variables in the preferences dialog.

Anne Robert wrote:
> Hi,
> Thank you for your response.
>
> I have never imported EMF 2.1 in eclipse 3.4. But unfortunatly, it
> seem that eclipse 3.4 read the eclipse 3.2 extension location.
> if the configuration detail, I have:
>
> /instance/org.eclipse.jdt.core/org.eclipse.jdt.core.classpat hVariable.EMF_CODEGEN_ECORE=/usr/local/src/cadp/eclipse/plug ins/org.eclipse.emf.codegen.ecore_2.1.0.jar
>
>
> (/usr/local/src/cadp/eclipse was the eclipse 3.2 extension location)
>
> How can I remove this extension location from eclipse 3.4 configuration?
>
> Thanks,
> Anne.
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: NoSuchMethodError in org.eclipse.emf.ecore.EPackage$Registry.getEFactory [message #430469 is a reply to message #430426] Fri, 22 May 2009 12:45 Go to previous messageGo to next message
Anne Robert is currently offline Anne RobertFriend
Messages: 14
Registered: July 2009
Junior Member
Thank you very much.

After this, I think I have no more link to EMF 2.1
I have rebuild another workspace from scratch to be sure. The EMF
generation have changed (not same name for enumeration constants) but I
still have the same error at runtime.

I continue to look after any other problem.

Regards,
Anne.
Re: NoSuchMethodError in org.eclipse.emf.ecore.EPackage$Registry.getEFactory [message #430470 is a reply to message #430469] Fri, 22 May 2009 13:03 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
Anne,

So clearly you are running with an older runtime. Look carefully at
what runtime your launch configuration is using.


Anne Robert wrote:
> Thank you very much.
>
> After this, I think I have no more link to EMF 2.1
> I have rebuild another workspace from scratch to be sure. The EMF
> generation have changed (not same name for enumeration constants) but
> I still have the same error at runtime.
>
> I continue to look after any other problem.
>
> Regards,
> Anne.
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: NoSuchMethodError in org.eclipse.emf.ecore.EPackage$Registry.getEFactory [message #430471 is a reply to message #430470] Fri, 22 May 2009 14:58 Go to previous message
Anne Robert is currently offline Anne RobertFriend
Messages: 14
Registered: July 2009
Junior Member
OK, it is now resolved.
The last EMF link was in the properties of my main java project.
I have changed it to new EMF and it works correctly.

Thank you for your help.
Regards,
Anne.
Previous Topic:How to set value for closed nested property?
Next Topic:Link navigation from an html link to an EMF editor
Goto Forum:
  


Current Time: Sat Apr 20 00:46:50 GMT 2024

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

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

Back to the top