Skip to content
This repository has been archived by the owner on Jul 13, 2022. It is now read-only.

Boot dashboard - cannot create view #148

Closed
martin3361 opened this issue Jun 1, 2017 · 11 comments
Closed

Boot dashboard - cannot create view #148

martin3361 opened this issue Jun 1, 2017 · 11 comments
Labels

Comments

@martin3361
Copy link

org.osgi.framework.BundleException: Could not resolve module: org.springframework.ide.eclipse.buildship20 [1860]
Bundle was not resolved because of a uses contraint violation.
org.osgi.service.resolver.ResolutionException: Uses constraint violation. Unable to resolve resource org.springframework.ide.eclipse.buildship20 [osgi.identity; osgi.identity="org.springframework.ide.eclipse.buildship20"; type="osgi.bundle"; version:Version="3.8.4.201703310634-RELEASE"; singleton:="true"] because it is exposed to package 'com.google.common.base' from resources com.google.guava [osgi.identity; osgi.identity="com.google.guava"; type="osgi.bundle"; version:Version="15.0.0.v201403281430"] and com.google.guava [osgi.identity; osgi.identity="com.google.guava"; type="osgi.bundle"; version:Version="21.0.0.v20170206-1425"] via two dependency chains.

Chain 1:
org.springframework.ide.eclipse.buildship20 [osgi.identity; osgi.identity="org.springframework.ide.eclipse.buildship20"; type="osgi.bundle"; version:Version="3.8.4.201703310634-RELEASE"; singleton:="true"]
require: (osgi.wiring.bundle=com.gradleware.tooling.model)
|
provide: osgi.wiring.bundle: com.gradleware.tooling.model
com.google.guava [osgi.identity; osgi.identity="com.google.guava"; type="osgi.bundle"; version:Version="15.0.0.v201403281430"]

Chain 2:
org.springframework.ide.eclipse.buildship20 [osgi.identity; osgi.identity="org.springframework.ide.eclipse.buildship20"; type="osgi.bundle"; version:Version="3.8.4.201703310634-RELEASE"; singleton:="true"]
require: (osgi.wiring.bundle=org.springsource.ide.eclipse.commons.livexp)
|
provide: osgi.wiring.bundle; bundle-version:Version="3.8.4.201703310458-RELEASE"; osgi.wiring.bundle="org.springsource.ide.eclipse.commons.livexp"
org.springsource.ide.eclipse.commons.livexp [osgi.identity; osgi.identity="org.springsource.ide.eclipse.commons.livexp"; type="osgi.bundle"; version:Version="3.8.4.201703310458-RELEASE"]
require: (&(osgi.wiring.bundle=com.google.guava)(bundle-version>=15.0.0))
|
provide: osgi.wiring.bundle: com.google.guava
com.google.guava [osgi.identity; osgi.identity="com.google.guava"; type="osgi.bundle"; version:Version="21.0.0.v20170206-1425"]
at org.eclipse.osgi.container.Module.start(Module.java:434)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)

eclipse.buildId=4.5.2.M20160212-1500
java.version=1.8.0_65
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments: -product org.eclipse.epp.package.jee.product -product org.eclipse.epp.package.jee.product -product org.eclipse.epp.package.jee.product -product org.eclipse.epp.package.jee.product -keyring /Users/martin/.eclipse_keyring -showlocation
Command-line arguments: -os macosx -ws cocoa -arch x86_64 -product org.eclipse.epp.package.jee.product -product org.eclipse.epp.package.jee.product -product org.eclipse.epp.package.jee.product -data file:/Users/martin/Documents/workspace/ -product org.eclipse.epp.package.jee.product -keyring /Users/martin/.eclipse_keyring -showlocation

@martinlippert
Copy link
Contributor

Thanks for the report, looks like one of those bad dependency issues... :-(
Can you provide a few steps how to reproduce this?
And can you try to start STS (or Eclipse) with the "-clean" option, just to see if that makes a difference?

@martin3361
Copy link
Author

Running Eclipse with -clean option doesn't fix the problem.
Steps to reproduce:

  1. Install Buildship gradle plugin
  2. Install Spring IDE with all subplugins
  3. Try to launch Boot Dashboard

@rue-jw
Copy link

rue-jw commented Jun 1, 2017

I am also able to reproduce this issue with the following steps:

  1. Unzip a clean STS 8.4 package.
  2. Run with a new workspace.
  3. Install all available from http://dist.springsource.org/snapshot/GRECLIPSE/e4.6/
    (mandatory restart)
  4. Switch to Groovy Compiler version to 2.4.11.xx in Window>Preferences>Groovy>Compiler
    (mandatory restart)
  5. After the restart Boot Dashboard and Spring Explorer will fail with "Could not create view".
java.lang.Exception
	at org.eclipse.ui.internal.ViewReference.createErrorPart(ViewReference.java:112)
	at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:98)
	at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPart(CompatibilityPart.java:278)
	at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:316)
	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:966)
	at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:931)
	at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:151)
	at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:375)
	at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:294)
	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:975)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:651)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$1.run(PartRenderingEngine.java:536)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:520)
	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:975)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:651)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:757)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$0(PartRenderingEngine.java:728)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:722)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:706)
	at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.showTab(StackRenderer.java:1324)
	at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.postProcess(LazyStackRenderer.java:103)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:669)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:757)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$0(PartRenderingEngine.java:728)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:722)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:706)
	at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.processContents(SWTPartRenderer.java:70)
	at ...

@rue-jw
Copy link

rue-jw commented Jun 1, 2017

STS.exe -clean doesn't fix the problem.

Starting with another clean workspace restores spring views, but also restores the Groovy compiler version to the default.
Uninstalling all Groovy-Eclipse stuff does restore functionality.

@martinlippert
Copy link
Contributor

@martin3361 I analyzed your error details in more detail and I can see now why this problem appears. It is a deep-down dependency issue, which is caused by the com.google.guava bundle being installed in two different versions. I don't know exactly how the never version 21 got into your install, but it is causing the issue. I will try to dive deeper to see how I can prevent this issue.

@martinlippert
Copy link
Contributor

@rue-jw The problem after installing Groovy-Eclipse and switching to the 2.4 compiler is a different problem, also causing many other Spring views to fail. Please open a separate issue for that.

@spring-projects-issues
Copy link

(comment in Pivotal Tracker added by Martin Lippert:)

I updated the version constraints for the guava bundle from the spring-ide commons.livexp bundle, that should solve this dependency issue and force the OSGi runtime to resolve those bundles against the same guava version and therefore avoid this package-use conflict.

@martinlippert
Copy link
Contributor

@rue-jw I created a separate issue for the Groovy-Eclipse problem:
#151

@spring-projects-issues
Copy link

(comment in Pivotal Tracker added by Martin Lippert:)

If you want to double-check my fix for the first issue, feel free to either download a nightly distribution of STS via:

http://dist.springsource.com/snapshot/STS/nightly-distributions.html

or use this nightly update site to install STS components into an existing Eclipse instance:

http://dist.springsource.com/snapshot/TOOLS/nightly/e4.6

@martinlippert
Copy link
Contributor

@martin3361 would be great if you could give these snapshots build a try and let us know if that fixes the issue on your end.

@martin3361
Copy link
Author

@martinlippert I can confirm installing from the remote site did fix the problem. Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

4 participants