TestRoots / watchdog

IntelliJ & Eclipse plugin for monitoring how Java applications are developed and tested
http://www.testroots.org
Other
18 stars 10 forks source link

[Blocking] WatchDogView is broken #304

Closed Inventitech closed 6 years ago

Inventitech commented 6 years ago

In a new project (even with read and write intervals), the WatchDogView is broken. We cannot release until this is fixed.

screenshot from 2018-05-02 16-41-02

Stacktrace:

java.lang.LinkageError: loader constraint violation: when resolving field "INFO" the class loader (instance of org/eclipse/osgi/internal/loader/EquinoxClassLoader) of the referring class, org/jfree/JCommon, and the class loader (instance of org/eclipse/osgi/internal/loader/EquinoxClassLoader) for the field's resolved type, org/jfree/ui/about/ProjectInfo, have different Class objects for that type
    at org.jfree.chart.JFreeChartInfo.<init>(JFreeChart.java:1861)
    at org.jfree.chart.JFreeChart.<clinit>(JFreeChart.java:256)
    at org.jfree.chart.ChartFactory.createBarChart3D(ChartFactory.java:1080)
    at org.jfree.chart.ChartFactory.createBarChart3D(ChartFactory.java:1026)
    at nl.tudelft.watchdog.eclipse.ui.WatchDogView.createBarChart(WatchDogView.java:448)
    at nl.tudelft.watchdog.eclipse.ui.WatchDogView.createActiveView(WatchDogView.java:176)
    at nl.tudelft.watchdog.eclipse.ui.WatchDogView.createPartControl(WatchDogView.java:138)
    at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPartControl(CompatibilityPart.java:151)
    at org.eclipse.ui.internal.e4.compatibility.CompatibilityView.createPartControl(CompatibilityView.java:147)
    at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:355)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
    at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:990)
    at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:955)
    at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:124)
    at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:399)
    at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:318)
    at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:162)
    at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:105)
    at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:74)
    at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:56)
    at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:129)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:992)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:661)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$1.run(PartRenderingEngine.java:546)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:530)
    at org.eclipse.e4.ui.workbench.renderers.swt.ElementReferenceRenderer.createWidget(ElementReferenceRenderer.java:70)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:992)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:661)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:767)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$0(PartRenderingEngine.java:738)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:732)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:716)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.subscribeTopicToBeRendered(PartRenderingEngine.java:154)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
    at org.eclipse.e4.core.di.internal.extensions.EventObjectSupplier$DIEventHandler.handleEvent(EventObjectSupplier.java:88)
    at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201)
    at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197)
    at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
    at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
    at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135)
    at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78)
    at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39)
    at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52)
    at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60)
    at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374)
    at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setToBeRendered(UIElementImpl.java:303)
    at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.showElementInWindow(ModelServiceImpl.java:615)
    at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.bringToTop(ModelServiceImpl.java:584)
    at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.delegateBringToTop(PartServiceImpl.java:769)
    at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:743)
    at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:681)
    at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:676)
    at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:1179)
    at org.eclipse.ui.internal.WorkbenchPage.showPart(WorkbenchPage.java:1287)
    at org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:1278)
    at org.eclipse.ui.internal.WorkbenchPage$12.run(WorkbenchPage.java:4329)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:4325)
    at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:4305)
    at org.eclipse.ui.internal.quickaccess.ViewElement.execute(ViewElement.java:77)
    at org.eclipse.ui.internal.quickaccess.SearchField$2.handleElementSelected(SearchField.java:198)
    at org.eclipse.ui.internal.quickaccess.QuickAccessContents.handleSelection(QuickAccessContents.java:597)
    at org.eclipse.ui.internal.quickaccess.QuickAccessContents.access$0(QuickAccessContents.java:587)
    at org.eclipse.ui.internal.quickaccess.QuickAccessContents$1.keyPressed(QuickAccessContents.java:632)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:168)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5348)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1348)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1374)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1357)
    at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1386)
    at org.eclipse.swt.widgets.Widget.gtk_key_press_event(Widget.java:768)
    at org.eclipse.swt.widgets.Control.gtk_key_press_event(Control.java:3550)
    at org.eclipse.swt.widgets.Text.gtk_key_press_event(Text.java:1849)
    at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1977)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:6193)
    at org.eclipse.swt.widgets.Text.windowProc(Text.java:2918)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:5608)
    at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method)
    at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:9282)
    at org.eclipse.swt.widgets.Display.eventProc(Display.java:1328)
    at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
    at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:2116)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4181)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
    at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1472)
TimvdLippe commented 6 years ago

Reading through StackOverflow gave me the following two answers: https://stackoverflow.com/questions/26102649/java-lang-linkageerror-while-using-jgit-and-jsch-for-eclipse-plugin-development and https://stackoverflow.com/questions/2631472/linkageerror-thrown-when-attempting-to-pass-instance-of-class-between-2-eclipse

I have not changed any configuration in the MANIFEST.mf, so it is weird the error is now occuring. Still, trying to remove the double inclusion of the jcommon dependency in both watchdog.core and watchdog.eclipse.plugin should probably fix this issue. Continuing my investigation...

TimvdLippe commented 6 years ago

Okay, second thought: maybe we should switch our dependencies over to a p2 repository. That way we can use the regular import-package and target-platform, rather than the "anti-pattern" of jar inclusion in the repository. This would thus require us to host our own version of the p2 repository on https://p2repository.testroots.org, which I am not sure if we want to do.

I think this second option is the better solution, but requires significant more work. Therefore I am going to try out the option in my previous comment first.