Eclipse & Xtext - DSL Editor not working on deployment - java

I've implemented a DSL using the Xtext framework on the Eclipse IDE. Additionally, I've created several UI features (Import/Export handlers, for example) that are available when I run my Eclipse Application.
Now I'm trying to deploy my application as a standalone product. I created a ".product" file in the ".ide" package of my project and everything works when I run my application from that ".product" file.
However, when I DO deploy it, I run the generated ".exe" file and the editor fails when I create a ".mydsl" file (I don't even get the prompt to convert the project to an Xtext project). The error is:
Failed to create injector for org.xtext.myDsl.Mydsl ExtensionFactory: org.xtext.myDsl.Mydsl.MydslExecutableExtensionFactory
I'm totally clueless with this, as I don't believe I'm missing any plugin imports... what could I be missing?
Any help is greatly appreciated! Thanks!

These kind of issues is ususally caused by some inconsistencies in your eclipse metadata in build.properties. Make sure all source folders and resources like the manifest and the plugin.xml are listed there. You should get a warning in eclipse like
There is a quickfix for the issue as well.

Related

How to run Scuba project from Eclipse

I try to use Scuba project.I downloaded source with SVN checkout and imported it into Eclipse .Also i imported scuba_smartcards project. Everything is perfect but i have one problem.When i try to run scuba project like java application,have this error message:
Selection does not contains main type
I don't know is a correct to run this source like java application or not.By the way i created my own java class and i want to use scuba's source in main method
Ho i can solve my problem?
thanks everyone
P.s i also found source in github
https://github.com/credentials/scuba
I'm using scuba_sc_j2se
SCUBA is a framework, basically it is a library with active components. Libraries are not standalone applications so they will not contain a main method of their own. You cannot just run it, you need to write or copy an application that uses the framework through the API presented by SCUBA.
One of these applications is the jMRTD application from which SCUBA originated.

Error when validating Xtext DSL in standalone Java project

I recently followed Sebastian Zarnekow's short guide on how to deploy an Xtext DSL into a standalone project (found here: http://zarnekow.blogspot.co.uk/2010/06/how-to-deploy-xtext-standalone.html)
However I receive the following error when attempting to run the project...
"The string resource '_UI_DiagnosticRoot_diagnostic' could not be located"
Could this be something to do with how the JAR is exported, I chose the "Extract required libraries into generated JAR" option, if I try to use the second option where the libraries are packaged into the JAR I receive a different error telling me that a main method could not be found.
Has anyone come across this issue before? I tried updating EMF and Xtext but it didn't seem to have any affect.
Any help is appreciated.
this should be a "warning" only - maybe logged as error but not prevent the program from running.
the problem is there a multiple plugin.properties in the root of the jars that may override each other. seems one from the org.eclipse.emf.ecore is going lost.
so you may create a plugin.properties that contains this (and maybe other keys) as well.

vaadin4spring security sample: failed to load widgetset

I am desperately trying to build a little Vaadin project with login secured pages/views. I have found vaadin4spring and thought I could start based on the security sample. However, after importing the project and running it, I am receiving the message (without any changes at the project):
Failed to load the widgetset:
./VAADIN/widgetsets/org.vaadin.spring.samples.security.Widgetset/org.vaadin.spring.samples.security.Widgetset.nocache.js?1424243461387
I have also tried to compile the widgetset manually, which wasn’t possible at the beginning (missing WebContent folder). After converting the project to use WebFacets and adding Dynamic Web Module the compilation was possible. But the widgetset related error message was still the same.
Can anybody help me with this problem? I have the feeling that it is just a little thing I am missing.
I think you have imported the sample somehow wrong, because you are talking about WebContent folder. I bet you are using eclipse (because of WTP related WebContent folder).
Delete the old project from workspace and possible settings files eclipse created
Choose File->Import->Maven->Existing Maven Project
You probably want to make one fresh install before you start to play with the project: from the top level "parent-pom" project, choose with right click: Run as -> Maven install. Get a cup of coffee, the build will take a while.
Enjoy!
To start e.g. the Security sample you seem to have tried, just execute the main method from org.vaadin.spring.samples.security.ApplicationInitializer. In eclipse, right click on the class and choose Run as Java Application and the app will launch with embedded Tomcat at http://localhost:8080/

Eclipse Build Issue in Dynamic Web Project Creation

I am tyring to build dynamic web application using Eclipse Luna and facing one very strange problem. When I build using eclipse there is no "classes" folder generated and hence application is not able to find the classes ie. the servlets. However if I build war file for my project, classes folder is generated and works perfectly fine.
I have searched the web on this issue and tried the possible solutions. Here are the screenshots of my project settings and few solutions that people recommended. Looks like I am missing either some important property or else eclipse is playing weird.
Thanks,
Try giving this path in the output folder Testing123/build/classes instead of Testing123/WebContent/WEB-INF/classes

How do I remove the glassfish-embedded-static-shell.jar that NetBeans automatically adds for unit testing?

I'm developing a Java JPA JAX-RS app using NetBeans 7.1.1 and GlassFish 3.1.2, and I'm stuck creating unit tests for my Web Application. I believe the problem is that the glassfish-embedded-static-shell.jar that NetBeans adds to the project's Test Libraries UI folder is conflicting with the one I want (glassfish-embedded-all-3.1.2.jar), which I added manually. I tried different ways of deleting it, but it is apparently special - there is no Remove or Delete option available in the UI. I see that it's mentioned in my project.properties file:
j2ee.platform.embeddableejb.classpath=${j2ee.server.home}/lib/embedded/glassfish-embedded-static-shell.jar
So I tried closing the project, editing out that line, and re-opening the project, but it always returns from the grave. I tried looking for it in the project's properties under Libraries > Compile Tests, but it doesn't show up there. Maybe you've found a way to remove similar special files from your NetBeans project? Thank you -- matt
My final solution was to dump NetBeans and switch (back) to IntelliJ IDEA, which has much more flexible project configuration options. I created separate run configurations for testing and deployment using their module feature:
This worked for me:
Close the project from within Neatbeans. Close Netbeans, then.
Locate from the file ../yourProject/nbproject/project.xml
Remove the following line (almost at the bottom):
<root id="test.src.dir"/>
Open the project again.

Categories

Resources