Synchronization with Eclipse workspace failed with the version 2.1.1


(Vadim Lotarev) #1

Dear team,

After update to the latest version (2.1.1) I’ve got the following error at Eclipse startup time:

Synchronize Gradle projects with workspace failed due to an unexpected error.
loader constraint violation: when resolving method "com.gradleware.tooling.toolingmodel.repository.internal.DefaultOmniEclipseProject.getAll()Lcom/google/common/collect/ImmutableList;" the class loader (instance of org/eclipse/osgi/internal/loader/EquinoxClassLoader) of the current class, org/eclipse/buildship/core/workspace/internal/DefaultModelProvider, and the class loader (instance of org/eclipse/osgi/internal/loader/EquinoxClassLoader) for the method's defining class, com/gradleware/tooling/toolingmodel/repository/internal/DefaultOmniEclipseProject, have different Class objects for the type com/google/common/collect/ImmutableList used in the signature
java.lang.LinkageError: loader constraint violation: when resolving method "com.gradleware.tooling.toolingmodel.repository.internal.DefaultOmniEclipseProject.getAll()Lcom/google/common/collect/ImmutableList;" the class loader (instance of org/eclipse/osgi/internal/loader/EquinoxClassLoader) of the current class, org/eclipse/buildship/core/workspace/internal/DefaultModelProvider, and the class loader (instance of org/eclipse/osgi/internal/loader/EquinoxClassLoader) for the method's defining class, com/gradleware/tooling/toolingmodel/repository/internal/DefaultOmniEclipseProject, have different Class objects for the type com/google/common/collect/ImmutableList used in the signature
	at org.eclipse.buildship.core.workspace.internal.DefaultModelProvider.fetchEclipseGradleProjects(DefaultModelProvider.java:102)
	at org.eclipse.buildship.core.workspace.internal.SynchronizeGradleBuildsJob.fetchEclipseProjects(SynchronizeGradleBuildsJob.java:91)
	at org.eclipse.buildship.core.workspace.internal.SynchronizeGradleBuildsJob.synchronizeBuild(SynchronizeGradleBuildsJob.java:81)
	at org.eclipse.buildship.core.workspace.internal.SynchronizeGradleBuildsJob.runToolingApiJob(SynchronizeGradleBuildsJob.java:73)
	at org.eclipse.buildship.core.util.progress.ToolingApiJob$1.run(ToolingApiJob.java:73)
	at org.eclipse.buildship.core.util.progress.ToolingApiInvoker.invoke(ToolingApiInvoker.java:62)
	at org.eclipse.buildship.core.util.progress.ToolingApiJob.run(ToolingApiJob.java:70)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)

Please advice how to solve the issue.

Regards,
Vadim


(Donát Csikós) #2

Can you try using the latest Buildship 2.1.2 snapshot? It should contain a fix for all those classpath issues.