Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] AtlEMFModelHandler.save() NPE
[ATL] AtlEMFModelHandler.save() NPE [message #107268] Thu, 25 June 2009 21:17 Go to next message
Juan Pedro Silva is currently offline Juan Pedro SilvaFriend
Messages: 258
Registered: July 2009
Senior Member
Hi everybody, I'm trying to use some ATL transformations from within
other plugin.
I've managed to solve most problems, but now I'm facing one that is
going deep in the debug stack.
I get a NPE when doing a AtlEMFModelHandler.save() (the actual
transformation worked with no errors).
Based on news://news.eclipse.org:119/fik8ho$vre$1@build.eclipse.org I
figured out it maybe that I'm using a relative path in the save, but I
tried a absolute path and got the same error.
I'm attaching the stack trace below.
Can anyone give me any suggestions?
Thank you for your answers.
Regards,
Juan Pedro



java.lang.NullPointerException
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eURIFragmentSegm ent(BasicEObjectImpl.java:295)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.getURIFragm ent(ResourceImpl.java:678)
at
org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.getURIFragmen t(XMLResourceImpl.java:423)
at
org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.getURIFragment( XMLHelperImpl.java:718)
at
org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.getIDREF(XMLHel perImpl.java:753)
at
org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveIDRefMany(XML SaveImpl.java:1985)
at
org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveFeatures(XMLS aveImpl.java:1337)
at
org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElementID(XML SaveImpl.java:2667)
at
org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElement(XMLSa veImpl.java:1156)
at
org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElement(XMLSa veImpl.java:1017)
at
org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveContainedMany (XMLSaveImpl.java:2368)
at
org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveFeatures(XMLS aveImpl.java:1515)
at
org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElementID(XML SaveImpl.java:2667)
at
org.eclipse.emf.ecore.xmi.impl.XMISaveImpl.writeTopObjects(X MISaveImpl.java:90)
at
org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.traverse(XMLSaveI mpl.java:592)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.save(XMLSaveImpl. java:256)
at
org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doSave(XMLRes ourceImpl.java:206)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(Resour ceImpl.java:1406)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(Resour ceImpl.java:993)
at
org.eclipse.m2m.atl.drivers.emf4atl.EMFModelLoader.realSave( EMFModelLoader.java:354)
at org.eclipse.m2m.atl.engine.vm.ModelLoader.save(ModelLoader.j ava:204)
at
itecban.stras.sips.utils.ATLTransformationLauncher.uml2iBuil der(ATLTransformationLauncher.java:192)
at
itecban.stras.cheatsheets.sips.handlers.UML2iBuilderCommandH andler.execute(UML2iBuilderCommandHandler.java:48)
at
org.eclipse.ui.internal.handlers.HandlerProxy.execute(Handle rProxy.java:294)
at org.eclipse.core.commands.Command.executeWithChecks(Command. java:476)
at
org.eclipse.core.commands.ParameterizedCommand.executeWithCh ecks(ParameterizedCommand.java:508)
at
org.eclipse.ui.internal.handlers.HandlerService.executeComma nd(HandlerService.java:169)
at
org.eclipse.ui.internal.handlers.SlaveHandlerService.execute Command(SlaveHandlerService.java:241)
at
org.eclipse.ui.menus.CommandContributionItem.handleWidgetSel ection(CommandContributionItem.java:770)
at
org.eclipse.ui.menus.CommandContributionItem.access$10(Comma ndContributionItem.java:756)
at
org.eclipse.ui.menus.CommandContributionItem$5.handleEvent(C ommandContributionItem.java:746)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3880)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3473)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2405)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 21)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:332)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:493)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:113)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:194)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:368)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
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: 559)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
Re: [ATL] AtlEMFModelHandler.save() NPE [message #107309 is a reply to message #107268] Fri, 26 June 2009 10:04 Go to previous message
Juan Pedro Silva is currently offline Juan Pedro SilvaFriend
Messages: 258
Registered: July 2009
Senior Member
Disregard, this, I was able to make it work.
I believe it was a problem of the model, although there were no errors
during the transformation.
Regards,
Juan Pedro

Juan Pedro Silva escribió:
> Hi everybody, I'm trying to use some ATL transformations from within
> other plugin.
> I've managed to solve most problems, but now I'm facing one that is
> going deep in the debug stack.
> I get a NPE when doing a AtlEMFModelHandler.save() (the actual
> transformation worked with no errors).
> Based on news://news.eclipse.org:119/fik8ho$vre$1@build.eclipse.org I
> figured out it maybe that I'm using a relative path in the save, but I
> tried a absolute path and got the same error.
> I'm attaching the stack trace below.
> Can anyone give me any suggestions?
> Thank you for your answers.
> Regards,
> Juan Pedro
>
>
>
> java.lang.NullPointerException
> at
> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eURIFragmentSegm ent(BasicEObjectImpl.java:295)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.getURIFragm ent(ResourceImpl.java:678)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.getURIFragmen t(XMLResourceImpl.java:423)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.getURIFragment( XMLHelperImpl.java:718)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.getIDREF(XMLHel perImpl.java:753)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveIDRefMany(XML SaveImpl.java:1985)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveFeatures(XMLS aveImpl.java:1337)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElementID(XML SaveImpl.java:2667)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElement(XMLSa veImpl.java:1156)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElement(XMLSa veImpl.java:1017)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveContainedMany (XMLSaveImpl.java:2368)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveFeatures(XMLS aveImpl.java:1515)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElementID(XML SaveImpl.java:2667)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMISaveImpl.writeTopObjects(X MISaveImpl.java:90)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.traverse(XMLSaveI mpl.java:592)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.save(XMLSaveImpl. java:256)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doSave(XMLRes ourceImpl.java:206)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(Resour ceImpl.java:1406)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(Resour ceImpl.java:993)
>
> at
> org.eclipse.m2m.atl.drivers.emf4atl.EMFModelLoader.realSave( EMFModelLoader.java:354)
>
> at
> org.eclipse.m2m.atl.engine.vm.ModelLoader.save(ModelLoader.j ava:204)
> at
> itecban.stras.sips.utils.ATLTransformationLauncher.uml2iBuil der(ATLTransformationLauncher.java:192)
>
> at
> itecban.stras.cheatsheets.sips.handlers.UML2iBuilderCommandH andler.execute(UML2iBuilderCommandHandler.java:48)
>
> at
> org.eclipse.ui.internal.handlers.HandlerProxy.execute(Handle rProxy.java:294)
>
> at
> org.eclipse.core.commands.Command.executeWithChecks(Command. java:476)
> at
> org.eclipse.core.commands.ParameterizedCommand.executeWithCh ecks(ParameterizedCommand.java:508)
>
> at
> org.eclipse.ui.internal.handlers.HandlerService.executeComma nd(HandlerService.java:169)
>
> at
> org.eclipse.ui.internal.handlers.SlaveHandlerService.execute Command(SlaveHandlerService.java:241)
>
> at
> org.eclipse.ui.menus.CommandContributionItem.handleWidgetSel ection(CommandContributionItem.java:770)
>
> at
> org.eclipse.ui.menus.CommandContributionItem.access$10(Comma ndContributionItem.java:756)
>
> at
> org.eclipse.ui.menus.CommandContributionItem$5.handleEvent(C ommandContributionItem.java:746)
>
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
> at
> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3880)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3473)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2405)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 21)
> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:332)
>
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:493)
>
> at
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:113)
>
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:194)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:368)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
>
> 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: 559)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
Previous Topic:NoSuchMethodError: org.eclipse.m2m.atl.core.emf.EMFInjector.inject()
Next Topic:How to start QVT
Goto Forum:
  


Current Time: Sun Jan 19 16:20:08 GMT 2025

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

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

Back to the top