1

Cloud Bigtable に接続しようとしています。ただし、netty-tcnative見つからないという問題が発生しています。

Maven の依存関係:

<dependency>
    <groupId>com.google.cloud.bigtable</groupId>
    <artifactId>bigtable-hbase-1.2</artifactId>
    <version>0.9.2</version>
</dependency>

<dependency>
    <groupId>io.netty</groupId>
    <artifactId>netty-tcnative-boringssl-static</artifactId>
    <version>1.1.33.Fork19</version>
</dependency>

エラー出力:

ERROR 2016-09-09 22:26:00,969 [main] com.google.cloud.bigtable.grpc.BigtableSession: Neither Jetty ALPN nor OpenSSL are available. OpenSSL unavailability cause:
java.lang.IllegalArgumentException: Failed to load any of the given libraries: [netty-tcnative-osx-x86_64, netty-tcnative]    
Exception in thread "BigtableSession-startup-2" java.lang.ExceptionInInitializerError
at com.google.cloud.bigtable.grpc.BigtableSession$3.run(BigtableSession.java:194)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: zip file closed
at java.util.zip.ZipFile.ensureOpen(ZipFile.java:634)
at java.util.zip.ZipFile.getEntry(ZipFile.java:305)
at java.util.jar.JarFile.getEntry(JarFile.java:227)
at java.util.jar.JarFile.getJarEntry(JarFile.java:210)
at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:840)
at sun.misc.URLClassPath.getResource(URLClassPath.java:199)
at java.net.URLClassLoader$1.run(URLClassLoader.java:358)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at org.mule.module.launcher.FineGrainedControlClassLoader.findClass(FineGrainedControlClassLoader.java:175)
at org.mule.module.launcher.MuleApplicationClassLoader.findClass(MuleApplicationClassLoader.java:134)
at org.mule.module.launcher.FineGrainedControlClassLoader.loadClass(FineGrainedControlClassLoader.java:119)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at com.google.bigtable.repackaged.io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:36)
at com.google.bigtable.repackaged.io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:58)
at com.google.bigtable.repackaged.io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:47)
at com.google.bigtable.repackaged.io.netty.channel.MultithreadEventLoopGroup.<init>(MultithreadEventLoopGroup.java:58)
at com.google.bigtable.repackaged.io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:77)
at com.google.bigtable.repackaged.io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:72)
at com.google.bigtable.repackaged.io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:59)
at com.google.cloud.bigtable.grpc.BigtableSessionSharedThreadPools.init(BigtableSessionSharedThreadPools.java:85)
at com.google.cloud.bigtable.grpc.BigtableSessionSharedThreadPools.<init>(BigtableSessionSharedThreadPools.java:77)
at com.google.cloud.bigtable.grpc.BigtableSessionSharedThreadPools.<clinit>(BigtableSessionSharedThreadPools.java:45)
... 4 more
Exception in thread "BigtableSession-startup-1" java.lang.IllegalStateException: zip file closed
at java.util.zip.ZipFile.ensureOpen(ZipFile.java:634)
at java.util.zip.ZipFile.getEntry(ZipFile.java:305)
at java.util.jar.JarFile.getEntry(JarFile.java:227)
at java.util.jar.JarFile.getJarEntry(JarFile.java:210)
at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:840)
at sun.misc.URLClassPath.getResource(URLClassPath.java:199)
at java.net.URLClassLoader$1.run(URLClassLoader.java:358)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at org.mule.module.launcher.FineGrainedControlClassLoader.findClass(FineGrainedControlClassLoader.java:175)
at org.mule.module.launcher.MuleApplicationClassLoader.findClass(MuleApplicationClassLoader.java:134)
at org.mule.module.launcher.FineGrainedControlClassLoader.loadClass(FineGrainedControlClassLoader.java:119)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at com.google.bigtable.repackaged.com.google.api.client.http.javanet.NetHttpTransport$Builder.trustCertificates(NetHttpTransport.java:270)
at com.google.bigtable.repackaged.com.google.api.client.googleapis.javanet.GoogleNetHttpTransport.newTrustedTransport(GoogleNetHttpTransport.java:55)
at com.google.cloud.bigtable.config.CredentialFactory.getHttpTransport(CredentialFactory.java:94)
at com.google.cloud.bigtable.grpc.BigtableSession$2.run(BigtableSession.java:183)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
4

1 に答える 1

2

この問題は、Mule のクラス ローダーが原因でした。Mule は、各アプリケーションを独自のクラス ローダーで実行します。これをアプリ クラス ローダではなく、Mule の共通クラス ローダ (java.class.path) に移動する必要があります。BigTable クライアント ライブラリと tcnative の両方が同じクラスパスにあることを確認します。

この問題は、Tomcat などの他のコンテナーでも同様のクラス ローダー パターンに従っているため、発生する可能性があります。

于 2016-09-10T04:40:56.053 に答える