Skip to content

No changes, but Mwe2Launcher throws NoSuchMethodError: ImmutableMap$Builder.buildOrThrow #255

@SimonCockx

Description

@SimonCockx

Since today, our Maven build suddenly started failing with the following stacktrace:

0    ERROR Mwe2Launcher       - com.google.common.collect.ImmutableMap$Builder.buildOrThrow()Lcom/google/common/collect/ImmutableMap;
java.lang.NoSuchMethodError: com.google.common.collect.ImmutableMap$Builder.buildOrThrow()Lcom/google/common/collect/ImmutableMap;
        at com.google.inject.internal.MoreTypes.<clinit>(MoreTypes.java:61)
        at com.google.inject.TypeLiteral.<init>(TypeLiteral.java:83)
        at com.google.inject.TypeLiteral.get(TypeLiteral.java:150)
        at com.google.inject.internal.ProviderMethodsModule.<init>(ProviderMethodsModule.java:60)
        at com.google.inject.internal.ProviderMethodsModule.forObject(ProviderMethodsModule.java:93)
        at com.google.inject.internal.ProviderMethodsModule.forModule(ProviderMethodsModule.java:67)
        at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:435)
        at com.google.inject.spi.Elements.getElements(Elements.java:113)
        at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:160)
        at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:107)
        at com.google.inject.Guice.createInjector(Guice.java:87)
        at com.google.inject.Guice.createInjector(Guice.java:69)
        at com.google.inject.Guice.createInjector(Guice.java:59)
        at org.eclipse.emf.mwe2.language.Mwe2StandaloneSetupGenerated.createInjector(Mwe2StandaloneSetupGenerated.java:47)
        at org.eclipse.emf.mwe2.language.Mwe2StandaloneSetupGenerated.createInjectorAndDoEMFRegistration(Mwe2StandaloneSetupGenerated.java:41)
        at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:75)
        at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:36)
        at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:279)
        at java.base/java.lang.Thread.run(Thread.java:834)

I have run the Maven build in a clean environment and compared the log to a successful Maven build of exactly the same codebase from 5 days ago, see attachments. The only significant change I see is that the build fetches the newly released Xtext 2.32.0 from Maven Central, although I hope that doesn't influence the build in some way.

The code I'm building is from this PR (which did not change over the last 5 days)

2023.06.21-BuildDsl.txt
2023.06.26-BuildDsl.txt

I actually want to address two issues in this thread:

  1. How do I fix the immediate NoSuchMethodError at hand?
  2. Since the builds I compare stem from exactly the same code base, why is my build suddenly failing? Does Mwe2 somehow rely on external unversioned resources?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions