troubles in generating XText plugins from ECORE - eclipse-emf

Iam trying to generate an XText grammar from a simple ECORE.
Im following this turorial http://koehnlein.blogspot.com/2010/03/xtext-for-your-ecore-models.html
However when I try to run the generated workflow I actually get this error:
1 [main] INFO lipse.emf.mwe.utils.StandaloneSetup - Registering platform uri '/home /andrea/workspace'
85 [main] ERROR mf.mwe2.launch.runtime.Mwe2Launcher - Problems instantiating module org.xtext.example.mydsl.MyDsl: java.lang.reflect.InvocationTargetException
java.lang.RuntimeException: Problems instantiating module org.xtext.example.mydsl.MyDsl: java.lang.reflect.InvocationTargetException
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:90)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:73)
...
..
any idea?

The exception is about "org.xtext.example.mydsl.MyDsl" which is the language name of a default xText project.
What is the name of the ECore class defining your language?
I suppose it must be the same and at least exists.

Related

AmazonServiceException class not found

I am using AWS SDK to upload files to S3 bucket when set java classpath to "aws-java-sdk-1.10.49.jar", the program works fine, but when replacing jar file to a later version "aws-java-sdk-1.11.35.jar", I get an exception "AmazonServiceException class not found as below."
Exception in thread "main" java.lang.NoClassDefFoundError: com/amazonaws/AmazonServiceException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.getMethod(Class.java:1784)
at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: com.amazonaws.AmazonServiceException
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
any help?
here we have three possible problems:
A simple example of NoClassDefFoundError is class belongs to a missing JAR file or JAR was not added into classpath or sometimes jar's name has been changed by someone like in my case one of my colleagues has changed tibco.jar into tibco_v3.jar and the program is failing with java.lang.NoClassDefFoundError and I were wondering what's wrong.
The class is not in Classpath, there is no sure shot way of knowing it but many times you can just have a look to print System.getproperty("java.classpath") and it will print the classpath from there you can at least get an idea of your actual runtime classpath.
Just try to run with explicitly -classpath option with the classpath you think will work and if it's working then it's a sure short sign that someone is overriding java classpath.
Take a look at this article

ExtJS - sencha app build dependency error

I'm trying to extend a third party class. The code is something like this. Note I'm specifying where to load openGL.view.
Ext.Loader.setPath({
'openGL.view': 'C:/Users/«username»/Documents/third-party/openGL/view/'
});
Ext.define('myOpenGL.view.Qxga',{
extend: 'openGL.view.Uxga',
alias: 'widget.qxga',
itemId: 'qxga',
requires: [
'openGL.view.Uxga',
'myOpenGL.view.QxgaController'
],
controller: 'QxgaController'
});
When I build it, I get errors like this:
[ERR] Failed to resolve dependency openGL.view.Uxga for file myOpenGL.view.Qxga
[ERR]
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.ExNotFound: Unknown definition for dependency : openGL.view.Uxga
[ERR]
[ERR] Total time: 6 seconds
[ERR] The following error occurred while executing this line:
C:\Users\«username»\Applications\Sencha\Cmd\5.1.0.26\plugins\ext\current\plugin.xml:403: The following error occurred while executing this line:
C:\Users\«username»\Documents\workspace\openGL\.sencha\app\build-impl.xml:378: The following error occurred while executing this line:
C:\Users\«username»\Documents\workspace\openGL\.sencha\app\init-impl.xml:303: com.sencha.exceptions.ExNotFound: Unknown definition for dependency : openGL.view.Uxga
Some questions:
Why isn't it finding openGL.view.Uxga?
I've read about modifying build-impl.xml, but with various degrees of success. What would I have to do, and is there a way to do the same without having to modify the file? Say some kind of override or command line parameter?
If there is a way to do this using setPath, the third-party directory may not be in the same place. Is there a way to include a Windows environment variable or something similar?
Sencha Cmd doesn't know about the Ext.Loader.setPath call, Cmd doesn't execute the JavaScript. Instead, in your app.json you can add C:/Users/«username»/Documents/third-party to the classpath config. classpath is a comma-delimited (I think it may even be able to be an array these days) list of paths Cmd will use to inspect the files within it to search for Ext JS classes (or via certain comment tags like #require and #class).
"classpath": "app,C:/Users/«username»/Documents/third-party"

GSP compilation failed in grails

When I run grails war I got the following error
Compiling 30 GSP files for package [appInfo].
| Error GSP Compilation error in file /WEB-INF/plugins/app-info-0.4.3/grails-app/views/appinfo/hibernateEntityInfo.gsp at line 69: Tag [each] missing required attribute [in]
I used
grails 2.2.4
and also I want to know the app-info plugin location in the application
It is the problem with App-info plugin. I also got similar problem . I solved by following way
Clean the application using
grails Clean
then run the application using
grails RunApp
and make sure If you are using sequences in the application do not use mysql because mysql does not support sequences.

sonarqube analysis failed in eclipse throws error on local analysis due to the exception language "cpp" is not found

I am running SonarQube 4.0 I'm using the SonarQube plugin for Eclipse, version 3.3.0,20131115 on Eclipse 3.7.2.
On the server Sonarqube i have install the plugin Sonar C++ Community Plugin (0.9)
The plugin is visible under General Settings --> Sonar C++ Community Plugin.
I have associated my C++ projects with the SonarQube projects and am able to view issues from the server side great.
However, if I switch to Local analysis, I get the following error
Retrieve remote issues of project SonarCpp...
Start SonarQube analysis on SonarCpp...
INFO: SonarQube Server 4.0
10:53:55.754 INFO - Incremental mode
10:53:55.756 INFO - Load batch settings
10:53:55.896 INFO - User cache: /home/sonar/.sonar/cache
10:53:56.155 INFO - Install plugins
10:53:56.169 INFO - Exclude plugins: devcockpit, jira, pdfreport, views, report, scmactivity
10:54:06.304 INFO - Create JDBC datasource for jdbc:h2:/home/sonar/workspaceSonar/.metadata/.plugins/org.eclipse.core.resources/.projects/SonarCpp/org.sonar.ide.eclipse.core/.sonartmp/preview1389261243496-0
10:54:07.979 INFO - Initializing Hibernate
10:54:09.895 INFO - Load project settings
10:54:09.953 INFO - Apply project exclusions
10:54:10.168 INFO - ------------- Scan SonarCpp
10:54:10.171 INFO - Load module settings
10:54:10.555 INFO - Quality profile : [name=Sonar way,language=cpp]
10:54:10.576 INFO - Excluded tests:
10:54:10.576 INFO - **/package-info.java
10:54:10.649 INFO - Index files
10:54:10.668 INFO - 0 files indexed
10:54:10.676 INFO - Loading technical debt model...
10:54:11.361 INFO - Loading technical debt model done: 685 ms
Exception in thread "main" org.sonar.runner.impl.RunnerException: Unable to execute Sonar
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
at org.sonar.runner.impl.BatchLauncherMain.execute(BatchLauncherMain.java:41)
at org.sonar.runner.impl.BatchLauncherMain.main(BatchLauncherMain.java:59)
Caused by: org.sonar.api.utils.SonarException: Language with key 'cpp' not found
at org.sonar.batch.phases.ProjectInitializer.initLanguage(ProjectInitializer.java:52)
at org.sonar.batch.phases.ProjectInitializer.execute(ProjectInitializer.java:45)
at org.sonar.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:103)
at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:150)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:190)
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:185)
at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:178)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:58)
at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:45)
at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:82)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.bootstrap.BootstrapContainer.executeTask(BootstrapContainer.java:155)
at org.sonar.batch.bootstrap.BootstrapContainer.doAfterStart(BootstrapContainer.java:143)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:92)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:74)
at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
... 6 more
the trace in Error log :
java.lang.IllegalStateException: Error status [command: /opt/swe/tools/ext/sun/jdk-1.6.0.24/i686-linux2.6/jre/bin/java -cp /tmp/sonar-runner-impl3586719476372601521.jar org.sonar.runner.impl.BatchLauncherMain /tmp/sonar-project6640682178693273899.properties]: 1
at org.sonar.runner.api.ForkedRunner.fork(ForkedRunner.java:199)
at org.sonar.runner.api.ForkedRunner.doExecute(ForkedRunner.java:144)
at org.sonar.runner.api.Runner.execute(Runner.java:90)
at org.sonar.ide.eclipse.core.internal.jobs.AnalyseProjectJob.run(AnalyseProjectJob.java:283)
at org.sonar.ide.eclipse.core.internal.jobs.AnalyseProjectJob.run(AnalyseProjectJob.java:127)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Any suggestions?
The plugin sonar for eclipse FORCE to use the C++ commercial plugin. I.e. whatever you put in
Window -> Preferences -> Sonar -> Local analysis properties
sonar.language=c++, it is not taken into account.
In other words, in local mode, "sonar.language" cannot be redefined when analysis a C++ project: it is forced to sonar.language=cpp (=> C++ commercial plugin). IT'S REALLY A PITY FROM THE SONAR PLUGIN IN ECLIPSE TO FORCE THE LANGUAGE PROPERTY.
Just as a hint, a workaround is to redefine the language symbol (i.e. cpp instead of c++) of the C++ community plugin by doing some modifications in the sources.

jetty throws exception after `java -jar start.jar`

I get the following error when I run java -jar start.jar. sudo service jetty start works just fine. What seems to be the problem? There are no webapps deployed, its a new install. I have changed the /etc/default/jetty file to enable the service to start.
wissen12#wissen12:/usr/share/jetty$ java -jar start.jar
7 [main] INFO org.mortbay.util.FileResource - Checking Resource aliases
396 [main] WARN org.mortbay.xml.XmlConfiguration - EXCEPTION
java.lang.NoSuchMethodException: class org.mortbay.jetty.Server.setThreadPool(class org.mortbay.thread.QueuedThreadPool)
at org.mortbay.xml.XmlConfiguration.set(XmlConfiguration.java:417)
at org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:231)
at org.mortbay.xml.XmlConfiguration.newInstance(XmlConfiguration.java:198)
at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:880)
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:616)
at org.mortbay.start.Main.invokeMain(Main.java:194)
at org.mortbay.start.Main.start(Main.java:534)
at org.mortbay.start.Main.start(Main.java:441)
at org.mortbay.start.Main.main(Main.java:119)
Thanks.
I had the exact same problem. Upgrading from Jetty 7.1.x to 7.4.x solved it. Looking at the source code, it looks like Jetty's XML bean handling added a lot more fallback cases for non-exact type matching in setters.
There are 2 possibilities that stand out as the most likely cause:
The server configuration file (jetty.xml) that you're using does not match the version of Jetty that you're using.
The versions do match, but the setThreadPool method is throwing an exception which is being lost
The 2nd seems more likely, so you should follow the instructions on this page
http://docs.codehaus.org/display/JETTY/Debugging
to turn on "ignored exception" logging.
I expect you'll find that an exception is being throw during the call to "Server.setThreadPool" and that is being "ignored" and treated as a "NoSuchMethod" exception.