Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] NPE at org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel.loadASMEMFModel(ASMEMFModel.java:320)
[ATL] NPE at org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel.loadASMEMFModel(ASMEMFModel.java:320) [message #74895] Tue, 12 February 2008 13:08 Go to next message
Eclipse UserFriend
Originally posted by: r.c.ladan.tue.nl

Hi,

I'm using ATL from CVS updated today (2008-02-12), mainly to avoid a known error
with the 2.0.0 release build and because the update manager wouldn't let me
install the latest integration build.

Calling ATL from java gives the below exception (the program continues to run).
The simplified code leading to this is:

ByteArrayInputStream[] inModels = {null, null, null, null};
ByteArrayOutputStream[] outModels = {null, null, null, null};
String inTransformation = "replace_cpu";

for (int j = 0; j < 4; j++) {
// initialize outModels[j]
inModels[j] = new ByteArrayInputStream(outModels[j].toByteArray());
}

Transform transform = new Transform();
for (int j = 0; j < 4; j++)
outModels[j] = new ByteArrayOutputStream();
transform.doATLTransformation(inModels, inTransformation, outModels);

with doATLTransformation being:

public void doATLTransformation(ByteArrayInputStream[] inModels, String inTransformation, ByteArrayOutputStream[] outModels) throws IOException {
this.amh = AtlModelHandler.getDefault(AtlModelHandler.AMH_EMF); // crashes here
// ...
}

Is this a known bug or something to worry about?

Eclipse 3.3.1.1 M20071023-1652
EMF 2.3.1.v200709252135

Thanks,
Rene

SEVERE: null
java.lang.NullPointerException
at org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel.loadASMEMFMo del(ASMEMFModel.java:320)
at org.eclipse.m2m.atl.engine.AtlEMFModelHandler.<init>(AtlEMFModelHandler.java:203)
at org.eclipse.m2m.atl.engine.AtlModelHandler.getDefault(AtlMod elHandler.java:62)
at transform.Transform.doATLTransformation(Transform.java:90)
at call_custom.MetaEditor.variate(MetaEditor.java:203)
at call_custom.MetaEditor.doParse(MetaEditor.java:143)
at call_custom.MetaEditor$1.doExecuteWithResult(MetaEditor.java :60)
at org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTr ansactionalCommand.doExecute(AbstractTransactionalCommand.ja va:246)
at org.eclipse.emf.workspace.AbstractEMFOperation.execute(Abstr actEMFOperation.java:137)
at org.eclipse.core.commands.operations.DefaultOperationHistory .execute(DefaultOperationHistory.java:511)
at call_custom.MetaEditor.run(MetaEditor.java:68)
at org.eclipse.ui.internal.handlers.ActionDelegateHandlerProxy. execute(ActionDelegateHandlerProxy.java:271)
at org.eclipse.core.commands.Command.executeWithChecks(Command. java:475)
at org.eclipse.core.commands.ParameterizedCommand.executeWithCh ecks(ParameterizedCommand.java:429)
at org.eclipse.ui.internal.handlers.HandlerService.executeComma nd(HandlerService.java:165)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeComman d(WorkbenchKeyboard.java:470)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(Workben chKeyboard.java:821)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEve nt(WorkbenchKeyboard.java:879)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequ enceBindings(WorkbenchKeyboard.java:568)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(Work benchKeyboard.java:510)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter .handleEvent(WorkbenchKeyboard.java:126)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Display.filterEvent(Display.java:114 1)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:937)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:962)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:947)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:975)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:971)
at org.eclipse.swt.widgets.Widget.wmKeyDown(Widget.java:1570)
at org.eclipse.swt.widgets.Control.WM_KEYDOWN(Control.java:3992 )
at org.eclipse.swt.widgets.Tree.WM_KEYDOWN(Tree.java:5480)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3701 )
at org.eclipse.swt.widgets.Tree.windowProc(Tree.java:5370)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4364 )
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:22 65)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3291)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 19)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:289)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:106)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:169)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:106)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:363)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
at org.eclipse.equinox.launcher.Main.main(Main.java:1148)
Re: [ATL] NPE at org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel.loadASMEMFModel [message #74925 is a reply to message #74895] Wed, 13 February 2008 11:22 Go to previous messageGo to next message
wong is currently offline wongFriend
Messages: 54
Registered: July 2009
Member
Hello,

I have same configure as you. Win32 + eclipse 3.3.1.1 + gmf + atl from
cvs. The exception also from
AtlEMFModelHandler emfamh = (AtlEMFModelHandler)
AtlModelHandler.getDefault(AtlModelHandler.AMH_EMF);

I have worked on this many days and still unsolved. It seems the
AtlLauncher example does not work with our configure.

Thank you,
Wong.
Re: [ATL] NPE at org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel.loadASMEMFModel(ASMEMFModel.java:32 [message #74940 is a reply to message #74895] Thu, 14 February 2008 07:45 Go to previous messageGo to next message
Frédéric Jouault is currently offline Frédéric JouaultFriend
Messages: 572
Registered: July 2009
Senior Member
Hi,

It seems that AtlEMFModelHandler cannot load the ATL metamodel (a .ecore
file in the src/ folder).

We used to have an ant script to copy .ecore files from src/ to bin/.
However, this script was only necessary on some machines, not on others.
We realized that the problem was with compiler settings: on some
machines, .ecore files were in the exclusion list of files to be copied
from src/ to bin/.

We tried to solve the problem by setting per-project compiler settings.
Then, we removed the ant script, which was making the compilation
process a bit slower.

However, it seems that you may still have this problem. Can you please
check your Java compiler settings? If we have forgotten to set
something, we will add it.


Thanks,

Frédéric Jouault


Rene Ladan wrote:
> Hi,
>
> I'm using ATL from CVS updated today (2008-02-12), mainly to avoid a
> known error
> with the 2.0.0 release build and because the update manager wouldn't let me
> install the latest integration build.
>
> Calling ATL from java gives the below exception (the program continues
> to run).
> The simplified code leading to this is:
>
> ByteArrayInputStream[] inModels = {null, null, null, null};
> ByteArrayOutputStream[] outModels = {null, null, null, null};
> String inTransformation = "replace_cpu";
>
> for (int j = 0; j < 4; j++) {
> // initialize outModels[j]
> inModels[j] = new ByteArrayInputStream(outModels[j].toByteArray());
> }
>
> Transform transform = new Transform();
> for (int j = 0; j < 4; j++)
> outModels[j] = new ByteArrayOutputStream();
> transform.doATLTransformation(inModels, inTransformation, outModels);
>
> with doATLTransformation being:
>
> public void doATLTransformation(ByteArrayInputStream[] inModels,
> String inTransformation, ByteArrayOutputStream[] outModels) throws
> IOException {
> this.amh = AtlModelHandler.getDefault(AtlModelHandler.AMH_EMF);
> // crashes here
> // ...
> }
>
> Is this a known bug or something to worry about?
>
> Eclipse 3.3.1.1 M20071023-1652
> EMF 2.3.1.v200709252135
>
> Thanks,
> Rene
>
> SEVERE: null
> java.lang.NullPointerException
> at
> org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel.loadASMEMFMo del(ASMEMFModel.java:320)
>
> at
> org.eclipse.m2m.atl.engine.AtlEMFModelHandler.<init>(AtlEMFModelHandler.java:203)
>
> at
> org.eclipse.m2m.atl.engine.AtlModelHandler.getDefault(AtlMod elHandler.java:62)
>
> at transform.Transform.doATLTransformation(Transform.java:90)
> at call_custom.MetaEditor.variate(MetaEditor.java:203)
> at call_custom.MetaEditor.doParse(MetaEditor.java:143)
> at call_custom.MetaEditor$1.doExecuteWithResult(MetaEditor.java :60)
> at
> org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTr ansactionalCommand.doExecute(AbstractTransactionalCommand.ja va:246)
>
> at
> org.eclipse.emf.workspace.AbstractEMFOperation.execute(Abstr actEMFOperation.java:137)
>
> at
> org.eclipse.core.commands.operations.DefaultOperationHistory .execute(DefaultOperationHistory.java:511)
>
> at call_custom.MetaEditor.run(MetaEditor.java:68)
> at
> org.eclipse.ui.internal.handlers.ActionDelegateHandlerProxy. execute(ActionDelegateHandlerProxy.java:271)
>
> at
> org.eclipse.core.commands.Command.executeWithChecks(Command. java:475)
> at
> org.eclipse.core.commands.ParameterizedCommand.executeWithCh ecks(ParameterizedCommand.java:429)
>
> at
> org.eclipse.ui.internal.handlers.HandlerService.executeComma nd(HandlerService.java:165)
>
> at
> org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeComman d(WorkbenchKeyboard.java:470)
>
> at
> org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(Workben chKeyboard.java:821)
>
> at
> org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEve nt(WorkbenchKeyboard.java:879)
>
> at
> org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequ enceBindings(WorkbenchKeyboard.java:568)
>
> at
> org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(Work benchKeyboard.java:510)
>
> at
> org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter .handleEvent(WorkbenchKeyboard.java:126)
>
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
> at org.eclipse.swt.widgets.Display.filterEvent(Display.java:114 1)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:937)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:962)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:947)
> at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:975)
> at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:971)
> at org.eclipse.swt.widgets.Widget.wmKeyDown(Widget.java:1570)
> at org.eclipse.swt.widgets.Control.WM_KEYDOWN(Control.java:3992 )
> at org.eclipse.swt.widgets.Tree.WM_KEYDOWN(Tree.java:5480)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:3701 )
> at org.eclipse.swt.widgets.Tree.windowProc(Tree.java:5370)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:4364 )
> at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
> at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:22 65)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3291)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2389)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 19)
> at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:289)
>
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:461)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:106)
>
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:169)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:106)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:76)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:363)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:176)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 508)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1148)
Re: [ATL] NPE at org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel.loadASMEMFModel(ASMEMFModel.java:32 [message #74960 is a reply to message #74940] Thu, 14 February 2008 08:49 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: r.c.ladan.tue.nl

I updated to todays CVS vesion and added the resource/ directory
containing a.o. ATL-0.2.ecore to bin.includes of org.eclipse.m2m.atl.engine

Now the file shows up in the generated jar file.

Rene

Frédéric Jouault wrote:
> Hi,
>
> It seems that AtlEMFModelHandler cannot load the ATL metamodel (a .ecore
> file in the src/ folder).
>
> We used to have an ant script to copy .ecore files from src/ to bin/.
> However, this script was only necessary on some machines, not on others.
> We realized that the problem was with compiler settings: on some
> machines, .ecore files were in the exclusion list of files to be copied
> from src/ to bin/.
>
> We tried to solve the problem by setting per-project compiler settings.
> Then, we removed the ant script, which was making the compilation
> process a bit slower.
>
> However, it seems that you may still have this problem. Can you please
> check your Java compiler settings? If we have forgotten to set
> something, we will add it.
>
>
> Thanks,
>
> Frédéric Jouault
>
>
> Rene Ladan wrote:
>> Hi,
>>
>> I'm using ATL from CVS updated today (2008-02-12), mainly to avoid a
>> known error
>> with the 2.0.0 release build and because the update manager wouldn't
>> let me
>> install the latest integration build.
>>
>> Calling ATL from java gives the below exception (the program continues
>> to run).
>> The simplified code leading to this is:
>>
>> ByteArrayInputStream[] inModels = {null, null, null, null};
>> ByteArrayOutputStream[] outModels = {null, null, null, null};
>> String inTransformation = "replace_cpu";
>>
>> for (int j = 0; j < 4; j++) {
>> // initialize outModels[j]
>> inModels[j] = new
>> ByteArrayInputStream(outModels[j].toByteArray());
>> }
>>
>> Transform transform = new Transform();
>> for (int j = 0; j < 4; j++)
>> outModels[j] = new ByteArrayOutputStream();
>> transform.doATLTransformation(inModels, inTransformation, outModels);
>>
>> with doATLTransformation being:
>>
>> public void doATLTransformation(ByteArrayInputStream[] inModels,
>> String inTransformation, ByteArrayOutputStream[] outModels) throws
>> IOException {
>> this.amh =
>> AtlModelHandler.getDefault(AtlModelHandler.AMH_EMF); // crashes here
>> // ...
>> }
>>
>> Is this a known bug or something to worry about?
>>
>> Eclipse 3.3.1.1 M20071023-1652
>> EMF 2.3.1.v200709252135
>>
>> Thanks,
>> Rene
>>
>> SEVERE: null
>> java.lang.NullPointerException
>> at
>> org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel.loadASMEMFMo del(ASMEMFModel.java:320)
>>
>> at
>> org.eclipse.m2m.atl.engine.AtlEMFModelHandler.<init>(AtlEMFModelHandler.java:203)
>>
>> at
>> org.eclipse.m2m.atl.engine.AtlModelHandler.getDefault(AtlMod elHandler.java:62)
>>
>> at transform.Transform.doATLTransformation(Transform.java:90)
Re: [ATL] NPE at org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel.loadASMEMFModel(ASMEMFModel.java:32 [message #74970 is a reply to message #74960] Thu, 14 February 2008 10:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: r.c.ladan.tue.nl

Rene Ladan wrote:
> I updated to todays CVS vesion and added the resource/ directory
> containing a.o. ATL-0.2.ecore to bin.includes of org.eclipse.m2m.atl.engine
>
> Now the file shows up in the generated jar file.

Unfortunately this doesn't help solving the exception :(

Any more ideas/howtos?

Rene
>
> Frédéric Jouault wrote:
>> Hi,
>>
>> It seems that AtlEMFModelHandler cannot load the ATL metamodel (a
>> .ecore file in the src/ folder).
>>
>> We used to have an ant script to copy .ecore files from src/ to bin/.
>> However, this script was only necessary on some machines, not on others.
>> We realized that the problem was with compiler settings: on some
>> machines, .ecore files were in the exclusion list of files to be
>> copied from src/ to bin/.
>>
>> We tried to solve the problem by setting per-project compiler
>> settings. Then, we removed the ant script, which was making the
>> compilation process a bit slower.
>>
>> However, it seems that you may still have this problem. Can you please
>> check your Java compiler settings? If we have forgotten to set
>> something, we will add it.
>>
>>
>> Thanks,
>>
>> Frédéric Jouault
>>
>>
>> Rene Ladan wrote:
>>> Hi,
>>>
>>> I'm using ATL from CVS updated today (2008-02-12), mainly to avoid a
>>> known error
>>> with the 2.0.0 release build and because the update manager wouldn't
>>> let me
>>> install the latest integration build.
>>>
>>> Calling ATL from java gives the below exception (the program
>>> continues to run).
>>> The simplified code leading to this is:
>>>
>>> ByteArrayInputStream[] inModels = {null, null, null, null};
>>> ByteArrayOutputStream[] outModels = {null, null, null, null};
>>> String inTransformation = "replace_cpu";
>>>
>>> for (int j = 0; j < 4; j++) {
>>> // initialize outModels[j]
>>> inModels[j] = new
>>> ByteArrayInputStream(outModels[j].toByteArray());
>>> }
>>>
>>> Transform transform = new Transform();
>>> for (int j = 0; j < 4; j++)
>>> outModels[j] = new ByteArrayOutputStream();
>>> transform.doATLTransformation(inModels, inTransformation,
>>> outModels);
>>>
>>> with doATLTransformation being:
>>>
>>> public void doATLTransformation(ByteArrayInputStream[] inModels,
>>> String inTransformation, ByteArrayOutputStream[] outModels) throws
>>> IOException {
>>> this.amh =
>>> AtlModelHandler.getDefault(AtlModelHandler.AMH_EMF); // crashes here
>>> // ...
>>> }
>>>
>>> Is this a known bug or something to worry about?
>>>
>>> Eclipse 3.3.1.1 M20071023-1652
>>> EMF 2.3.1.v200709252135
>>>
>>> Thanks,
>>> Rene
>>>
>>> SEVERE: null
>>> java.lang.NullPointerException
>>> at
>>> org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel.loadASMEMFMo del(ASMEMFModel.java:320)
>>>
>>> at
>>> org.eclipse.m2m.atl.engine.AtlEMFModelHandler.<init>(AtlEMFModelHandler.java:203)
>>>
>>> at
>>> org.eclipse.m2m.atl.engine.AtlModelHandler.getDefault(AtlMod elHandler.java:62)
>>>
>>> at transform.Transform.doATLTransformation(Transform.java:90)
Re: [ATL] NPE at org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel.loadASMEMFModel(ASMEMFModel.java:32 [message #75029 is a reply to message #74970] Thu, 14 February 2008 22:07 Go to previous messageGo to next message
Frédéric Jouault is currently offline Frédéric JouaultFriend
Messages: 572
Registered: July 2009
Senior Member
Hello,

>> I updated to todays CVS vesion and added the resource/ directory
>> containing a.o. ATL-0.2.ecore to bin.includes of
>> org.eclipse.m2m.atl.engine
>>
>> Now the file shows up in the generated jar file.
>
> Unfortunately this doesn't help solving the exception :(
>
> Any more ideas/howtos?

Could you please give the full exception that you get now? I want to
make sure we have the updated line numbers.


Thanks,

Frédéric Jouault
Re: [ATL] NPE at org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel.loadASMEMFModel(ASMEMFModel.java:32 [message #75034 is a reply to message #75029] Fri, 15 February 2008 08:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: r.c.ladan.tue.nl

Frédéric Jouault wrote:
> Hello,
>
> >> I updated to todays CVS vesion and added the resource/ directory
> >> containing a.o. ATL-0.2.ecore to bin.includes of
> >> org.eclipse.m2m.atl.engine
> >>
> >> Now the file shows up in the generated jar file.
> >
> > Unfortunately this doesn't help solving the exception :(
> >
> > Any more ideas/howtos?
>
> Could you please give the full exception that you get now? I want to
> make sure we have the updated line numbers.
>
>

meta.custom contains the code which a.o. invokes ATL

AtlModelHandler amh;
this.amh = AtlModelHandler.getDefault(AtlModelHandler.AMH_EMF); // Transform.java:89

with ATL-head 20080214, Eclipse 3.3.1.1 20071023 and EMF 2.3.1 20070925
SEVERE: null
java.lang.NullPointerException
at org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel.loadASMEMFMo del(ASMEMFModel.java:320)
at org.eclipse.m2m.atl.engine.AtlEMFModelHandler.<init>(AtlEMFModelHandler.java:203)
at org.eclipse.m2m.atl.engine.AtlModelHandler.getDefault(AtlMod elHandler.java:62)
at meta.custom.Transform.doATLTransformation(Transform.java:89)
at meta.custom.MetaEditor.variate(MetaEditor.java:266)
at meta.custom.MetaEditor.doParse(MetaEditor.java:180)
at meta.custom.MetaEditor$1.doExecuteWithResult(MetaEditor.java :68)
at org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTr ansactionalCommand.doExecute(AbstractTransactionalCommand.ja va:246)
at org.eclipse.emf.workspace.AbstractEMFOperation.execute(Abstr actEMFOperation.java:137)
at org.eclipse.core.commands.operations.DefaultOperationHistory .execute(DefaultOperationHistory.java:511)
at meta.custom.MetaEditor.run(MetaEditor.java:76)
at org.eclipse.ui.internal.handlers.ActionDelegateHandlerProxy. execute(ActionDelegateHandlerProxy.java:271)
at org.eclipse.core.commands.Command.executeWithChecks(Command. java:475)
at org.eclipse.core.commands.ParameterizedCommand.executeWithCh ecks(ParameterizedCommand.java:429)
at org.eclipse.ui.internal.handlers.HandlerService.executeComma nd(HandlerService.java:165)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeComman d(WorkbenchKeyboard.java:470)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(Workben chKeyboard.java:821)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEve nt(WorkbenchKeyboard.java:879)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequ enceBindings(WorkbenchKeyboard.java:568)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(Work benchKeyboard.java:510)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter .handleEvent(WorkbenchKeyboard.java:126)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Display.filterEvent(Display.java:114 1)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:937)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:962)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:947)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:975)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:971)
at org.eclipse.swt.widgets.Widget.wmKeyDown(Widget.java:1570)
at org.eclipse.swt.widgets.Control.WM_KEYDOWN(Control.java:3992 )
at org.eclipse.swt.widgets.Tree.WM_KEYDOWN(Tree.java:5480)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3701 )
at org.eclipse.swt.widgets.Tree.windowProc(Tree.java:5370)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4351 )
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:22 65)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3291)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 19)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:289)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:106)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:169)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:106)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:363)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
at org.eclipse.equinox.launcher.Main.main(Main.java:1148)
Starting model transformation replace_cpu <-- user code
Re: [ATL] NPE at org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel.loadASMEMFModel(ASMEMFModel.java:32 [message #75074 is a reply to message #75034] Fri, 15 February 2008 22:24 Go to previous messageGo to next message
Frédéric Jouault is currently offline Frédéric JouaultFriend
Messages: 572
Registered: July 2009
Senior Member
Hello,

>> >> I updated to todays CVS vesion and added the resource/ directory
>> >> containing a.o. ATL-0.2.ecore to bin.includes of
>> >> org.eclipse.m2m.atl.engine
>> >>
>> >> Now the file shows up in the generated jar file.
>> >
>> > Unfortunately this doesn't help solving the exception :(
>> >
>> > Any more ideas/howtos?

Is putting resources/ in bin.includes enough?
Can you please check whether you really have the following structure in
the jar file?


org/
eclipse/
m2m/
atl/
engine/
AtlEMFModelHandler.class
resources/
ATL-0.2.ecore

The .ecore file must be in the subfolder called "resources" of the
folder containing AtlEMFModelHandler.class. Otherwise,
AtlEMFModelHandler.class.getResource("resources/ATL-0.2.ecore ") will
return null, which leads to an NPE.


Thanks,

Frédéric
Re: [ATL] NPE at org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel.loadASMEMFModel(ASMEMFModel.java:32 [message #75090 is a reply to message #75074] Mon, 18 February 2008 08:38 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: r.c.ladan.tue.nl

Frédéric Jouault wrote:
> Hello,
>
>>> >> I updated to todays CVS vesion and added the resource/ directory
>>> >> containing a.o. ATL-0.2.ecore to bin.includes of
>>> >> org.eclipse.m2m.atl.engine
>>> >>
>>> >> Now the file shows up in the generated jar file.
>>> >
>>> > Unfortunately this doesn't help solving the exception :(
>>> >
>>> > Any more ideas/howtos?
>
> Is putting resources/ in bin.includes enough?

The build.properties file of org.eclipse.m2m.atl.engine already has resources/ in bin.includes.

> Can you please check whether you really have the following structure in
> the jar file?
>
>
> org/
> eclipse/
> m2m/
> atl/
> engine/
> AtlEMFModelHandler.class
> resources/
> ATL-0.2.ecore
>
> The .ecore file must be in the subfolder called "resources" of the
> folder containing AtlEMFModelHandler.class. Otherwise,
> AtlEMFModelHandler.class.getResource("resources/ATL-0.2.ecore ") will
> return null, which leads to an NPE.
>
This structure is present in eclipse/plugins/org.eclipse.m2m.atl.engine.jar, which is part of eclipse/plugins/org.eclipse.m2m.atl.engine_2.0.0.datetime.ja r
The latter file does contain the ecore file, but not the class file.
Somehow I get the idea that manually extracting the unversioned jar from the versioned one isn't a good idea, but if I don't extract the file into eclipse/plugins/
these imports won't resolve:

import org.eclipse.m2m.atl.engine.AtlEMFModelHandler;
import org.eclipse.m2m.atl.engine.AtlLauncher;
import org.eclipse.m2m.atl.engine.AtlModelHandler;

Regards,
Rene
Re: [ATL] NPE at org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel.loadASMEMFModel(ASMEMFModel.java:32 [message #75354 is a reply to message #75074] Mon, 25 February 2008 15:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: r.c.ladan.tue.nl

Frédéric Jouault wrote:
> Hello,
>
>>> >> I updated to todays CVS vesion and added the resource/ directory
>>> >> containing a.o. ATL-0.2.ecore to bin.includes of
>>> >> org.eclipse.m2m.atl.engine
>>> >>
>>> >> Now the file shows up in the generated jar file.
>>> >
>>> > Unfortunately this doesn't help solving the exception :(
>>> >

After testing a version from August 2007, I updated to todays HEAD. I cleaned
any remaining files/directories having 'm2m' in their name from my Eclipse directory
and reinstalled. Now the issue seems to be solved, but the call to getDefault() now
seems to hang on something :

this.amh = AtlModelHandler.getDefault(AtlModelHandler.AMH_EMF); // FIXME hangs

In order to get all imports[1] resolved, I manually extracted the org/ directory from
the embedded org.eclipse.m2m.atl.engine.jar into org.eclipse.m2m.atl.engine_2.0.0.datetime.jar
and removed the jar file from the parent archive.

The 'new' archive now has a directory org/eclipse/m2m/atl/engine containing all the class
files and a directory org/eclipse/m2m/atl/engine/resources containing a.o. ATL-0.2.ecore

Regards,
Rene

[1]
import org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel;
import org.eclipse.m2m.atl.drivers.emf4atl.EMFModelLoader;
import org.eclipse.m2m.atl.engine.AtlEMFModelHandler;
import org.eclipse.m2m.atl.engine.AtlLauncher;
import org.eclipse.m2m.atl.engine.AtlModelHandler;

On the required plug-ins path:
org.eclipse.m2m.atl.drivers.emf4atl
org.eclipse.m2m.atl.engine
Re: [ATL] NPE at org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel.loadASMEMFModel(ASMEMFModel.java:32 [message #75645 is a reply to message #75354] Mon, 03 March 2008 10:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: r.c.ladan.tue.nl

Rene Ladan wrote:
>
> After testing a version from August 2007, I updated to todays HEAD. I
> cleaned
> any remaining files/directories having 'm2m' in their name from my
> Eclipse directory
> and reinstalled. Now the issue seems to be solved, but the call to
> getDefault() now
> seems to hang on something :
>
> this.amh = AtlModelHandler.getDefault(AtlModelHandler.AMH_EMF); // FIXME hangs
>
If I single-step debug this in the Eclipse debugger, the debugger hangs at a
seemingly random point somewhere in this statement (i.e. two successive debugging
sessions yield two different hanging points).

Could this be an Eclipse / EMF problem? Updating to the latest EMF (2.3.2 20080228)
doesn't help.

Regards,
Rene
Re: [ATL] NPE at org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel.loadASMEMFModel(ASMEMFModel.java:32 [message #75680 is a reply to message #75645] Mon, 03 March 2008 15:19 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: r.c.ladan.tue.nl

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

Rene Ladan wrote:
> Rene Ladan wrote:
>>
>> After testing a version from August 2007, I updated to todays HEAD. I
>> cleaned
>> any remaining files/directories having 'm2m' in their name from my
>> Eclipse directory
>> and reinstalled. Now the issue seems to be solved, but the call to
>> getDefault() now
>> seems to hang on something :
>>
>> this.amh = AtlModelHandler.getDefault(AtlModelHandler.AMH_EMF); //
>> FIXME hangs
>>
> If I single-step debug this in the Eclipse debugger, the debugger hangs
> at a
> seemingly random point somewhere in this statement (i.e. two successive
> debugging
> sessions yield two different hanging points).
>
> Could this be an Eclipse / EMF problem? Updating to the latest EMF
> (2.3.2 20080228)
> doesn't help.
>
I've attached two stack traces (one from right before executing the statement,
one where it seems to hang (F5-F7-F7 in the debugger).

Regards,
Rene

--------------000305020602030504000809
Content-Type: text/plain;
name="stack-halted.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="stack-halted.txt"

mt2 [Eclipse Application]
org.eclipse.equinox.launcher.Main at localhost:2317
Thread [main] (Suspended)
Workbench.runEventLoop(Window$IExceptionHandler, Display) line: 2393
Workbench.runUI() line: 2353
Workbench.access$4(Workbench) line: 2219
Workbench$4.run() line: 466
Realm.runWithDefault(Realm, Runnable) line: 289
Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 461
PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 149
IDEApplication.start(IApplicationContext) line: 106
EclipseAppHandle.run(Object) line: 169
EclipseAppLauncher.runApplication(Object) line: 106
EclipseAppLauncher.start(Object) line: 76
EclipseStarter.run(Object) line: 363
EclipseStarter.run(String[], Runnable) line: 176
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: not available
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: not available
Method.invoke(Object, Object...) line: not available
Main.invokeFramework(String[], URL[]) line: 508
Main.basicRun(String[]) line: 447
Main.run(String[]) line: 1173
Main.main(String[]) line: 1148
Daemon Thread [State Data Manager] (Running)
Daemon Thread [Framework Event Dispatcher] (Running)
Daemon Thread [Start Level Event Dispatcher] (Running)
Thread [Worker-0] (Running)
Daemon Thread [Java indexing] (Running)
Thread [Worker-1] (Running)
Thread [Worker-2] (Running)
Thread [Worker-3] (Running)
Thread [Worker-4] (Running)
Thread [Worker-5] (Running)
C:\Program Files\Java\jre1.6.0_03\bin\javaw.exe (3 mrt 2008 16:14:04)

--------------000305020602030504000809
Content-Type: text/plain;
name="stack-before.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="stack-before.txt"

mt2 [Eclipse Application]
org.eclipse.equinox.launcher.Main at localhost:2246
Thread [main] (Suspended (breakpoint at line 86 in Transform))
Transform.doATLTransformation(ByteArrayInputStream[], ByteArrayInputStream, String, ByteArrayOutputStream[]) line: 86
MetaEditor.variate() line: 582
MetaEditor.doParse(EObject) line: 205
MetaEditor$1.doExecute(IProgressMonitor, IAdaptable) line: 84
MetaEditor$1(AbstractEMFOperation).execute(IProgressMonitor, IAdaptable) line: 137
DefaultOperationHistory.execute(IUndoableOperation, IProgressMonitor, IAdaptable) line: 511
MetaEditor.run(IAction) line: 93
ActionDelegateHandlerProxy.execute(ExecutionEvent) line: 271
Command.executeWithChecks(ExecutionEvent) line: 475
ParameterizedCommand.executeWithChecks(Object, Object) line: 429
HandlerService.executeCommand(ParameterizedCommand, Event) line: 165
WorkbenchKeyboard.executeCommand(Binding, Event) line: 470
WorkbenchKeyboard.press(List, Event) line: 821
WorkbenchKeyboard.processKeyEvent(List, Event) line: 879
WorkbenchKeyboard.filterKeySequenceBindings(Event) line: 568
WorkbenchKeyboard.access$3(WorkbenchKeyboard, Event) line: 510
WorkbenchKeyboard$KeyDownFilter.handleEvent(Event) line: 126
EventTable.sendEvent(Event) line: 66
Display.filterEvent(Event) line: 1141
Tree(Widget).sendEvent(Event) line: 937
Tree(Widget).sendEvent(int, Event, boolean) line: 962
Tree(Widget).sendEvent(int, Event) line: 947
Tree(Widget).sendKeyEvent(int, int, int, int, Event) line: 975
Tree(Widget).sendKeyEvent(int, int, int, int) line: 971
Tree(Widget).wmKeyDown(int, int, int) line: 1570
Tree(Control).WM_KEYDOWN(int, int) line: 3992
Tree.WM_KEYDOWN(int, int) line: 5480
Tree(Control).windowProc(int, int, int, int) line: 3701
Tree.windowProc(int, int, int, int) line: 5370
Display.windowProc(int, int, int, int) line: 4364
OS.DispatchMessageW(MSG) line: not available [native method]
OS.DispatchMessage(MSG) line: 2265
Display.readAndDispatch() line: 3291
Workbench.runEventLoop(Window$IExceptionHandler, Display) line: 2389
Workbench.runUI() line: 2353
Workbench.access$4(Workbench) line: 2219
Workbench$4.run() line: 466
Realm.runWithDefault(Realm, Runnable) line: 289
Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 461
PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 149
IDEApplication.start(IApplicationContext) line: 106
EclipseAppHandle.run(Object) line: 169
EclipseAppLauncher.runApplication(Object) line: 106
EclipseAppLauncher.start(Object) line: 76
EclipseStarter.run(Object) line: 363
EclipseStarter.run(String[], Runnable) line: 176
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: not available
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: not available
Method.invoke(Object, Object...) line: not available
Main.invokeFramework(String[], URL[]) line: 508
Main.basicRun(String[]) line: 447
Main.run(String[]) line: 1173
Main.main(String[]) line: 1148
Daemon Thread [State Data Manager] (Running)
Daemon Thread [Framework Event Dispatcher] (Running)
Daemon Thread [Start Level Event Dispatcher] (Running)
Thread [Worker-0] (Running)
Daemon Thread [Java indexing] (Running)
Thread [Worker-2] (Running)
C:\Program Files\Java\jre1.6.0_03\bin\javaw.exe (3 mrt 2008 16:00:20)

--------------000305020602030504000809--
Re: [ATL] NPE at org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel.loadASMEMFModel(ASMEMFModel.java:32 [message #75768 is a reply to message #75680] Wed, 05 March 2008 10:17 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: r.c.ladan.tue.nl

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

Rene Ladan wrote:
> Rene Ladan wrote:
>> Rene Ladan wrote:
>>>
>>> After testing a version from August 2007, I updated to todays HEAD.
>>> I cleaned
>>> any remaining files/directories having 'm2m' in their name from my
>>> Eclipse directory
>>> and reinstalled. Now the issue seems to be solved, but the call to
>>> getDefault() now
>>> seems to hang on something :
>>>
>>> this.amh = AtlModelHandler.getDefault(AtlModelHandler.AMH_EMF); //
>>> FIXME hangs
>>>
>> If I single-step debug this in the Eclipse debugger, the debugger
>> hangs at a
>> seemingly random point somewhere in this statement (i.e. two
>> successive debugging
>> sessions yield two different hanging points).
>>
>> Could this be an Eclipse / EMF problem? Updating to the latest EMF
>> (2.3.2 20080228)
>> doesn't help.
>>
> I've attached two stack traces (one from right before executing the
> statement,
> one where it seems to hang (F5-F7-F7 in the debugger).
>

I've also discussed this a bit on the eclipse.platform newsgroup without
any real results.

Some observations:

* if I debug the program with the source of org.eclipse.m2m.atl.engine
opened, the program doesn't hang but crashes with the exception mentioned
in the subject because it cannot find ATL-0.2.ecore, although this file is
in org.eclipse.m2m.atl.engine/resources. It also cannot find the file if
I put it in the a resources folder in the runtime root directory of the
program.

* Restarting Eclipse without the jar file in the plugins/ directory (forcing
the program to use the source directly) doesn't produce the hang, but crashes
the program because it cannot find ATL-0.2.ecore

* Restarting Eclipse with ATL-0.2.ecore removed from the jar file and without
any sources opened produces the hang instead of the file-not-found crash.

* If I debug the program without the ATL sources opened, it always hangs
(both with and without ATL-0.2.ecore in the jar file).

* Pressing F5-F5-F7 in the debugger makes the debugger hang on a
workbench.runEventLoop() method (iirc).

So although the resource file is in the correct location of the jar file, it
cannot run properly. I've attached the contents of the jar file.

Regards,
Rene


--------------000504040603070708060400
Content-Type: text/plain;
name="contents.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="contents.txt"

Archive: ../../../eclipse/plugins/org.eclipse.m2m.atl.engine_2.0.0.20 0802251526.jar
Length Method Size Ratio Date Time CRC-32 Name
-------- ------ ------- ----- ---- ---- ------ ----
0 Stored 0 0% 02-25-08 15:27 00000000 META-INF/
1104 Defl:N 484 56% 02-25-08 15:27 08a7166a META-INF/MANIFEST.MF
0 Stored 0 0% 02-25-08 15:27 00000000 lib/
1464 Defl:N 711 51% 02-25-08 15:27 064e2b8b about.html
615 Defl:N 321 48% 02-25-08 15:27 db21d870 about.ini
173 Defl:N 138 20% 02-25-08 15:27 b0129966 about.mappings
805 Defl:N 411 49% 02-25-08 15:27 e086838b about.properties
1574 Defl:N 1579 -0% 02-25-08 15:27 a7999f60 atl32.png
81634 Defl:N 79370 3% 02-25-08 15:27 c4308a93 lib/ATL-parser.jar
15754 Defl:N 14722 7% 02-25-08 15:27 502a0bb6 lib/org.eclipse.gmt.tcs.extractor_1.0.0.jar
22635 Defl:N 20502 9% 02-25-08 15:27 5b65b159 lib/org.eclipse.gmt.tcs.injector_1.0.0.jar
2414 Defl:N 2419 -0% 02-25-08 15:27 476ff164 modeling32.png
99 Defl:N 96 3% 02-25-08 15:27 78c0f422 plugin.properties
358 Defl:N 172 52% 02-25-08 15:27 8b135145 plugin.xml
0 Stored 0 0% 03-05-08 10:44 00000000 org/eclipse/
0 Stored 0 0% 03-05-08 10:44 00000000 org/eclipse/m2m/
0 Stored 0 0% 03-05-08 10:44 00000000 org/eclipse/m2m/atl/
0 Stored 0 0% 03-05-08 10:44 00000000 org/eclipse/m2m/atl/engine/
1121 Defl:N 595 47% 02-25-08 15:26 4c85b8ca org/eclipse/m2m/atl/engine/Atl2004Compiler.class
5665 Defl:N 2517 56% 02-25-08 15:26 4f966b17 org/eclipse/m2m/atl/engine/AtlCompiler.class
5734 Defl:N 2668 54% 02-25-08 15:26 94266f80 org/eclipse/m2m/atl/engine/AtlDefaultCompiler.class
12762 Defl:N 4846 62% 02-25-08 15:26 23e7c11f org/eclipse/m2m/atl/engine/AtlEMFModelHandler.class
1410 Defl:N 712 50% 02-25-08 15:26 df1b7770 org/eclipse/m2m/atl/engine/AtlEngineMessages.class
7112 Defl:N 3040 57% 02-25-08 15:26 bda571eb org/eclipse/m2m/atl/engine/AtlLauncher.class
5993 Defl:N 2405 60% 02-25-08 15:26 4abcab18 org/eclipse/m2m/atl/engine/AtlModelHandler.class
768 Defl:N 429 44% 02-25-08 15:26 5fe71435 org/eclipse/m2m/atl/engine/AtlNbCharFile$Line.class
3900 Defl:N 2134 45% 02-25-08 15:26 f1bc4946 org/eclipse/m2m/atl/engine/AtlNbCharFile.class
4574 Defl:N 1950 57% 02-25-08 15:26 adf9a4f3 org/eclipse/m2m/atl/engine/AtlParser.class
368 Defl:N 220 40% 02-25-08 15:26 3cbd4405 org/eclipse/m2m/atl/engine/AtlStandaloneCompiler.class
817 Defl:N 399 51% 02-25-08 15:26 768af777 org/eclipse/m2m/atl/engine/AtlSuperimposeModule$AtlSuperimpo seModuleException.class
8276 Defl:N 3894 53% 02-25-08 15:26 3c592aaa org/eclipse/m2m/atl/engine/AtlSuperimposeModule.class
492 Defl:N 311 37% 02-25-08 15:26 2c04ab77 org/eclipse/m2m/atl/engine/CompilerNotFoundException.class
1107 Defl:N 492 56% 02-25-08 15:26 b25cd3c3 org/eclipse/m2m/atl/engine/CompileTimeError.class
1136 Defl:N 586 48% 02-25-08 15:26 4fc40b39 org/eclipse/m2m/atl/engine/EnginePlugin.class
1150 Defl:N 565 51% 02-25-08 15:26 e931630a org/eclipse/m2m/atl/engine/MarkerMaker$1.class
7224 Defl:N 3210 56% 02-25-08 15:26 7d6c3127 org/eclipse/m2m/atl/engine/MarkerMaker.class
928 Defl:N 383 59% 02-25-08 15:26 0c852db9 org/eclipse/m2m/atl/engine/messages.properties
1403 Defl:N 631 55% 02-25-08 15:26 3bb857c5 org/eclipse/m2m/atl/engine/ProblemConverter.class
0 Stored 0 0% 03-05-08 10:44 00000000 org/eclipse/m2m/atl/engine/resources/
12477 Defl:N 1995 84% 02-25-08 15:26 e1f69958 org/eclipse/m2m/atl/engine/resources/ATL-WFR.asm
546043 Defl:N 24632 96% 02-25-08 15:26 5dc5f983 org/eclipse/m2m/atl/engine/resources/ATLToASMCompiler.asm
12056 Defl:N 1634 86% 02-25-08 15:26 ade9e89a org/eclipse/m2m/atl/engine/resources/atltypespropagation.asm
1415 Defl:N 459 68% 02-25-08 15:26 f9f084fe org/eclipse/m2m/atl/engine/resources/Problem.ecore
77286 Defl:N 10242 87% 02-25-08 15:26 8b261452 org/eclipse/m2m/atl/engine/resources/strings.asm
17545 Defl:N 2250 87% 02-25-08 15:26 03e0727f org/eclipse/m2m/atl/engine/resources/typeencoding.asm
0 Stored 0 0% 03-05-08 10:44 00000000 org/
0 Stored 0 0% 03-05-08 10:21 00000000 resources/
34495 Defl:N 2961 91% 02-25-08 15:26 f1bf3232 org/eclipse/m2m/atl/engine/resources/ATL-0.2.ecore
-------- ------- --- -------
901886 197085 78% 48 files

--------------000504040603070708060400--
Re: [ATL] NPE at org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel.loadASMEMFModel(ASMEMFModel.java:32 [message #75995 is a reply to message #75768] Thu, 06 March 2008 09:02 Go to previous message
Eclipse UserFriend
Originally posted by: r.c.ladan.tue.nl

Rene Ladan wrote:
> Rene Ladan wrote:
>> Rene Ladan wrote:
>>> Rene Ladan wrote:
>>>>
>>>> After testing a version from August 2007, I updated to todays HEAD.
>>>> I cleaned
>>>> any remaining files/directories having 'm2m' in their name from my
>>>> Eclipse directory
>>>> and reinstalled. Now the issue seems to be solved, but the call to
>>>> getDefault() now
>>>> seems to hang on something :
>>>>
>>>> this.amh = AtlModelHandler.getDefault(AtlModelHandler.AMH_EMF); //
>>>> FIXME hangs
>>>>
>>> If I single-step debug this in the Eclipse debugger, the debugger
>>> hangs at a
>>> seemingly random point somewhere in this statement (i.e. two
>>> successive debugging
>>> sessions yield two different hanging points).
>>>
>>> Could this be an Eclipse / EMF problem? Updating to the latest EMF
>>> (2.3.2 20080228)
>>> doesn't help.
>>>
>> I've attached two stack traces (one from right before executing the
>> statement,
>> one where it seems to hang (F5-F7-F7 in the debugger).
>>
>
> I've also discussed this a bit on the eclipse.platform newsgroup without
> any real results.
>
> Some observations:
>
> * if I debug the program with the source of org.eclipse.m2m.atl.engine
> opened, the program doesn't hang but crashes with the exception mentioned
> in the subject because it cannot find ATL-0.2.ecore, although this file is
> in org.eclipse.m2m.atl.engine/resources. It also cannot find the file if
> I put it in the a resources folder in the runtime root directory of the
> program.
>
> * Restarting Eclipse without the jar file in the plugins/ directory
> (forcing
> the program to use the source directly) doesn't produce the hang, but
> crashes
> the program because it cannot find ATL-0.2.ecore
>
> * Restarting Eclipse with ATL-0.2.ecore removed from the jar file and
> without
> any sources opened produces the hang instead of the file-not-found crash.
>
> * If I debug the program without the ATL sources opened, it always hangs
> (both with and without ATL-0.2.ecore in the jar file).
>
> * Pressing F5-F5-F7 in the debugger makes the debugger hang on a
> workbench.runEventLoop() method (iirc).
>
Some more observations:

* Exporting the org.m2m.atl.engine.vm plugin as-is works, but this way Eclipse
cannot resolve "import org.m2m.atl.engine.*" . Two solutions to this problem:
(a) Extract the embedded org.m2m.atl.engine.jar file from the generated
org.m2m.atl.engine_2.0.0-datetime.jar file
(b) Remove the embedded file from its containing jar file and replace it with
its contents (preserving the directory structure)
* When choosing solution (a), Eclipse doesn't hang on the
AtlModelHandler.getDefault() statement, but it gives an exception that it
cannot find ATL-0.2.ecore, and continues running the program with a null
metamodel.
* When choosing solution (b), Eclipse hangs on the AtlModelHandler.getDefault()
statement. I've added some println statements to the getDefault() method, when
using solution (b) it never makes it to here in AtlModelHandler::getDefault() :

public static AtlModelHandler getDefault(String repository) {
AtlModelHandler ret = (AtlModelHandler)defaultModelHandlers.get(repository);
if(ret == null) {
if(AMH_EMF.equals(repository)) {
System.out.println("AtlModelHandler::getDefault() : before");


Any ideas?

Regards,
Rene
>
Previous Topic:Applying ATL Transformation
Next Topic:[ATL] Changing the metaclass of an EObject
Goto Forum:
  


Current Time: Fri Apr 19 18:38:54 GMT 2024

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

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

Back to the top