I am trying to build a website with playframework and Java, and the current play version is 2.8.15.
I got a NoSuchMethodError
runtime error (when responding to a simple request) but cannot tell where the error is located from the stack trace.
I failed to find any related documents on the Internet. Any one can give a hint?
Update
It looks like the error was not caused by the code, but putting a JAR into /lib folder. Does play have special requirements of the unmanaged dependencies?
Unexpected exception
NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;Ljava/lang/Object;)V
No source available, here is the exception stack trace:
->java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;Ljava/lang/Object;)V
com.google.inject.Key.ensureRetainedAtRuntime(Key.java:349)
com.google.inject.Key.strategyFor(Key.java:325)
com.google.inject.Key.get(Key.java:232)
play.api.inject.guice.GuiceKey$.apply(GuiceInjectorBuilder.scala:416)
play.api.inject.guice.GuiceableModuleConversions$$anon$4.$anonfun$configure$2(GuiceInjectorBuilder.scala:376)
play.api.inject.guice.GuiceableModuleConversions$$anon$4.$anonfun$configure$2$adapted(GuiceInjectorBuilder.scala:374)
scala.collection.immutable.List.foreach(List.scala:333)
play.api.inject.guice.GuiceableModuleConversions$$anon$4.configure(GuiceInjectorBuilder.scala:374)
com.google.inject.AbstractModule.configure(AbstractModule.java:61)
com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:347)
com.google.inject.spi.Elements.getElements(Elements.java:104)
com.google.inject.util.Modules$OverrideModule.configure(Modules.java:214)
com.google.inject.AbstractModule.configure(AbstractModule.java:61)
com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:347)
com.google.inject.spi.Elements.getElements(Elements.java:104)
com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:137)
com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:105)
com.google.inject.Guice.createInjector(Guice.java:87)
com.google.inject.Guice.createInjector(Guice.java:78)
play.api.inject.guice.GuiceBuilder.injector(GuiceInjectorBuilder.scala:200)
play.api.inject.guice.GuiceApplicationBuilder.build(GuiceApplicationBuilder.scala:155)
play.api.inject.guice.GuiceApplicationLoader.load(GuiceApplicationLoader.scala:21)
play.core.server.DevServerStart$$anon$1.$anonfun$reload$2(DevServerStart.scala:193)
play.utils.Threads$.withContextClassLoader(Threads.scala:22)