Hello,
referring to your guide for Trasformation EMF/RDF (http://
code.google.com/a/eclipselabs.org/p/emftriple/wiki/RDFIzerGuide), at
this time I'm able to run the transformation from an EMF model (saved
into an xmi file) to a RDF but not the viceversa
I create a RDF file by
Model2RDF m2r = new Model2RDF();
Resource rdf = m2r.transform(resource, null);
and when perform the line
Resource model = r2m.transform(resource);
using the generated file, i have this exception:
java.lang.NullPointerException
at com.atl.common.utils.Preconditions.checkNotNull(Preconditions.java:
57)
at com.atl.common.models.Models.emptyModel(Models.java:93)
at com.atl.common.utils.Parameters.initOneOutput(Parameters.java:95)
at com.atl.common.trans.Transformations$1.apply(Transformations.java:
120)
at com.atl.common.trans.Transformations$1.apply(Transformations.java:
1)
at
com.atl.common.trans.Transformations.transform(Transformations.java:
60)
at com.emf4sw.rdf.transform.RDF2Model.transform(RDF2Model.java:44)
at
it.ietsistemi.tmseprob.model.trasformation.ModelTransformation.transformToEmf(ModelTransformation.java:
101)
at
it.ietsistemi.tmseprob.resource.SeprobResource.load(SeprobResource.java:
182)
at
it.ietsistemi.tmseprob.core.search.SeprobSearch.search(SeprobSearch.java:
36)
at
it.ietsistemi.tmseprob.core.search.SeprobSearch.find(SeprobSearch.java:
22)
at
it.ietsistemi.tmseprob.ui.common.model.view.BusinessBaseView.performSearch(BusinessBaseView.java:
367)
at
it.ietsistemi.tmseprob.ui.common.model.view.BusinessBaseView.widgetDefaultSelected(BusinessBaseView.java:
288)
at
it.ietsistemi.tmseprob.ui.common.model.view.BusinessBaseView.widgetSelected(BusinessBaseView.java:
374)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:
234)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:
4066)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:
2629)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2593)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2427)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:670)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:
332)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:
663)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:
149)
at
it.ietsistemi.tmseprob.application.SeprobApplication.start(SeprobApplication.java:
113)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:
196)
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(EclipseStarter.java:
369)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.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:619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
java.lang.NullPointerException
at com.atl.common.utils.Preconditions.checkNotNull(Preconditions.java:
57)
at com.atl.common.models.Models.emptyModel(Models.java:93)
at com.atl.common.utils.Parameters.initOneOutput(Parameters.java:95)
at com.atl.common.trans.Transformations$1.apply(Transformations.java:
120)
at com.atl.common.trans.Transformations$1.apply(Transformations.java:
1)
at
com.atl.common.trans.Transformations.transform(Transformations.java:
60)
at com.emf4sw.rdf.transform.RDF2Model.transform(RDF2Model.java:44)
at
it.ietsistemi.tmseprob.model.trasformation.ModelTransformation.transformToEmf(ModelTransformation.java:
101)
at
it.ietsistemi.tmseprob.resource.SeprobResource.load(SeprobResource.java:
182)
at
it.ietsistemi.tmseprob.core.search.SeprobSearch.search(SeprobSearch.java:
36)
at
it.ietsistemi.tmseprob.core.search.SeprobSearch.find(SeprobSearch.java:
22)
at
it.ietsistemi.tmseprob.ui.common.model.view.BusinessBaseView.performSearch(BusinessBaseView.java:
367)
at
it.ietsistemi.tmseprob.ui.common.model.view.BusinessBaseView.widgetDefaultSelected(BusinessBaseView.java:
288)
at
it.ietsistemi.tmseprob.ui.common.model.view.BusinessBaseView.widgetSelected(BusinessBaseView.java:
374)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:
234)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:
4066)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:
2629)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2593)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2427)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:670)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:
332)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:
663)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:
149)
at
it.ietsistemi.tmseprob.application.SeprobApplication.start(SeprobApplication.java:
113)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:
196)
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(EclipseStarter.java:
369)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.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:619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
I read the issue 26, referred to an example and the RDFIzer
https://code.google.com/a/eclipselabs.org/p/emftriple/issues/detail?id=26#makechanges
What can i do to fix the exception?
Thanks
Domenico Pio Novelli