Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] problem with model handler inizialization
[ATL] problem with model handler inizialization [message #39887] Tue, 22 May 2007 08:48 Go to next message
Eclipse UserFriend
Originally posted by: MIMINNO.it.ibm.com

Hello,
I'm developing an ATL transformation tool from UML to WIKI. I used class and
libraries to launch ATL programmatically, but program fails to inizialize
the EMF model handler. In particular, error comes out during the
assignation:

emfamh = AtlModelHandler.getDefault(AtlModelHandler.AMH_EMF);

because of a nullpointer exception thrown by line:
EClass EATTRIBUTE = eINSTANCE.getEAttribute();

in the EcorePackage class. Can anyone tell me something about?



Thanks in advance for your help,


exquisitus
Re: [ATL] problem with model handler inizialization [message #39980 is a reply to message #39887] Tue, 22 May 2007 10:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: MIMINNO.it.ibm.com

Hi all,
I still don't know how to fix this problem. I try to launch an ATL
transformation by means of the ATLTransormations class, downloaded

with its libraries as Milan Milanovic posted. In debugging I have:



In ATLTransormations.java:



private void initEMF() {

if(emfamh == null) { // if EMF is not initialized

// Initialize EMF model handler
-------------> emfamh =
AtlModelHandler.getDefault(AtlModelHandler.AMH_EMF);



In AtlModelHandler.java:

public static AtlModelHandler getDefault(String repository)
{
AtlModelHandler ret =
(AtlModelHandler)defaultModelHandlers.get(repository);
if(ret == null)
{
if("EMF".equals(repository))
{
-----> ret = new AtlEMFModelHandler();



In AtlEMFModelHandler.java:

protected AtlEMFModelHandler()
{
useIDs = false;
removeIDs = false;
encoding = "ISO-8859-1";
bimm = new HashMap();
URL atlurl =
org.atl.eclipse.engine.AtlEMFModelHandler.class.getResource( "resources/ATL-0.2.ecore");
--> mofmm = ASMEMFModel.createMOF(null);



In ASMEMFModel.java:

public static ASMEMFModel createMOF(ModelLoader ml)
{
if(mofmm == null)
--> mofmm = new ASMEMFModel("MOF",
EcorePackage.eINSTANCE.eResource(), null, false, ml);



.....

till in EcorePackage.java:

EClass EATTRIBUTE = eINSTANCE.getEAttribute(); (NullPointer
Exception)


hoping for an answer

best regards,
exquisitus








"exquisitus" <MIMINNO@it.ibm.com> wrote in message
news:f2uaok$vlj$1@build.eclipse.org...
> Hello,
> I'm developing an ATL transformation tool from UML to WIKI. I used class
> and libraries to launch ATL programmatically, but program fails to
> inizialize the EMF model handler. In particular, error comes out during
> the assignation:
>
> emfamh = AtlModelHandler.getDefault(AtlModelHandler.AMH_EMF);
>
> because of a nullpointer exception thrown by line:
> EClass EATTRIBUTE = eINSTANCE.getEAttribute();
>
> in the EcorePackage class. Can anyone tell me something about?
>
>
>
> Thanks in advance for your help,
>
>
> exquisitus
>
>
Re: [ATL] problem with model handler inizialization [message #40309 is a reply to message #39980] Tue, 22 May 2007 13:25 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: milan.milanovic.org

Hi,

are you using libs which are included with ATLTransformation class bundle ?
Did you added they to the CLASSPATH ? Maybe you have some other EMF libs
in your CLASSPATH.

--
Best regards, Milan Milanovic

exquisitus wrote:

> Hi all,
> I still don't know how to fix this problem. I try to launch an ATL
> transformation by means of the ATLTransormations class, downloaded

> with its libraries as Milan Milanovic posted. In debugging I have:



> In ATLTransormations.java:



> private void initEMF() {

> if(emfamh == null) { // if EMF is not initialized

> // Initialize EMF model handler
> -------------> emfamh =
> AtlModelHandler.getDefault(AtlModelHandler.AMH_EMF);



> In AtlModelHandler.java:

> public static AtlModelHandler getDefault(String repository)
> {
> AtlModelHandler ret =
> (AtlModelHandler)defaultModelHandlers.get(repository);
> if(ret == null)
> {
> if("EMF".equals(repository))
> {
> -----> ret = new AtlEMFModelHandler();



> In AtlEMFModelHandler.java:

> protected AtlEMFModelHandler()
> {
> useIDs = false;
> removeIDs = false;
> encoding = "ISO-8859-1";
> bimm = new HashMap();
> URL atlurl =
>
org.atl.eclipse.engine.AtlEMFModelHandler.class.getResource( "resources/ATL-0.2.ecore");
> --> mofmm = ASMEMFModel.createMOF(null);



> In ASMEMFModel.java:

> public static ASMEMFModel createMOF(ModelLoader ml)
> {
> if(mofmm == null)
> --> mofmm = new ASMEMFModel("MOF",
> EcorePackage.eINSTANCE.eResource(), null, false, ml);



> .....

> till in EcorePackage.java:

> EClass EATTRIBUTE = eINSTANCE.getEAttribute(); (NullPointer
> Exception)


> hoping for an answer

> best regards,
> exquisitus








> "exquisitus" <MIMINNO@it.ibm.com> wrote in message
> news:f2uaok$vlj$1@build.eclipse.org...
>> Hello,
>> I'm developing an ATL transformation tool from UML to WIKI. I used class
>> and libraries to launch ATL programmatically, but program fails to
>> inizialize the EMF model handler. In particular, error comes out during
>> the assignation:
>>
>> emfamh = AtlModelHandler.getDefault(AtlModelHandler.AMH_EMF);
>>
>> because of a nullpointer exception thrown by line:
>> EClass EATTRIBUTE = eINSTANCE.getEAttribute();
>>
>> in the EcorePackage class. Can anyone tell me something about?
>>
>>
>>
>> Thanks in advance for your help,
>>
>>
>> exquisitus
>>
>>
Re: [ATL] problem with model handler inizialization [message #40594 is a reply to message #40309] Tue, 22 May 2007 14:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: MIMINNO.it.ibm.com

Hi Milan,
actually I do have some other EMF libs in my CLASSPATH, in particular:

- org.eclipse.emf.ecore_2.3.0.some_version
- org.eclipse.emf.common_2.3.0.some_version

but if I remove these and put that included with ATLTransformation class
bundle (2.1.0), errors in the rest of my program come out. The other classes
are a modeification of automatically ecore generated classes and maybe are
dipendent from EMF 2.3.0.

Is it right and, above all, what could I do?

Thanks a lot,
exquisitus



"Milan Milanovic" <milan@milanovic.org> wrote in message
news:5364a25adb9d44f23a9f71e40626943b$1@www.eclipse.org...
> Hi,
>
> are you using libs which are included with ATLTransformation class bundle
> ?
> Did you added they to the CLASSPATH ? Maybe you have some other EMF libs
> in your CLASSPATH.
>
> --
> Best regards, Milan Milanovic
>
> exquisitus wrote:
>
>> Hi all,
>> I still don't know how to fix this problem. I try to launch an ATL
>> transformation by means of the ATLTransormations class, downloaded
>
>> with its libraries as Milan Milanovic posted. In debugging I have:
>
>
>
>> In ATLTransormations.java:
>
>
>
>> private void initEMF() {
>
>> if(emfamh == null) { // if EMF is not initialized
>
>> // Initialize EMF model handler
>> -------------> emfamh =
>> AtlModelHandler.getDefault(AtlModelHandler.AMH_EMF);
>
>
>
>> In AtlModelHandler.java:
>
>> public static AtlModelHandler getDefault(String repository)
>> {
>> AtlModelHandler ret =
>> (AtlModelHandler)defaultModelHandlers.get(repository);
>> if(ret == null)
>> {
>> if("EMF".equals(repository))
>> {
>> -----> ret = new AtlEMFModelHandler();
>
>
>
>> In AtlEMFModelHandler.java:
>
>> protected AtlEMFModelHandler()
>> {
>> useIDs = false;
>> removeIDs = false;
>> encoding = "ISO-8859-1";
>> bimm = new HashMap();
>> URL atlurl =
> org.atl.eclipse.engine.AtlEMFModelHandler.class.getResource( "resources/ATL-0.2.ecore");
>> --> mofmm = ASMEMFModel.createMOF(null);
>
>
>
>> In ASMEMFModel.java:
>
>> public static ASMEMFModel createMOF(ModelLoader ml)
>> {
>> if(mofmm == null)
>> --> mofmm = new ASMEMFModel("MOF",
>> EcorePackage.eINSTANCE.eResource(), null, false, ml);
>
>
>
>> .....
>
>> till in EcorePackage.java:
>
>> EClass EATTRIBUTE = eINSTANCE.getEAttribute(); (NullPointer
>> Exception)
>
>
>> hoping for an answer
>
>> best regards,
>> exquisitus
>
>
>
>
>
>
>
>
>> "exquisitus" <MIMINNO@it.ibm.com> wrote in message
>> news:f2uaok$vlj$1@build.eclipse.org...
>>> Hello,
>>> I'm developing an ATL transformation tool from UML to WIKI. I used class
>>> and libraries to launch ATL programmatically, but program fails to
>>> inizialize the EMF model handler. In particular, error comes out during
>>> the assignation:
>>>
>>> emfamh = AtlModelHandler.getDefault(AtlModelHandler.AMH_EMF);
>>>
>>> because of a nullpointer exception thrown by line:
>>> EClass EATTRIBUTE = eINSTANCE.getEAttribute();
>>>
>>> in the EcorePackage class. Can anyone tell me something about?
>>>
>>>
>>>
>>> Thanks in advance for your help,
>>>
>>>
>>> exquisitus
>>>
>>>
>
>
Re: [ATL] problem with model handler inizialization [message #40656 is a reply to message #40594] Tue, 22 May 2007 16:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: milan.milanovic.org

Hi,

well I can't help you with this. As you can see from the ATL Download page,
latest version of the ATL engine (i.e. emf4atl plugin in particular) is
using EMF version 2.2.1. For newer versions of the EMF you should contact
ATL team and ask them what to do.

Or you maybe can try to generate that Ecore by using EMF 2.2.1.

--
Best regards, Milan Milanovic

exquisitus wrote:

> Hi Milan,
> actually I do have some other EMF libs in my CLASSPATH, in particular:

> - org.eclipse.emf.ecore_2.3.0.some_version
> - org.eclipse.emf.common_2.3.0.some_version

> but if I remove these and put that included with ATLTransformation class
> bundle (2.1.0), errors in the rest of my program come out. The other classes
> are a modeification of automatically ecore generated classes and maybe are
> dipendent from EMF 2.3.0.

> Is it right and, above all, what could I do?

> Thanks a lot,
> exquisitus



> "Milan Milanovic" <milan@milanovic.org> wrote in message
> news:5364a25adb9d44f23a9f71e40626943b$1@www.eclipse.org...
>> Hi,
>>
>> are you using libs which are included with ATLTransformation class bundle
>> ?
>> Did you added they to the CLASSPATH ? Maybe you have some other EMF libs
>> in your CLASSPATH.
>>
>> --
>> Best regards, Milan Milanovic
>>
>> exquisitus wrote:
>>
>>> Hi all,
>>> I still don't know how to fix this problem. I try to launch an ATL
>>> transformation by means of the ATLTransormations class, downloaded
>>
>>> with its libraries as Milan Milanovic posted. In debugging I have:
>>
>>
>>
>>> In ATLTransormations.java:
>>
>>
>>
>>> private void initEMF() {
>>
>>> if(emfamh == null) { // if EMF is not initialized
>>
>>> // Initialize EMF model handler
>>> -------------> emfamh =
>>> AtlModelHandler.getDefault(AtlModelHandler.AMH_EMF);
>>
>>
>>
>>> In AtlModelHandler.java:
>>
>>> public static AtlModelHandler getDefault(String repository)
>>> {
>>> AtlModelHandler ret =
>>> (AtlModelHandler)defaultModelHandlers.get(repository);
>>> if(ret == null)
>>> {
>>> if("EMF".equals(repository))
>>> {
>>> -----> ret = new AtlEMFModelHandler();
>>
>>
>>
>>> In AtlEMFModelHandler.java:
>>
>>> protected AtlEMFModelHandler()
>>> {
>>> useIDs = false;
>>> removeIDs = false;
>>> encoding = "ISO-8859-1";
>>> bimm = new HashMap();
>>> URL atlurl =
>>
org.atl.eclipse.engine.AtlEMFModelHandler.class.getResource( "resources/ATL-0.2.ecore");
>>> --> mofmm = ASMEMFModel.createMOF(null);
>>
>>
>>
>>> In ASMEMFModel.java:
>>
>>> public static ASMEMFModel createMOF(ModelLoader ml)
>>> {
>>> if(mofmm == null)
>>> --> mofmm = new ASMEMFModel("MOF",
>>> EcorePackage.eINSTANCE.eResource(), null, false, ml);
>>
>>
>>
>>> .....
>>
>>> till in EcorePackage.java:
>>
>>> EClass EATTRIBUTE = eINSTANCE.getEAttribute(); (NullPointer
>>> Exception)
>>
>>
>>> hoping for an answer
>>
>>> best regards,
>>> exquisitus
>>
>>
>>
>>
>>
>>
>>
>>
>>> "exquisitus" <MIMINNO@it.ibm.com> wrote in message
>>> news:f2uaok$vlj$1@build.eclipse.org...
>>>> Hello,
>>>> I'm developing an ATL transformation tool from UML to WIKI. I used class
>>>> and libraries to launch ATL programmatically, but program fails to
>>>> inizialize the EMF model handler. In particular, error comes out during
>>>> the assignation:
>>>>
>>>> emfamh = AtlModelHandler.getDefault(AtlModelHandler.AMH_EMF);
>>>>
>>>> because of a nullpointer exception thrown by line:
>>>> EClass EATTRIBUTE = eINSTANCE.getEAttribute();
>>>>
>>>> in the EcorePackage class. Can anyone tell me something about?
>>>>
>>>>
>>>>
>>>> Thanks in advance for your help,
>>>>
>>>>
>>>> exquisitus
>>>>
>>>>
>>
>>
Re: [ATL] problem with model handler inizialization [message #40805 is a reply to message #40656] Wed, 23 May 2007 07:57 Go to previous message
Eclipse UserFriend
Originally posted by: MIMINNO.it.ibm.com

Hi Milan,

> Or you maybe can try to generate that Ecore by using EMF 2.2.1.

that's what I'm trying to...

thanks,
exquisitus




"Milan Milanovic" <milan@milanovic.org> wrote in message
news:2a11e21dbbee2d40a7852ea9be3ca6d6$1@www.eclipse.org...
> Hi,
>
> well I can't help you with this. As you can see from the ATL Download
> page,
> latest version of the ATL engine (i.e. emf4atl plugin in particular) is
> using EMF version 2.2.1. For newer versions of the EMF you should contact
> ATL team and ask them what to do.
>
> Or you maybe can try to generate that Ecore by using EMF 2.2.1.
>
> --
> Best regards, Milan Milanovic
>
> exquisitus wrote:
>
>> Hi Milan,
>> actually I do have some other EMF libs in my CLASSPATH, in particular:
>
>> - org.eclipse.emf.ecore_2.3.0.some_version
>> - org.eclipse.emf.common_2.3.0.some_version
>
>> but if I remove these and put that included with ATLTransformation class
>> bundle (2.1.0), errors in the rest of my program come out. The other
>> classes are a modeification of automatically ecore generated classes and
>> maybe are dipendent from EMF 2.3.0.
>
>> Is it right and, above all, what could I do?
>
>> Thanks a lot,
>> exquisitus
>
>
>
>> "Milan Milanovic" <milan@milanovic.org> wrote in message
>> news:5364a25adb9d44f23a9f71e40626943b$1@www.eclipse.org...
>>> Hi,
>>>
>>> are you using libs which are included with ATLTransformation class
>>> bundle ?
>>> Did you added they to the CLASSPATH ? Maybe you have some other EMF libs
>>> in your CLASSPATH.
>>>
>>> --
>>> Best regards, Milan Milanovic
>>>
>>> exquisitus wrote:
>>>
>>>> Hi all,
>>>> I still don't know how to fix this problem. I try to launch an ATL
>>>> transformation by means of the ATLTransormations class, downloaded
>>>
>>>> with its libraries as Milan Milanovic posted. In debugging I have:
>>>
>>>
>>>
>>>> In ATLTransormations.java:
>>>
>>>
>>>
>>>> private void initEMF() {
>>>
>>>> if(emfamh == null) { // if EMF is not initialized
>>>
>>>> // Initialize EMF model handler
>>>> -------------> emfamh =
>>>> AtlModelHandler.getDefault(AtlModelHandler.AMH_EMF);
>>>
>>>
>>>
>>>> In AtlModelHandler.java:
>>>
>>>> public static AtlModelHandler getDefault(String repository)
>>>> {
>>>> AtlModelHandler ret =
>>>> (AtlModelHandler)defaultModelHandlers.get(repository);
>>>> if(ret == null)
>>>> {
>>>> if("EMF".equals(repository))
>>>> {
>>>> -----> ret = new AtlEMFModelHandler();
>>>
>>>
>>>
>>>> In AtlEMFModelHandler.java:
>>>
>>>> protected AtlEMFModelHandler()
>>>> {
>>>> useIDs = false;
>>>> removeIDs = false;
>>>> encoding = "ISO-8859-1";
>>>> bimm = new HashMap();
>>>> URL atlurl =
>>>
> org.atl.eclipse.engine.AtlEMFModelHandler.class.getResource( "resources/ATL-0.2.ecore");
>>>> --> mofmm = ASMEMFModel.createMOF(null);
>>>
>>>
>>>
>>>> In ASMEMFModel.java:
>>>
>>>> public static ASMEMFModel createMOF(ModelLoader ml)
>>>> {
>>>> if(mofmm == null)
>>>> --> mofmm = new ASMEMFModel("MOF",
>>>> EcorePackage.eINSTANCE.eResource(), null, false, ml);
>>>
>>>
>>>
>>>> .....
>>>
>>>> till in EcorePackage.java:
>>>
>>>> EClass EATTRIBUTE = eINSTANCE.getEAttribute(); (NullPointer
>>>> Exception)
>>>
>>>
>>>> hoping for an answer
>>>
>>>> best regards,
>>>> exquisitus
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>> "exquisitus" <MIMINNO@it.ibm.com> wrote in message
>>>> news:f2uaok$vlj$1@build.eclipse.org...
>>>>> Hello,
>>>>> I'm developing an ATL transformation tool from UML to WIKI. I used
>>>>> class and libraries to launch ATL programmatically, but program fails
>>>>> to inizialize the EMF model handler. In particular, error comes out
>>>>> during the assignation:
>>>>>
>>>>> emfamh = AtlModelHandler.getDefault(AtlModelHandler.AMH_EMF);
>>>>>
>>>>> because of a nullpointer exception thrown by line:
>>>>> EClass EATTRIBUTE = eINSTANCE.getEAttribute();
>>>>>
>>>>> in the EcorePackage class. Can anyone tell me something about?
>>>>>
>>>>>
>>>>>
>>>>> Thanks in advance for your help,
>>>>>
>>>>>
>>>>> exquisitus
>>>>>
>>>>>
>>>
>>>
>
>
Previous Topic:[ATL] Is Datatype Double not supported?
Next Topic:[ATL] Metamodel for XPDL - What XPDL Version?
Goto Forum:
  


Current Time: Thu Apr 25 21:05:36 GMT 2024

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

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

Back to the top