google / protobuf-dt

Eclipse Public License 1.0
40 stars 23 forks source link

ConsolePrinter uses method unavailable in Guava 21 #22

Open kthoms opened 7 years ago

kthoms commented 7 years ago

The following error was reported to Eclipse Automatic Error Reporting with issue ID

java.lang.NoSuchMethodError: com.google.common.io.Closeables.closeQuietly(Ljava/io/Closeable;)V
at com.google.eclipse.protobuf.ui.builder.protoc.ConsolePrinter.close(ConsolePrinter.java:68)
at com.google.eclipse.protobuf.ui.builder.protoc.ProtobufBuildParticipant.generateSingleProto(ProtobufBuildParticipant.java:115)
at com.google.eclipse.protobuf.ui.builder.protoc.ProtobufBuildParticipant.build(ProtobufBuildParticipant.java:79)
at org.eclipse.xtext.builder.impl.RegistryBuilderParticipant$DeferredBuilderParticipant.build(RegistryBuilderParticipant.java:161)
at org.eclipse.xtext.builder.impl.RegistryBuilderParticipant.build(RegistryBuilderParticipant.java:69)
at org.eclipse.xtext.builder.impl.XtextBuilder.doBuild(XtextBuilder.java:291)
at org.eclipse.xtext.builder.impl.XtextBuilder.fullBuild(XtextBuilder.java:319)
at org.eclipse.xtext.builder.impl.XtextBuilder.build(XtextBuilder.java:155)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:735)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:301)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:304)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:360)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:383)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:142)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:232)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)

The failing installation has two versions of Guava installed: com.google.guava 15.0.0.v201403281430 com.google.guava 21.0.0.v20170206-1425

The method Closeables.closeQuietly(Closeable) was removed with Guava 16. Please make sure to be compatible with both 15 and 21.

woldie commented 7 years ago

I had the same problem! Is OSGi packaging no help in preventing these kinds of conflicts? Semi-related: hey protobuf team, could you please ask the guava team to get a grip and stop making breaking changes to their library?

I worked around this issue by renaming com.google.guava_21.0.0.v20170206-1425.jar in _eclipsehome/plugins to com.google.guava_21.0.0.v20170206-1425.elDiabloJarHell

wingo1 commented 5 years ago

Same problem ! plz fix it

ramnight commented 3 years ago

I had the same problem! Is OSGi packaging no help in preventing these kinds of conflicts? Semi-related: hey protobuf team, could you please ask the guava team to get a grip and stop making breaking changes to their library?

I worked around this issue by renaming com.google.guava_21.0.0.v20170206-1425.jar in _eclipsehome/plugins to com.google.guava_21.0.0.v20170206-1425.elDiabloJarHell

solved my question, thank you !