Adding elements to a diagram in UML Designer for Eclipse throws error - eclipse

I use UML Designer for Eclipse 4.7.0 and got the following error while trying to add a new element to a diagram:
An error has occurred. See error log for more details. loader
constraint violation: when resolving field "IS_DETACHMENT" the class
loader (instance of
org/eclipse/osgi/internal/loader/EquinoxClassLoader) of the referring
class,
org/eclipse/sirius/business/internal/session/danalysis/DanglingRefRemovalTrigger,
and the class loader (instance of
org/eclipse/osgi/internal/loader/EquinoxClassLoader) for the field's
resolved type, com/google/common/base/Predicate, have different Class
objects for that type
Do I have to change some settings?

UML Designer 8.0.0 compatible with Eclipse 0xygen 4.7.0 is not yet released, the current version is an alpha version. According to your error, it seems that there is an imcompatibility between the version of Guava needed by UML designer and the one you have installed.
Which version of guava is installed in your Eclipse?

Related

Uml designer 7.0 Loading models error

error log with eclipse oxygen 4.7.0
An internal error occurred during: "Loading models".
loader constraint violation: when resolving field "IS_DETACHMENT" the class loader (instance of org/eclipse/osgi/internal/loader/EquinoxClassLoader) of the referring class, org/eclipse/sirius/business/internal/session/danalysis/DanglingRefRemovalTrigger, and the class loader (instance of org/eclipse/osgi/internal/loader/EquinoxClassLoader) for the field's resolved type, com/google/common/base/Predicate, have different Class objects for that type
But when I change to eclipse neon uml designer is well

SONARQUBE preferences page not getting displayed in eclipse

I have installed SONARQUBE from Eclipse marketplace and restarted the eclipse as well.
But I am getting the below error while selecting SonarQube from Preferences page.
An error occurred while automatically activating bundle org.sonar.ide.eclipse.ui (351). And when I tracked through the root exception is below. Please help.
Root exception:
java.lang.LinkageError: loader constraint violation: when resolving method "org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory;" the class loader (instance of org/eclipse/osgi/internal/loader/EquinoxClassLoader) of the current class, org/slf4j/LoggerFactory, and the class loader (instance of org/eclipse/osgi/internal/loader/EquinoxClassLoader) for the method's defining class, org/slf4j/impl/StaticLoggerBinder, have different Class objects for the type org/slf4j/ILoggerFactory used in the signature
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:299)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:269)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:281)
After I installed, " m2e - slf4j over logback logging (Optional)" from the Luna update site, the preferences page worked.

How can I add xText editor to Eclipse (e4) RCP Application?

I've already made a xtext editor (2.5).
I try to use this editor in a part in my RCP application.
I use this code:
Injector injector = MyDslActivator.getInstance().getInjector(MyDslActivator.XTEXT_DSL_MYDSL);
EmbeddedEditorFactory factory = injector.getInstance(EmbeddedEditorFactory.class);
editor = factory.newEditor(resourceProvider).showErrorAndWarningAnnotations().withParent(container);
But I got an error
java.lang.LinkageError: loader constraint violation: loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) previously initiated loading for a different type with name "com/google/inject/Injector"
UPD1
The bundle "eclipse.m2e.maven.runtime" has the package "org.google.inject" with another version. The solution was exclude this bundle from the project.
But now I got new error.
Caused by: java.lang.NullPointerException
at org.eclipse.xtext.ui.editor.embedded.EmbeddedEditorActions.initialize(EmbeddedEditorActions.java:124)
at org.eclipse.xtext.ui.editor.embedded.EmbeddedEditorActions.<init>(EmbeddedEditorActions.java:119)
at org.eclipse.xtext.ui.editor.embedded.EmbeddedEditorActions$Factory.createActions(EmbeddedEditorActions.java:63)
at org.eclipse.xtext.ui.editor.embedded.EmbeddedEditorFactory$Builder.initializeActions(EmbeddedEditorFactory.java:397)
at org.eclipse.xtext.ui.editor.embedded.EmbeddedEditorFactory$Builder.withParent(EmbeddedEditorFactory.java:233)
It happend because the google injector doesn't inject IWorkbench into EmbeddedEditorActions.Factory.
I haven't idea how to fix it.
The e4 application has org.eclipse.e4.ui.workbench.IWorkbench, bot doesn't have org.eclipse.ui.IWorkbench.
You have to make sure that your RCP contains the bundle com.google.inject only once. Somehow it was loaded in two different versions and both were made available to your DSL plugin.

JPA metamodel not recognized with Netbeans 7.4

I have a web application that is working fine under Netbeans 7.3. When I installed it on another computer with Netbeans 7.4, all references to the JPA metamodel are now undefined.
The import statements referring to the metamodel (those ending with an underscore, like the 3rd import statement below) are not recognized :
import bfMetier.ApplicationInitialise;
import entites.Locations;
import entites.Locations_;
And when I run the project, it aborts with a «cannot find symbol Locations_» error :
SEVERE: Exception while loading the app : EJB Container initialization error
java.lang.ExceptionInInitializerError
(...)
Caused by: java.lang.RuntimeException: Uncompilable source code - cannot find symbol
symbol: class Locations_
location: package entites
at beansFacades.LocationsFacade.<clinit>(LocationsFacade.java:10)
I'm using ecclipse as the JPA 2.0 provider and running the app under Glassfish 3.1.2.2.
Is there any parameter I need to add in order for the metamodel classes to be generated?
Thanks!
I created a new java project in 7.4 and found some differences...
There is no option in context menu for generating classes from database (like 7.3).
I found this option in New Java Class... Persistence category.
The entity generated by 7.4 do not have metadata classes.
Might be, the metadata classes are no longer generated/or needed by netbeans.

Using AspectJ/AJDT in RAD 7.5.5

I'm using RAD 7.5.5. I installed AJDT plugin from the download site:
http://archive.eclipse.org/tools/ajdt/34/update/
I converted one of the existing Java projects to an AspectJ project, added an aspect to print log statements on method start and end of a methodA(), rebuilt the project and deployed.
I'm getting the below exception when methodA() is called:
Exception thrown : java.lang.NoSuchMethodError: org/aspectj/runtime/reflect/Factory.makeMethodSig(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lorg/aspectj/lang/reflect/MethodSignature;
I googled and found this could be caused because of an older version of aspectjrt.jar. But RAD extends Eclipse 3.4 and hence I added the version of AJDT plugin that is compatible with Eclipse 3.4 (/RAD 7.5.5). Any pointers to what could be the problem?
Make sure that aspectjrt.jar is on your classpath. Also, make sure that it is the aspectjrt.jar that comes with AJDT.