Как исправить ошибку Spanner «internal_static_google_rpc_LocalizedMessage_fieldAccessorTable» - PullRequest
0 голосов
/ 15 февраля 2019

Я получаю следующую ошибку

Exception in thread "main" java.lang.NoSuchFieldError: internal_static_google_rpc_LocalizedMessage_fieldAccessorTable
  at com.google.rpc.LocalizedMessage.internalGetFieldAccessorTable(LocalizedMessage.java:91)
  at com.google.protobuf.GeneratedMessageV3.getDescriptorForType(GeneratedMessageV3.java:121)
  at io.grpc.protobuf.ProtoUtils.keyForProto(ProtoUtils.java:67)
  at com.google.cloud.spanner.spi.v1.SpannerErrorInterceptor.<clinit>(SpannerErrorInterceptor.java:47)
  at com.google.cloud.spanner.spi.v1.SpannerInterceptorProvider.<clinit>(SpannerInterceptorProvider.java:33)
  at com.google.cloud.spanner.spi.v1.GapicSpannerRpc.<init>(GapicSpannerRpc.java:189)
  at com.google.cloud.spanner.SpannerOptions$DefaultSpannerRpcFactory.create(SpannerOptions.java:71)
  at com.google.cloud.spanner.SpannerOptions$DefaultSpannerRpcFactory.create(SpannerOptions.java:66)
  at com.google.cloud.ServiceOptions.getRpc(ServiceOptions.java:510)
  at com.google.cloud.spanner.SpannerOptions.getSpannerRpcV1(SpannerOptions.java:270)
  at com.google.cloud.spanner.SpannerImpl.<init>(SpannerImpl.java:178)
  at com.google.cloud.spanner.SpannerOptions$DefaultSpannerFactory.create(SpannerOptions.java:61)
  at com.google.cloud.spanner.SpannerOptions$DefaultSpannerFactory.create(SpannerOptions.java:56)
  at com.google.cloud.ServiceOptions.getService(ServiceOptions.java:498)
  at com.company.project.api.dao.impl.SpannerDaoImpl.<init>(SpannerDaoImpl.scala:14)
  at com.company.project.api.ApiServer.run(ApiServer.scala:34)
  at com.company.project.api.Main$.delayedEndpoint$com$renault$ftt$api$Main$1(Main.scala:13)
  at com.company.project.api.Main$delayedInit$body.apply(Main.scala:9)
  at scala.Function0$class.apply$mcV$sp(Function0.scala:34)
  at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
  at scala.App$$anonfun$main$1.apply(App.scala:76)
  at scala.App$$anonfun$main$1.apply(App.scala:76)
  at scala.collection.immutable.List.foreach(List.scala:392)
  at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:35)
  at scala.App$class.main(App.scala:76)
  at com.company.project.api.Main$.main(Main.scala:9)
  at com.company.project.api.Main.main(Main.scala)
  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:483)
  at com.intellij.uiDesigner.snapShooter.SnapShooter.main(SnapShooter.java:59)

Когда я пытаюсь создать экземпляр Spanner, например:

val options: SpannerOptions = SpannerOptions
    .newBuilder()
    .setProjectId("project-test1")
    .build()
  val spanner: Spanner = options.getService()

с google-cloud-spanner 1.7.0

lazy val googleDependencies: Seq[ModuleID] = Seq(
  "com.google.api.grpc" % "googleapis-common-protos" % "0.0.3" % "protobuf",
  "com.google.cloud" % "google-cloud-spanner" % "1.7.0" exclude("com.google.api.grpc", "grpc-google-common-protos"), 
  "com.google.api.grpc" % "grpc-google-common-protos" % "1.14.0"
)

У вас есть представление о том, что вызывает эту ошибку?

Thx

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...