When connecting to TypeDB in my Spring Boot application, I get an UnsatisfiedLinkError
that talks about netty
:
22:24:40.506 [main] DEBUG io.netty.util.internal.NativeLibraryLoader - Unable to load the library 'netty_transport_native_epoll_x86_64', trying other loading mechanism.
java.lang.UnsatisfiedLinkError: no netty_transport_native_epoll_x86_64 in java.library.path: [/usr/java/packages/lib, /usr/lib64, /lib64, /lib, /usr/lib]
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2670)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:830)
at java.base/java.lang.System.loadLibrary(System.java:1873)
at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at io.netty.util.internal.NativeLibraryLoader$1.run(NativeLibraryLoader.java:336)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at io.netty.util.internal.NativeLibraryLoader.loadLibraryByHelper(NativeLibraryLoader.java:328)
at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:306)
at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:136)
at io.netty.channel.epoll.Native.loadNativeLibrary(Native.java:198)
at io.netty.channel.epoll.Native.<clinit>(Native.java:61)
at io.netty.channel.epoll.Epoll.<clinit>(Epoll.java:38)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:315)
at io.grpc.netty.Utils.isEpollAvailable(Utils.java:295)
at io.grpc.netty.Utils.<clinit>(Utils.java:113)
at io.grpc.netty.NettyChannelBuilder.<clinit>(NettyChannelBuilder.java:82)
at com.vaticle.typedb.client.connection.core.CoreClient.<init>(CoreClient.java:40)
at com.vaticle.typedb.client.connection.core.CoreClient.<init>(CoreClient.java:35)
at com.vaticle.typedb.client.TypeDB.coreClient(TypeDB.java:38)
UnsatisfiedLinkError
suggests that a dependency of typedb-client
failed to load - why would that happen? My Gradle build file is:
buildscript {
ext {
springBootVersion = '2.1.2.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
group = 'com.graphql-java.tutorial'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'
repositories {
mavenCentral()
maven {
url "https://repo.vaticle.com/repository/maven/"
}
}
dependencies {
implementation 'com.graphql-java:graphql-java:11.0'
implementation 'com.graphql-java:graphql-java-spring-boot-starter-webmvc:1.0'
implementation 'com.google.guava:guava:26.0-jre'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'com.vaticle.typedb:typedb-client:2.8.0'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}