Reputation: 11
I'm doing a Bigtable + Dataflow project in Scala. Using sbt assembly to build a fat jar. It assembles fine, but I get the following run-time error as soon as I run it:
Exception in thread "main" java.lang.IllegalStateException: Could not find an appropriate constructor for com.google.cloud.bigtable.hbase1_2.BigtableConnection
at com.google.cloud.bigtable.hbase.BigtableConfiguration.connect(BigtableConfiguration.java:65)
at com.google.cloud.bigtable.hbase.BigtableConfiguration.connect(BigtableConfiguration.java:55)
at com.snowplowanalytics.dataflow.streaming.storage.BigtableUtils$.setupBigtable(BigtableUtils.scala:60)
at com.snowplowanalytics.dataflow.streaming.StreamingCounts$.setupDataflow(StreamingCounts.scala:71)
at com.snowplowanalytics.dataflow.streaming.StreamingCounts$.execute(StreamingCounts.scala:139)
at com.snowplowanalytics.dataflow.streaming.StreamingCountsApp$.main(StreamingCountsApp.scala:75)
at com.snowplowanalytics.dataflow.streaming.StreamingCountsApp.main(StreamingCountsApp.scala)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.google.cloud.bigtable.hbase.BigtableConfiguration.connect(BigtableConfiguration.java:62)
... 6 more
Caused by: java.lang.IllegalStateException: Neither Jetty ALPN nor OpenSSL via netty-tcnative were properly configured.
at com.google.cloud.bigtable.grpc.BigtableSession.<init>(BigtableSession.java:238)
at org.apache.hadoop.hbase.client.AbstractBigtableConnection.<init>(AbstractBigtableConnection.java:124)
at org.apache.hadoop.hbase.client.AbstractBigtableConnection.<init>(AbstractBigtableConnection.java:92)
at com.google.cloud.bigtable.hbase1_2.BigtableConnection.<init>(BigtableConnection.java:41)
... 11 more
I've read these questions and tried their suggestions but had no success.
How to solve "Neither Jetty ALPN nor OpenSSL via netty-tcnative were properly configured"?
Bigtable error with sbt assembly fat JAR (Neither Jetty ALPN nor OpenSSL are available)
I'm using the following artifacts and versions (for google cloud related libs):
"com.google.cloud.dataflow" % "google-cloud-dataflow-java-sdk-all" % "1.9.0"
"com.google.cloud.bigtable" % "bigtable-hbase-1.2" % "0.9.1"
Some other library I'm importing is dependent on google's protocol buffers lib, and that has originated a conflict, for which the merge strategy I used was discarding bigtable-protos-0.3.0.jar (in favor of grpc-core-proto-0.0.3.jar)
Upvotes: 1
Views: 413
Reputation: 2711
Use "com.google.cloud.bigtable" % "bigtable-hbase-dataflow" % "0.9.5.1"
instead of "com.google.cloud.bigtable" % "bigtable-hbase-1.2" % "0.9.1"
. There's a lot of package renaming that had to be done to make hbase compatible with Dataflow.
Upvotes: 1