Git Product home page Git Product logo

emf-rest's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

emf-rest's Issues

NullPointerException when generating code

Hello,

first of all thanks for the effort you put into emf-rest. It could be very helpful for us. We want to create web front-ends for our legacy applications whose configuration data is modeled with EMF.

So I followed the instructions at http://emf-rest.com/install.html to get the sample running on my machine:

  • Downloaded the J2EE Eclipse Kepler distribution (eclipse-jee-kepler-R-win32-x86_64)
  • Installed the emf-rest plugins from your update site
  • Created a new Dynamic Web Project
  • created a folder called "model" and put your example model (downloaded from http://emf-rest.com/Example.ecore) into the folder

When I now do a right click on Example.ecore / EMF-REST / Generate All + Copy Libraries nothing happens.

In the Eclipse console log I get the following output:

!ENTRY org.eclipse.ui 4 0 2013-10-21 10:11:11.078
!MESSAGE Unhandled event loop exception
!STACK 0
org.eclipse.e4.core.di.InjectionException: java.lang.NullPointerException
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:63)
at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:243)
at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:224)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:167)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:499)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:213)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:85
0)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.handleWidgetSelection(HandledContributionIt
em.java:743)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.access$7(HandledContributionItem.java:727)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem$4.handleEvent(HandledContributionItem.java:
662)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:138)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:610)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
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:354)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
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:636)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
Caused by: java.lang.NullPointerException
at com.emf.rest.eclipse.GenerateRestEMFCommand.execute(GenerateRestEMFCommand.java:118)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:290)
at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
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.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
... 37 more

Any suggestions what I could do to fix this issue?

Regards,
Reinhold

emf-rest-clipboard01
emf-rest-clipboard02

NPE

Hello

While trying to generate from the below .ecore model no code was generated, and the following exceptions occurred:

Starting MTC: MTC
Setting variable [output] value to: /home/anton/workspaces/emfjson/ifmlrest/src/main/java
Setting variable [ecore_file] value to: /home/anton/workspaces/emfjson/ifmlrest/src/main/resources/IFML.ecore
Setting variable [genModel_file] value to: /home/anton/workspaces/emfjson/ifmlrest/src/main/resources/IFML.genmodel
Setting variable [output_js] value to: /home/anton/workspaces/emfjson/ifmlrest/src/main/webapp/scripts
Setting variable [pluginName] value to: ifmlrest
Setting variable [foreignModel] value to: IFML.ecore
Setting variable [modelName] value to: 
Setting variable [output_pom] value to: /home/anton/workspaces/emfjson/ifmlrest
Initializing Model Environments.
Finished Model Environments Initialization.
Model ready : Ecore Fully Annotated(/home/anton/workspaces/emfjson/ifmlrest/src/main/resources/IFML.ecore)
Executing Ecore -> JavaScript API transformation
Executing Ecore->Genmodel transformation
Executing Default Index transformation
Executing pom transformation
Exception executing Default Index transformation
java.lang.NullPointerException
	at com.emf.rest.standalone.PluginResourceLocator.getTarget(PluginResourceLocator.java:188)
	at com.mtcflow.engine.egl.EGLTransformationExecutor$1.createModule(EGLTransformationExecutor.java:51)
	at com.mtcflow.engine.epsilon.common.EpsilonExecutor.execute(EpsilonExecutor.java:93)
	at com.mtcflow.engine.egl.EGLTransformationExecutor.executeTransformation(EGLTransformationExecutor.java:88)
	at com.mtcflow.engine.core.MTCChoreographer$1.run(MTCChoreographer.java:628)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

pom transformation finished.
Ecore -> JavaScript API transformation finished.
Model ready : GenModel(/home/anton/workspaces/emfjson/ifmlrest/src/main/resources/IFML.genmodel)
Ecore->Genmodel transformation finished.
Executing GenerateEMF transformation
Exception executing GenerateEMF transformation
java.lang.NullPointerException
	at org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl$DependencyHelper.handle(GenPackageImpl.java:2472)
	at org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl$DependencyHelper.<init>(GenPackageImpl.java:2404)
	at org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.prepareCache(GenPackageImpl.java:3202)
	at org.eclipse.emf.codegen.ecore.genmodel.generator.GenPackageGeneratorAdapter.doPreGenerate(GenPackageGeneratorAdapter.java:177)
	at org.eclipse.emf.codegen.ecore.generator.AbstractGeneratorAdapter.preGenerate(AbstractGeneratorAdapter.java:283)
	at org.eclipse.emf.codegen.ecore.generator.Generator.generate(Generator.java:700)
	at org.eclipse.emf.codegen.ecore.generator.Generator.generate(Generator.java:619)
	at com.emf.rest.EMFGenerator.executeTransformation(EMFGenerator.java:50)
	at com.mtcflow.engine.core.MTCChoreographer$1.run(MTCChoreographer.java:628)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)


Model

<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="IFML" nsURI="http://www.omg.org/spec/20130218" nsPrefix="IFML">
  <eSubpackages name="DataTypes" nsURI="http://www.omg.org/spec/20130218/data" nsPrefix="data">
    <eClassifiers xsi:type="ecore:EEnum" name="Direction">
      <eLiterals name="in"/>
      <eLiterals name="out"/>
      <eLiterals name="inout"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EEnum" name="SystemEventType">
      <eLiterals name="time"/>
      <eLiterals name="specialCondition"/>
      <eLiterals name="actionCompletion"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EEnum" name="ContextVariableScope">
      <eLiterals name="ApplicationScope"/>
      <eLiterals name="SessionScope"/>
      <eLiterals name="ViewContainerScope"/>
    </eClassifiers>
  </eSubpackages>
  <eSubpackages name="Core" nsURI="http://www.omg.org/spec/20130218/core" nsPrefix="core">
    <eClassifiers xsi:type="ecore:EClass" name="InteractionFlow" abstract="true" eSuperTypes="#//Core/InteractionFlowModelElement">
      <eStructuralFeatures xsi:type="ecore:EReference" name="parameterBindingGroup"
          ordered="false" eType="#//Core/ParameterBindingGroup" containment="true"/>
      <eStructuralFeatures xsi:type="ecore:EReference" name="sourceInteractionFlowElement"
          ordered="false" lowerBound="1" eType="#//Core/InteractionFlowElement" eOpposite="#//Core/InteractionFlowElement/outInteractionFlows"/>
      <eStructuralFeatures xsi:type="ecore:EReference" name="targetInteractionFlowElement"
          ordered="false" lowerBound="1" eType="#//Core/InteractionFlowElement" eOpposite="#//Core/InteractionFlowElement/inInteractionFlows"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="InteractionFlowExpression" eSuperTypes="#//Core/Expression">
      <eStructuralFeatures xsi:type="ecore:EReference" name="interactionFlow" ordered="false"
          lowerBound="2" upperBound="-1" eType="#//Core/InteractionFlow"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="SystemEvent" eSuperTypes="#//Core/CatchingEvent">
      <eStructuralFeatures xsi:type="ecore:EReference" name="triggeringExpressions"
          ordered="false" upperBound="-1" eType="#//Core/Expression" containment="true"/>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" ordered="false"
          lowerBound="1" eType="#//DataTypes/SystemEventType"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="ParameterBinding" eSuperTypes="#//Core/InteractionFlowModelElement">
      <eStructuralFeatures xsi:type="ecore:EReference" name="sourceParameter" ordered="false"
          lowerBound="1" eType="#//Core/IFMLParameter"/>
      <eStructuralFeatures xsi:type="ecore:EReference" name="targetParameter" ordered="false"
          lowerBound="1" eType="#//Core/IFMLParameter"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="ActionEvent" eSuperTypes="#//Core/CatchingEvent"/>
    <eClassifiers xsi:type="ecore:EClass" name="DomainModel" eSuperTypes="#//Core/NamedElement">
      <eStructuralFeatures xsi:type="ecore:EReference" name="domainElements" ordered="false"
          upperBound="-1" eType="#//Core/DomainElement" containment="true"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="NamedElement" abstract="true" eSuperTypes="#//Core/Element">
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" ordered="false"
          lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="PortDefinition" eSuperTypes="#//Core/InteractionFlowElement">
      <eStructuralFeatures xsi:type="ecore:EReference" name="ports" ordered="false"
          upperBound="-1" eType="#//Core/IFMLPort" eOpposite="#//Core/IFMLPort/portDefinition"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="ContentBinding" abstract="true" eSuperTypes="#//Core/ViewComponentPart">
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="uniformResourceIdentifier"
          ordered="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="ViewElement" eSuperTypes="#//Core/InteractionFlowElement">
      <eStructuralFeatures xsi:type="ecore:EReference" name="viewElementEvents" ordered="false"
          upperBound="-1" eType="#//Core/ViewElementEvent" containment="true"/>
      <eStructuralFeatures xsi:type="ecore:EReference" name="activationExpression"
          ordered="false" eType="#//Core/ActivationExpression"/>
      <eStructuralFeatures xsi:type="ecore:EReference" name="viewContainer" ordered="false"
          eType="#//Core/ViewContainer" eOpposite="#//Core/ViewContainer/viewElements"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="Expression" abstract="true" eSuperTypes="#//Core/InteractionFlowModelElement">
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="language" ordered="false"
          lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="body" ordered="false"
          lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="DynamicBehavior" eSuperTypes="#//Core/ContentBinding">
      <eStructuralFeatures xsi:type="ecore:EReference" name="behavioralFeatureConcept"
          ordered="false" eType="#//Core/BehavioralFeatureConcept" eOpposite="#//Core/BehavioralFeatureConcept/dynamicBehavior"/>
      <eStructuralFeatures xsi:type="ecore:EReference" name="behaviorConcept" ordered="false"
          eType="#//Core/BehaviorConcept" eOpposite="#//Core/BehaviorConcept/dynamicBehavior"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="Viewpoint" eSuperTypes="#//Core/NamedElement">
      <eStructuralFeatures xsi:type="ecore:EReference" name="interactionFlowModelElements"
          ordered="false" upperBound="-1" eType="#//Core/InteractionFlowModelElement"/>
      <eStructuralFeatures xsi:type="ecore:EReference" name="context" ordered="false"
          lowerBound="1" eType="#//Core/Context"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="DataFlow" eSuperTypes="#//Core/InteractionFlow"/>
    <eClassifiers xsi:type="ecore:EClass" name="ViewComponentPart" eSuperTypes="#//Core/InteractionFlowElement">
      <eStructuralFeatures xsi:type="ecore:EReference" name="viewElementEvents" ordered="false"
          upperBound="-1" eType="#//Core/ViewElementEvent" containment="true"/>
      <eStructuralFeatures xsi:type="ecore:EReference" name="activationExpression"
          ordered="false" eType="#//Core/ActivationExpression"/>
      <eStructuralFeatures xsi:type="ecore:EReference" name="parentViewComponentPart"
          ordered="false" eType="#//Core/ViewComponentPart" eOpposite="#//Core/ViewComponentPart/subViewComponentParts"/>
      <eStructuralFeatures xsi:type="ecore:EReference" name="subViewComponentParts"
          ordered="false" upperBound="-1" eType="#//Core/ViewComponentPart" containment="true"
          eOpposite="#//Core/ViewComponentPart/parentViewComponentPart"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="ViewContainer" eSuperTypes="#//Core/ViewElement">
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="isLandmark" ordered="false"
          lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="isDefault" ordered="false"
          lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="isXOR" ordered="false"
          lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
      <eStructuralFeatures xsi:type="ecore:EReference" name="viewElements" ordered="false"
          upperBound="-1" eType="#//Core/ViewElement" containment="true" eOpposite="#//Core/ViewElement/viewContainer"/>
      <eStructuralFeatures xsi:type="ecore:EReference" name="actions" ordered="false"
          upperBound="-1" eType="#//Core/IFMLAction" containment="true" eOpposite="#//Core/IFMLAction/viewContainer"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="ActivationExpression" eSuperTypes="#//Core/BooleanExpression"/>
    <eClassifiers xsi:type="ecore:EClass" name="InteractionFlowModel" eSuperTypes="#//Core/NamedElement">
      <eStructuralFeatures xsi:type="ecore:EReference" name="interactionFlowModelElements"
          ordered="false" upperBound="-1" eType="#//Core/InteractionFlowModelElement"
          containment="true"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="ContextDimension" eSuperTypes="#//Core/NamedElement"/>
    <eClassifiers xsi:type="ecore:EClass" name="IFMLModel" eSuperTypes="#//Core/NamedElement">
      <eStructuralFeatures xsi:type="ecore:EReference" name="interactionFlowModel"
          ordered="false" lowerBound="1" eType="#//Core/InteractionFlowModel" containment="true"/>
      <eStructuralFeatures xsi:type="ecore:EReference" name="domainModel" ordered="false"
          lowerBound="1" eType="#//Core/DomainModel" containment="true"/>
      <eStructuralFeatures xsi:type="ecore:EReference" name="interactionFlowModelViewpoint"
          ordered="false" upperBound="-1" eType="#//Core/Viewpoint" containment="true"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="ModuleDefinition" eSuperTypes="#//Core/ModularizationElement">
      <eStructuralFeatures xsi:type="ecore:EReference" name="inputPorts" ordered="false"
          upperBound="-1" eType="#//Core/PortDefinition" containment="true"/>
      <eStructuralFeatures xsi:type="ecore:EReference" name="outputPorts" ordered="false"
          upperBound="-1" eType="#//Core/PortDefinition" containment="true"/>
      <eStructuralFeatures xsi:type="ecore:EReference" name="interactionFlowModelElement"
          ordered="false" lowerBound="1" upperBound="-1" eType="#//Core/InteractionFlowModelElement"
          containment="true"/>
      <eStructuralFeatures xsi:type="ecore:EReference" name="modules" ordered="false"
          upperBound="-1" eType="#//Core/IFMLModule" eOpposite="#//Core/IFMLModule/moduleDefinition"/>
      <eStructuralFeatures xsi:type="ecore:EReference" name="activityConcept" ordered="false"
          eType="#//Core/ActivityConcept" eOpposite="#//Core/ActivityConcept/moduleDefinition"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="BooleanExpression" eSuperTypes="#//Core/Expression"/>
    <eClassifiers xsi:type="ecore:EClass" name="InteractionFlowElement" abstract="true"
        eSuperTypes="#//Core/NamedElement #//Core/InteractionFlowModelElement">
      <eStructuralFeatures xsi:type="ecore:EReference" name="parameters" ordered="false"
          upperBound="-1" eType="#//Core/IFMLParameter" containment="true"/>
      <eStructuralFeatures xsi:type="ecore:EReference" name="outInteractionFlows"
          ordered="false" upperBound="-1" eType="#//Core/InteractionFlow" containment="true"
          eOpposite="#//Core/InteractionFlow/sourceInteractionFlowElement"/>
      <eStructuralFeatures xsi:type="ecore:EReference" name="inInteractionFlows" ordered="false"
          upperBound="-1" eType="#//Core/InteractionFlow" eOpposite="#//Core/InteractionFlow/targetInteractionFlowElement"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="IFMLAction" eSuperTypes="#//Core/InteractionFlowElement #//Core/NamedElement">
      <eStructuralFeatures xsi:type="ecore:EReference" name="actionEvents" ordered="false"
          upperBound="-1" eType="#//Core/ActionEvent" containment="true"/>
      <eStructuralFeatures xsi:type="ecore:EReference" name="dynamicBehavior" ordered="false"
          eType="#//Core/DynamicBehavior"/>
      <eStructuralFeatures xsi:type="ecore:EReference" name="viewContainer" ordered="false"
          eType="#//Core/ViewContainer" eOpposite="#//Core/ViewContainer/actions"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="NavigationFlow" eSuperTypes="#//Core/InteractionFlow"/>
    <eClassifiers xsi:type="ecore:EClass" name="ParameterBindingGroup" eSuperTypes="#//Core/InteractionFlowModelElement">
      <eStructuralFeatures xsi:type="ecore:EReference" name="parameterBindings" ordered="false"
          lowerBound="1" upperBound="-1" eType="#//Core/ParameterBinding" containment="true"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="Element" abstract="true">
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="id" ordered="false" lowerBound="1"
          eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
      <eStructuralFeatures xsi:type="ecore:EReference" name="constraints" ordered="false"
          upperBound="-1" eType="#//Core/Constraint" containment="true"/>
      <eStructuralFeatures xsi:type="ecore:EReference" name="annotations" ordered="false"
          upperBound="-1" eType="#//Core/Annotation" containment="true"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="Constraint" eSuperTypes="#//Core/BooleanExpression"/>
    <eClassifiers xsi:type="ecore:EClass" name="ViewComponent" eSuperTypes="#//Core/ViewElement">
      <eStructuralFeatures xsi:type="ecore:EReference" name="viewComponentParts" ordered="false"
          upperBound="-1" eType="#//Core/ViewComponentPart" containment="true"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="IFMLParameter" eSuperTypes="#//Core/InteractionFlowModelElement #//Core/NamedElement">
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="direction" ordered="false"
          lowerBound="1" eType="#//DataTypes/Direction" defaultValueLiteral="in"/>
      <eStructuralFeatures xsi:type="ecore:EReference" name="defaultValue" ordered="false"
          eType="#//Core/Expression"/>
      <eStructuralFeatures xsi:type="ecore:EReference" name="type" eType="ecore:EClass ../../org.eclipse.uml2.uml/model/UML.ecore#//Type"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="DataBinding" eSuperTypes="#//Core/ContentBinding">
      <eStructuralFeatures xsi:type="ecore:EReference" name="conditionalExpression"
          ordered="false" upperBound="-1" eType="#//Core/ConditionalExpression" containment="true"/>
      <eStructuralFeatures xsi:type="ecore:EReference" name="visualizationAttribute"
          ordered="false" upperBound="-1" eType="#//Core/VisualizationAttribute" containment="true"/>
      <eStructuralFeatures xsi:type="ecore:EReference" name="dataContextVariables"
          ordered="false" upperBound="-1" eType="#//Core/DataContextVariable" eOpposite="#//Core/DataContextVariable/dataBinding"/>
      <eStructuralFeatures xsi:type="ecore:EReference" name="domainConcept" ordered="false"
          eType="#//Core/DomainConcept" eOpposite="#//Core/DomainConcept/dataBinding"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="ConditionalExpression" eSuperTypes="#//Core/Expression #//Core/ViewComponentPart"/>
    <eClassifiers xsi:type="ecore:EClass" name="Context" eSuperTypes="#//Core/Element">
      <eStructuralFeatures xsi:type="ecore:EReference" name="contextDimensions" ordered="false"
          upperBound="-1" eType="#//Core/ContextDimension" containment="true"/>
      <eStructuralFeatures xsi:type="ecore:EReference" name="contextVariables" ordered="false"
          upperBound="-1" eType="#//Core/ContextVariable" containment="true" eOpposite="#//Core/ContextVariable/context"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="VisualizationAttribute" eSuperTypes="#//Core/ViewComponentPart">
      <eStructuralFeatures xsi:type="ecore:EReference" name="featureConcept" ordered="false"
          lowerBound="1" eType="#//Core/FeatureConcept"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="Event" eSuperTypes="#//Core/InteractionFlowElement">
      <eStructuralFeatures xsi:type="ecore:EReference" name="activationExpression"
          ordered="false" eType="#//Core/ActivationExpression"/>
      <eStructuralFeatures xsi:type="ecore:EReference" name="interactionFlowExpression"
          ordered="false" eType="#//Core/InteractionFlowExpression" containment="true"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="InteractionFlowModelElement" abstract="true"
        eSuperTypes="#//Core/Element"/>
    <eClassifiers xsi:type="ecore:EClass" name="ViewElementEvent" eSuperTypes="#//Core/CatchingEvent">
      <eStructuralFeatures xsi:type="ecore:EReference" name="viewElement" ordered="false"
          lowerBound="1" eType="#//Core/ViewElement"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="Annotation">
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="text" ordered="false"
          lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="ModulePackage" eSuperTypes="#//Core/ModularizationElement">
      <eStructuralFeatures xsi:type="ecore:EReference" name="modularizationElements"
          ordered="false" upperBound="-1" eType="#//Core/ModularizationElement" containment="true"
          eOpposite="#//Core/ModularizationElement/modulePackage"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="ModularizationElement" eSuperTypes="#//Core/NamedElement #//Core/InteractionFlowModelElement">
      <eStructuralFeatures xsi:type="ecore:EReference" name="modulePackage" ordered="false"
          eType="#//Core/ModulePackage" eOpposite="#//Core/ModulePackage/modularizationElements"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="IFMLModule" eSuperTypes="#//Core/NamedElement #//Core/InteractionFlowElement">
      <eStructuralFeatures xsi:type="ecore:EReference" name="moduleDefinition" ordered="false"
          lowerBound="1" eType="#//Core/ModuleDefinition" eOpposite="#//Core/ModuleDefinition/modules"/>
      <eStructuralFeatures xsi:type="ecore:EReference" name="ports" ordered="false"
          upperBound="-1" eType="#//Core/IFMLPort" eOpposite="#//Core/IFMLPort/module"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="IFMLPort" eSuperTypes="#//Core/InteractionFlowElement">
      <eStructuralFeatures xsi:type="ecore:EReference" name="portDefinition" ordered="false"
          lowerBound="1" eType="#//Core/PortDefinition" eOpposite="#//Core/PortDefinition/ports"/>
      <eStructuralFeatures xsi:type="ecore:EReference" name="module" ordered="false"
          lowerBound="1" eType="#//Core/IFMLModule" eOpposite="#//Core/IFMLModule/ports"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="CatchingEvent" eSuperTypes="#//Core/Event"/>
    <eClassifiers xsi:type="ecore:EClass" name="ThrowingEvent" eSuperTypes="#//Core/Event"/>
    <eClassifiers xsi:type="ecore:EClass" name="BPMNActivityConcept" eSuperTypes="#//Core/ActivityConcept"/>
    <eClassifiers xsi:type="ecore:EClass" name="ContextVariable" eSuperTypes="#//Core/NamedElement">
      <eStructuralFeatures xsi:type="ecore:EReference" name="context" ordered="false"
          lowerBound="1" eType="#//Core/Context" eOpposite="#//Core/Context/contextVariables"/>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="scope" ordered="false"
          lowerBound="1" eType="#//DataTypes/ContextVariableScope"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="SimpleContextVariable" eSuperTypes="#//Core/ContextVariable"/>
    <eClassifiers xsi:type="ecore:EClass" name="DataContextVariable" eSuperTypes="#//Core/ContextVariable">
      <eStructuralFeatures xsi:type="ecore:EReference" name="dataBinding" ordered="false"
          lowerBound="1" eType="#//Core/DataBinding" eOpposite="#//Core/DataBinding/dataContextVariables"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="DomainConcept" eSuperTypes="#//Core/DomainElement">
      <eStructuralFeatures xsi:type="ecore:EReference" name="dataBinding" ordered="false"
          eType="#//Core/DataBinding" eOpposite="#//Core/DataBinding/domainConcept"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="FeatureConcept" eSuperTypes="#//Core/DomainElement">
      <eStructuralFeatures xsi:type="ecore:EReference" name="visualizationAttribute"
          ordered="false" eType="#//Core/VisualizationAttribute"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="BehaviorConcept" eSuperTypes="#//Core/DomainElement">
      <eStructuralFeatures xsi:type="ecore:EReference" name="dynamicBehavior" ordered="false"
          eType="#//Core/DynamicBehavior" eOpposite="#//Core/DynamicBehavior/behaviorConcept"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="BehavioralFeatureConcept" eSuperTypes="#//Core/DomainElement">
      <eStructuralFeatures xsi:type="ecore:EReference" name="dynamicBehavior" ordered="false"
          lowerBound="1" eType="#//Core/DynamicBehavior" eOpposite="#//Core/DynamicBehavior/behavioralFeatureConcept"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="UMLBehavior" eSuperTypes="#//Core/BehaviorConcept">
      <eStructuralFeatures xsi:type="ecore:EReference" name="behavior" ordered="false"
          eType="ecore:EClass ../../org.eclipse.uml2.uml/model/UML.ecore#//Behavior"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="UMLBehavioralFeature" eSuperTypes="#//Core/BehavioralFeatureConcept">
      <eStructuralFeatures xsi:type="ecore:EReference" name="behavioralFeature" ordered="false"
          eType="ecore:EClass ../../org.eclipse.uml2.uml/model/UML.ecore#//BehavioralFeature"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="UMLDomainConcept" eSuperTypes="#//Core/DomainConcept">
      <eStructuralFeatures xsi:type="ecore:EReference" name="classifier" ordered="false"
          eType="ecore:EClass ../../org.eclipse.uml2.uml/model/UML.ecore#//Classifier"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="UMLStructuralFeature" eSuperTypes="#//Core/FeatureConcept">
      <eStructuralFeatures xsi:type="ecore:EReference" name="structuralFeature" ordered="false"
          eType="ecore:EClass ../../org.eclipse.uml2.uml/model/UML.ecore#//StructuralFeature"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="ActivityConcept" eSuperTypes="#//Core/NamedElement">
      <eStructuralFeatures xsi:type="ecore:EReference" name="moduleDefinition" ordered="false"
          lowerBound="1" eType="#//Core/ModuleDefinition" eOpposite="#//Core/ModuleDefinition/activityConcept"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="DomainElement" eSuperTypes="#//Core/NamedElement"/>
  </eSubpackages>
  <eSubpackages name="Extensions" nsURI="http://www.omg.org/spec/20130218/ext" nsPrefix="ext">
    <eClassifiers xsi:type="ecore:EClass" name="OnSubmitEvent" eSuperTypes="#//Core/ViewElementEvent"/>
    <eClassifiers xsi:type="ecore:EClass" name="ValidationRule" eSuperTypes="#//Core/Constraint"/>
    <eClassifiers xsi:type="ecore:EClass" name="List" eSuperTypes="#//Core/ViewComponent">
      <eStructuralFeatures xsi:type="ecore:EReference" name="selectEvent" ordered="false"
          upperBound="-1" eType="#//Extensions/OnSelectEvent" containment="true"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="Position" eSuperTypes="#//Core/ContextDimension"/>
    <eClassifiers xsi:type="ecore:EClass" name="UserRole" eSuperTypes="#//Core/ContextDimension"/>
    <eClassifiers xsi:type="ecore:EClass" name="IFMLSlot" eSuperTypes="#//Core/ViewComponentPart #//Core/IFMLParameter"/>
    <eClassifiers xsi:type="ecore:EClass" name="OnSelectEvent" eSuperTypes="#//Core/ViewElementEvent"/>
    <eClassifiers xsi:type="ecore:EClass" name="Field" abstract="true" eSuperTypes="#//Core/ViewComponentPart #//Core/IFMLParameter"/>
    <eClassifiers xsi:type="ecore:EClass" name="Form" eSuperTypes="#//Core/ViewComponent"/>
    <eClassifiers xsi:type="ecore:EClass" name="Device" eSuperTypes="#//Core/ContextDimension"/>
    <eClassifiers xsi:type="ecore:EClass" name="SelectionField" eSuperTypes="#//Extensions/Field">
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="isMultiSelection" ordered="false"
          lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="SimpleField" eSuperTypes="#//Extensions/Field"/>
    <eClassifiers xsi:type="ecore:EClass" name="Details" eSuperTypes="#//Core/ViewComponent"/>
    <eClassifiers xsi:type="ecore:EClass" name="IFMLWindow" eSuperTypes="#//Core/ViewContainer">
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="isModal" ordered="false"
          lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="isNewWindow" ordered="false"
          lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="OnLoadEvent" eSuperTypes="#//Core/SystemEvent"/>
    <eClassifiers xsi:type="ecore:EClass" name="IFMLMenu" eSuperTypes="#//Core/ViewContainer"/>
    <eClassifiers xsi:type="ecore:EClass" name="JumpEvent" eSuperTypes="#//Core/ThrowingEvent">
      <eStructuralFeatures xsi:type="ecore:EReference" name="landingEvent" ordered="false"
          eType="#//Extensions/LandingEvent" eOpposite="#//Extensions/LandingEvent/jumpingEvents"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="LandingEvent" eSuperTypes="#//Core/CatchingEvent">
      <eStructuralFeatures xsi:type="ecore:EReference" name="jumpingEvents" ordered="false"
          upperBound="-1" eType="#//Extensions/JumpEvent" eOpposite="#//Extensions/JumpEvent/landingEvent"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="SetContextEvent" eSuperTypes="#//Core/ThrowingEvent"/>
  </eSubpackages>
</ecore:EPackage>

Nullpointer Exception while trying Example

Hi,

I'm currently trying to get the example project running, but it's already throwing exceptions at the generation step.
I followed http://emf-rest.com/install.html and created a new simple maven project through eclipse. Copied over the Example.ecore into the src/main/resources folder and also copied over the Simpsons.xmi into the same folder.
I installed the newest version from your update site:
EMF-REST 2.0.3.201503272048 com.rest.emf.feature.group EMF-REST
After that I started the generation through the context menu on the Example.ecore.
You can see in the console output that there is a NullpointerException.

Starting MTC: MTC
Setting variable [output] value to: /a/thoros/thoros/steffenboersig/workspaceCammunda2/emf-rest/src/main/java
Setting variable [ecore_file] value to: /a/thoros/thoros/steffenboersig/workspaceCammunda2/emf-rest/src/main/resources/Example.ecore
Setting variable [genModel_file] value to: /a/thoros/thoros/steffenboersig/workspaceCammunda2/emf-rest/src/main/resources/Example.genmodel
Setting variable [output_js] value to: /a/thoros/thoros/steffenboersig/workspaceCammunda2/emf-rest/src/main/webapp/scripts
Setting variable [pluginName] value to: emf-rest
Setting variable [foreignModel] value to: Example.ecore
Setting variable [modelName] value to: Simpsons
Setting variable [output_pom] value to: /a/thoros/thoros/steffenboersig/workspaceCammunda2/emf-rest
Initializing Model Environments.
Finished Model Environments Initialization.
Model ready : Ecore Fully Annotated(/a/thoros/thoros/steffenboersig/workspaceCammunda2/emf-rest/src/main/resources/Example.ecore)
Executing Ecore -> JavaScript API transformation
Executing Ecore->Genmodel transformation
Executing Default Index transformation
Exception executing Default Index transformation
Ecore -> JavaScript API transformation finished.
Executing pom transformation
pom transformation finished.
Model ready : GenModel(/a/thoros/thoros/steffenboersig/workspaceCammunda2/emf-rest/src/main/resources/Example.genmodel)
Ecore->Genmodel transformation finished.
Executing GenerateEMF transformation
java.lang.NullPointerException
    at com.emf.rest.standalone.PluginResourceLocator.getTarget(PluginResourceLocator.java:188)
    at com.mtcflow.engine.egl.EGLTransformationExecutor$1.createModule(EGLTransformationExecutor.java:51)
    at com.mtcflow.engine.epsilon.common.EpsilonExecutor.execute(EpsilonExecutor.java:93)
    at com.mtcflow.engine.egl.EGLTransformationExecutor.executeTransformation(EGLTransformationExecutor.java:88)
    at com.mtcflow.engine.core.MTCChoreographer$1.run(MTCChoreographer.java:628)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

Textual File ready : EMF Code()
Executing Ecore -> Services transformation
GenerateEMF transformation finished.
Ecore -> Services transformation finished.

Apart from the obvious problem while generating, I noticed that while using my real emf model the corresponding genmodel that i copied next to the ecore file is being changed when the generation starts. Don't you use the existant genmodel if it is present already? Why is my original genmodel changed?

Regards,
Steffen

org.eclipse.e4.core.di.InjectionException: java.lang.NullPointerException

Hi , I just installed your plugin , and have some problems with it:
after setup as described http://emf-rest.com/install.html (clean eclipse and only emf-rest plugin)
right click on model shows menu EMF-REST and Generate All I see exception in Error Log as below
any special confgiguration is required or I missed something?

org.eclipse.e4.core.di.InjectionException: java.lang.NullPointerException
    at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:62)
    at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:247)
    at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:229)
    at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
    at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:149)
    at org.eclipse.core.commands.Command.executeWithChecks(Command.java:499)
    at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
    at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
    at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:825)
    at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.handleWidgetSelection(HandledContributionItem.java:701)
    at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.access$6(HandledContributionItem.java:685)
    at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem$4.handleEvent(HandledContributionItem.java:613)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:382)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:236)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
Caused by: java.lang.NullPointerException
    at com.emf.rest.eclipse.GenerateRestEMFCommand.execute(GenerateRestEMFCommand.java:115)
    at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:294)
    at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
    ... 37 more

config details:

eclipse.buildId=4.4.0.I20140606-1215
java.version=1.7.0_45
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=pl_PL
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product

emf-rest (1.0.3.201409031707) "emf-rest" [Active]

BR
Pawel Luszynski

Java classes not generated completely

Hi,

You have done a very good job here just keep it up. Hovewer, I have a problem with the generation process. Environment is Eclipse 4.3, and EMF-REST 1.0.3.201409031707. The following steps have been followed:

  1. There is only Generate All menu option and it generates almost everything except classes from meta-model elements.
  2. Classes (e.g. Family.java, Cat.java etc.) can be generated through the genmodel file. After the first step all of these classes and Impl classes were empty.

However, after following these steps REST services couldn't be reached. After downloading the official example, we have narrowed the problem to the Example.impl package. To be more precise, in the generation process XML annotations are not generated (e.g. @XmlRootElement). After adding these annotations manually everything worked.

Compile errors in generated Java code

The code generate from our ecore model contains compile errors in the webmapi.service.IdentificationResolver class.

I was able to fix this compile errors manually and get the REST api running. However, I would expect that the generated code contains no compile errors.

This zip file https://www.dropbox.com/s/flpavdwepdb9z8m/IdentificationResolver.zip contains two versions of the IdentificationResolver class. One version that the code generation produces and one version that I manually adjusted. When you make a diff of the two versions you can easily see the issues. The password for the zip file is "emf2rest".

Regards,
Reinhold

Error when generatin code

Hi,
I updated to the latest emf-rest plugin version and tried to regenerate code but failed with the following error:

org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.eclipse.emf.ecore.xmi.FeatureNotFou
ndException: Feature 'type' not found. (file:/D:/eclipse-jee-kepler-R-win32-x86_64/eclipse/plugins/emf-rest_1.0.4.201310
211045/mtcs/default.mtc, 65, 65)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDemandLoadException(ResourceSetImpl.java:319)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:278)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:406)
at com.emf.rest.standalone.MTCStandaloneUtils.loadModel(MTCStandaloneUtils.java:75)
at com.emf.rest.standalone.MTCStandaloneUtils.startMTC(MTCStandaloneUtils.java:94)
at com.emf.rest.standalone.MTCStandaloneUtils.startMTC(MTCStandaloneUtils.java:84)
at com.emf.rest.eclipse.GenerateRestEMFCommand.execute(GenerateRestEMFCommand.java:122)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:290)
at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
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.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:243)
at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:224)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:167)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:499)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:213)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:85
0)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.handleWidgetSelection(HandledContributionIt
em.java:743)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.access$7(HandledContributionItem.java:727)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem$4.handleEvent(HandledContributionItem.java:
662)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:138)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:610)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
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:354)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
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:636)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
Caused by: org.eclipse.emf.ecore.xmi.FeatureNotFoundException: Feature 'type' not found. (file:/D:/eclipse-jee-kepler-R-
win32-x86_64/eclipse/plugins/emf-rest_1.0.4.201310211045/mtcs/default.mtc, 65, 65)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.reportUnknownFeature(XMLHandler.java:1998)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleUnknownFeature(XMLHandler.java:1962)
at org.eclipse.emf.ecore.xmi.impl.XMIHandler.handleUnknownFeature(XMIHandler.java:145)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setAttribValue(XMLHandler.java:2717)
at org.eclipse.emf.ecore.xmi.impl.SAXXMIHandler.handleObjectAttribs(SAXXMIHandler.java:79)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFactory(XMLHandler.java:2200)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFeatureType(XMLHandler.java:2166)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObject(XMLHandler.java:2042)
at org.eclipse.emf.ecore.xmi.impl.XMIHandler.createObject(XMIHandler.java:128)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleFeature(XMLHandler.java:1847)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XMLHandler.java:1030)
at org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMIHandler.java:81)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:1008)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:719)
at org.eclipse.emf.ecore.xmi.impl.XMIHandler.startElement(XMIHandler.java:163)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Sou
rce)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(Unknown Source)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:175)
at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:253)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1518)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1297)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:259)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
... 49 more

!ENTRY org.eclipse.ui 4 0 2013-11-20 09:13:02.823
!MESSAGE Unhandled event loop exception
!STACK 0
org.eclipse.e4.core.di.InjectionException: java.lang.NullPointerException
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:63)
at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:243)
at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:224)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:167)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:499)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:213)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:85
0)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.handleWidgetSelection(HandledContributionIt
em.java:743)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.access$7(HandledContributionItem.java:727)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem$4.handleEvent(HandledContributionItem.java:
662)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:138)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:610)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
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:354)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
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:636)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
Caused by: java.lang.NullPointerException
at com.emf.rest.eclipse.GenerateRestEMFCommand.execute(GenerateRestEMFCommand.java:125)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:290)
at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
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.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
... 37 more

Do you have a clue what causes this problem? It occurs when I execute "Generate All + Copy Libaries" or "Generate EMF Model" or "Generate Serializers".. on our .ecore file.

Btw. when do you expect to have a version of EMF-Rest that supports POST http calls?

Reinhold

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.