Setya Djajadinata
2017-03-15 02:57:31 UTC
Hi all,
We're running Eclipse RAP based application tests using Tycho which throws
the following errors:
java.lang.LinkageError: loader constraint violation: loader (instance of
org/eclipse/osgi/internal/loader/EquinoxClassLoader) previously initiated
loading for a different type with name
"org/eclipse/swt/widgets/Control"
Using -verbose:class reveals that org.eclipse.swt.widgets.Control class was
loaded by 2 different classloaders, i.e:
[Loaded org.eclipse.swt.widgets.Control from
file:/home/setya/.m2/repository/p2/osgi/bundle/org.eclipse.rap.rwt/3.0.2.20160201-1220/org.eclipse.rap.rwt-3.0.2.20160201-1220.jar]
and
[Loaded org.eclipse.swt.widgets.Control from
file:/home/setya/.m2/repository/p2/osgi/bundle/org.eclipse.swt.gtk.linux.x86_64/3.104.2.v20160212-1350/org.eclipse.swt.gtk.linux.x86_64-3.10
4.2.v20160212-1350.jar]
Obviously we only want it loaded by RWT classloader, not SWT one.
The tests run fine when executed by RAP Tooling.
How to instruct Tycho to resolve this ?
Any help would be greatly appreciated.
Thanks & Regards,
Setya
We're running Eclipse RAP based application tests using Tycho which throws
the following errors:
java.lang.LinkageError: loader constraint violation: loader (instance of
org/eclipse/osgi/internal/loader/EquinoxClassLoader) previously initiated
loading for a different type with name
"org/eclipse/swt/widgets/Control"
Using -verbose:class reveals that org.eclipse.swt.widgets.Control class was
loaded by 2 different classloaders, i.e:
[Loaded org.eclipse.swt.widgets.Control from
file:/home/setya/.m2/repository/p2/osgi/bundle/org.eclipse.rap.rwt/3.0.2.20160201-1220/org.eclipse.rap.rwt-3.0.2.20160201-1220.jar]
and
[Loaded org.eclipse.swt.widgets.Control from
file:/home/setya/.m2/repository/p2/osgi/bundle/org.eclipse.swt.gtk.linux.x86_64/3.104.2.v20160212-1350/org.eclipse.swt.gtk.linux.x86_64-3.10
4.2.v20160212-1350.jar]
Obviously we only want it loaded by RWT classloader, not SWT one.
The tests run fine when executed by RAP Tooling.
How to instruct Tycho to resolve this ?
Any help would be greatly appreciated.
Thanks & Regards,
Setya