Closed Kylex87 closed 7 years ago
Hi Steffen, Thanks for you interest in EMF-REST. Do you get the NullPointerException while using your model or the example model? You're right about the genmodel file. We create a custom genmodel file because we're not using the default JET templates to generate the domain classes. We extend the default JET templates to add all the required features for REST(i.e. JAXB annotations) and Validation (i.e., OCL interpreter). So we have to create a genmodel model and declare the location of our JET templates. Please take a look at the file https://github.com/emf-rest/emf-rest/blob/master/emf-rest-src/emf-rest/src/com/emf/rest/EMFGenerator.java. You can customize this class to add your genmodel properties.
Regards, Hamza
I have the same problem. It seems this plugin expects that src/main/webapp existst. Unfortunately I think this is not documented.
The generator does create the src/main/webapp folder. I close this issue due to insufficient resources to identify the problem.
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.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