java.lang.IllegalArgumentException:无法加载[netty-tcnative-linux-x86_64,netty-tcnative-linux-x86_64-fedora,netty-tcnative]

时间:2017-10-16 12:55:32

标签: java tomcat netty

我正在使用https://github.com/lafaspot/imapnio

在基于tomcat的java服务器中。 imapnio库在内部使用netty以非阻塞方式执行imap命令。

当我尝试执行IMAPClient.createSession()时出现以下异常

> Unable to load the library: netty-tcnative-linux-x86_64.
**java.lang.IllegalStateException: Load library failed!
    at** io.netty.util.internal.NativeLibraryLoader$1.run(NativeLibraryLoader.java:261)
    at java.security.AccessController.doPrivileged(Native Method)
    at io.netty.util.internal.NativeLibraryLoader.loadLibraryByHelper(NativeLibraryLoader.java:250)
    at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:242)
    at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:194)
    at io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:166)
    at io.netty.handler.ssl.OpenSsl.loadTcNative(OpenSsl.java:380)
    at io.netty.handler.ssl.OpenSsl.<clinit>(OpenSsl.java:99)
    at io.netty.handler.ssl.SslContext.defaultProvider(SslContext.java:115)
    at io.netty.handler.ssl.SslContext.defaultClientProvider(SslContext.java:111)
    at io.netty.handler.ssl.SslContext.newClientContextInternal(SslContext.java:745)
    at io.netty.handler.ssl.SslContextBuilder.build(SslContextBuilder.java:397)
    at com.lafaspot.imapnio.client.IMAPSession.<init>(IMAPSession.java:135)
    at com.lafaspot.imapnio.client.IMAPClient.createSession(IMAPClient.java:68)
    at com.try.platform.imap.work.IMAPMailboxWork.<init>(IMAPMailboxWork.java:58)
    at com.try.platform.imap.pollers.IMAPPoller.initiateIMAPPoller(IMAPPoller.java:144)
    at com.try.platform.imap.pollers.IMAPService.initiateIMAPServices(IMAPService.java:14)
    at com.try.common.AppLoader.initiateAllWorkers(AppLoader.java:64)
    at com.try.common.AppLoader.contextInitialized(AppLoader.java:43)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4853)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5314)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.InvocationTargetException
    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:497)
    at io.netty.util.internal.NativeLibraryLoader$1.run(NativeLibraryLoader.java:259)
    .. 27 more
**Caused by: java.lang.UnsatisfiedLinkError: no netty-tcnative-linux-x86_64 in java.library.path**
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1864)
    at java.lang.Runtime.loadLibrary0(Runtime.java:870)
    at java.lang.System.loadLibrary(System.java:1122)
    at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
    .. 32 more
Unable to load the library: netty-tcnative-linux-x86_64.
java.lang.UnsatisfiedLinkError: no netty-tcnative-linux-x86_64 in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1864)
    at java.lang.Runtime.loadLibrary0(Runtime.java:870)
    at java.lang.System.loadLibrary(System.java:1122)
    at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
    at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:245)
    at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:194)
    at io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:166)
    at io.netty.handler.ssl.OpenSsl.loadTcNative(OpenSsl.java:380)
    at io.netty.handler.ssl.OpenSsl.<clinit>(OpenSsl.java:99)
    at io.netty.handler.ssl.SslContext.defaultProvider(SslContext.java:115)
    at io.netty.handler.ssl.SslContext.defaultClientProvider(SslContext.java:111)
    at io.netty.handler.ssl.SslContext.newClientContextInternal(SslContext.java:745)
    at io.netty.handler.ssl.SslContextBuilder.build(SslContextBuilder.java:397)
    at com.lafaspot.imapnio.client.IMAPSession.<init>(IMAPSession.java:135)
    at com.lafaspot.imapnio.client.IMAPClient.createSession(IMAPClient.java:68)
    at com.try.platform.imap.work.IMAPMailboxWork.<init>(IMAPMailboxWork.java:58)
    at com.try.platform.imap.pollers.IMAPPoller.initiateIMAPPoller(IMAPPoller.java:144)
    at com.try.platform.imap.pollers.IMAPService.initiateIMAPServices(IMAPService.java:14)
    at com.try.common.AppLoader.initiateAllWorkers(AppLoader.java:64)
    at com.try.common.AppLoader.contextInitialized(AppLoader.java:43)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4853)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5314)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Unable to load the library: netty-tcnative-linux-x86_64-fedora.
java.lang.IllegalStateException: Load library failed!
    at io.netty.util.internal.NativeLibraryLoader$1.run(NativeLibraryLoader.java:261)
    at java.security.AccessController.doPrivileged(Native Method)
    at io.netty.util.internal.NativeLibraryLoader.loadLibraryByHelper(NativeLibraryLoader.java:250)
    at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:242)
    at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:194)
    at io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:166)
    at io.netty.handler.ssl.OpenSsl.loadTcNative(OpenSsl.java:380)
    at io.netty.handler.ssl.OpenSsl.<clinit>(OpenSsl.java:99)
    at io.netty.handler.ssl.SslContext.defaultProvider(SslContext.java:115)
    at io.netty.handler.ssl.SslContext.defaultClientProvider(SslContext.java:111)
    at io.netty.handler.ssl.SslContext.newClientContextInternal(SslContext.java:745)
    at io.netty.handler.ssl.SslContextBuilder.build(SslContextBuilder.java:397)
    at com.lafaspot.imapnio.client.IMAPSession.<init>(IMAPSession.java:135)
    at com.lafaspot.imapnio.client.IMAPClient.createSession(IMAPClient.java:68)
    at com.try.platform.imap.work.IMAPMailboxWork.<init>(IMAPMailboxWork.java:58)
    at com.try.platform.imap.pollers.IMAPPoller.initiateIMAPPoller(IMAPPoller.java:144)
    at com.try.platform.imap.pollers.IMAPService.initiateIMAPServices(IMAPService.java:14)
    at com.try.common.AppLoader.initiateAllWorkers(AppLoader.java:64)
    at com.try.common.AppLoader.contextInitialized(AppLoader.java:43)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4853)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5314)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.InvocationTargetException
    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:497)
    at io.netty.util.internal.NativeLibraryLoader$1.run(NativeLibraryLoader.java:259)
    .. 27 more
Caused by: java.lang.UnsatisfiedLinkError: no netty-tcnative-linux-x86_64-fedora in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1864)
    at java.lang.Runtime.loadLibrary0(Runtime.java:870)
    at java.lang.System.loadLibrary(System.java:1122)
    at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
    .. 32 more
Unable to load the library: netty-tcnative-linux-x86_64-fedora.
java.lang.UnsatisfiedLinkError: no netty-tcnative-linux-x86_64-fedora in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1864)
    at java.lang.Runtime.loadLibrary0(Runtime.java:870)
    at java.lang.System.loadLibrary(System.java:1122)
    at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
    at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:245)
    at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:194)
    at io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:166)
    at io.netty.handler.ssl.OpenSsl.loadTcNative(OpenSsl.java:380)
    at io.netty.handler.ssl.OpenSsl.<clinit>(OpenSsl.java:99)
    at io.netty.handler.ssl.SslContext.defaultProvider(SslContext.java:115)
    at io.netty.handler.ssl.SslContext.defaultClientProvider(SslContext.java:111)
    at io.netty.handler.ssl.SslContext.newClientContextInternal(SslContext.java:745)
    at io.netty.handler.ssl.SslContextBuilder.build(SslContextBuilder.java:397)
    at com.lafaspot.imapnio.client.IMAPSession.<init>(IMAPSession.java:135)
    at com.lafaspot.imapnio.client.IMAPClient.createSession(IMAPClient.java:68)
    at com.try.platform.imap.work.IMAPMailboxWork.<init>(IMAPMailboxWork.java:58)
    at com.try.platform.imap.pollers.IMAPPoller.initiateIMAPPoller(IMAPPoller.java:144)
    at com.try.platform.imap.pollers.IMAPService.initiateIMAPServices(IMAPService.java:14)
    at com.try.common.AppLoader.initiateAllWorkers(AppLoader.java:64)
    at com.try.common.AppLoader.contextInitialized(AppLoader.java:43)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4853)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5314)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Unable to load the library: netty-tcnative.
java.lang.IllegalStateException: Load library failed!
    at io.netty.util.internal.NativeLibraryLoader$1.run(NativeLibraryLoader.java:261)
    at java.security.AccessController.doPrivileged(Native Method)
    at io.netty.util.internal.NativeLibraryLoader.loadLibraryByHelper(NativeLibraryLoader.java:250)
    at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:242)
    at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:194)
    at io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:166)
    at io.netty.handler.ssl.OpenSsl.loadTcNative(OpenSsl.java:380)
    at io.netty.handler.ssl.OpenSsl.<clinit>(OpenSsl.java:99)
    at io.netty.handler.ssl.SslContext.defaultProvider(SslContext.java:115)
    at io.netty.handler.ssl.SslContext.defaultClientProvider(SslContext.java:111)
    at io.netty.handler.ssl.SslContext.newClientContextInternal(SslContext.java:745)
    at io.netty.handler.ssl.SslContextBuilder.build(SslContextBuilder.java:397)
    at com.lafaspot.imapnio.client.IMAPSession.<init>(IMAPSession.java:135)
    at com.lafaspot.imapnio.client.IMAPClient.createSession(IMAPClient.java:68)
    at com.try.platform.imap.work.IMAPMailboxWork.<init>(IMAPMailboxWork.java:58)
    at com.try.platform.imap.pollers.IMAPPoller.initiateIMAPPoller(IMAPPoller.java:144)
    at com.try.platform.imap.pollers.IMAPService.initiateIMAPServices(IMAPService.java:14)
    at com.try.common.AppLoader.initiateAllWorkers(AppLoader.java:64)
    at com.try.common.AppLoader.contextInitialized(AppLoader.java:43)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4853)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5314)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.InvocationTargetException
    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:497)
    at io.netty.util.internal.NativeLibraryLoader$1.run(NativeLibraryLoader.java:259)
    .. 27 more
Caused by: java.lang.UnsatisfiedLinkError: no netty-tcnative in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1864)
    at java.lang.Runtime.loadLibrary0(Runtime.java:870)
    at java.lang.System.loadLibrary(System.java:1122)
    at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
    .. 32 more
Unable to load the library: netty-tcnative.
**java.lang.UnsatisfiedLinkError: no netty-tcnative in java.library.path**
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1864)
    at java.lang.Runtime.loadLibrary0(Runtime.java:870)
    at java.lang.System.loadLibrary(System.java:1122)
    at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
    at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:245)
    at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:194)
    at io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:166)
    at io.netty.handler.ssl.OpenSsl.loadTcNative(OpenSsl.java:380)
    at io.netty.handler.ssl.OpenSsl.<clinit>(OpenSsl.java:99)
    at io.netty.handler.ssl.SslContext.defaultProvider(SslContext.java:115)
    at io.netty.handler.ssl.SslContext.defaultClientProvider(SslContext.java:111)
    at io.netty.handler.ssl.SslContext.newClientContextInternal(SslContext.java:745)
    at io.netty.handler.ssl.SslContextBuilder.build(SslContextBuilder.java:397)
    at com.lafaspot.imapnio.client.IMAPSession.<init>(IMAPSession.java:135)
    at com.lafaspot.imapnio.client.IMAPClient.createSession(IMAPClient.java:68)
    at com.try.platform.imap.work.IMAPMailboxWork.<init>(IMAPMailboxWork.java:58)
    at com.try.platform.imap.pollers.IMAPPoller.initiateIMAPPoller(IMAPPoller.java:144)
    at com.try.platform.imap.pollers.IMAPService.initiateIMAPServices(IMAPService.java:14)
    at com.try.common.AppLoader.initiateAllWorkers(AppLoader.java:64)
    at com.try.common.AppLoader.contextInitialized(AppLoader.java:43)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4853)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5314)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Failed to load netty-tcnative; OpenSslEngine will be unavailable, unless the application has already loaded the symbols by some other means. See http://netty.io/wiki/forked-tomcat-native.html for more information.
**java.lang.IllegalArgumentException: Failed to load any of the given libraries: [netty-tcnative-linux-x86_64, netty-tcnative-linux-x86_64-fedora, netty-tcnative]**
    at io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:172)
    at io.netty.handler.ssl.OpenSsl.loadTcNative(OpenSsl.java:380)
    at io.netty.handler.ssl.OpenSsl.<clinit>(OpenSsl.java:99)
    at io.netty.handler.ssl.SslContext.defaultProvider(SslContext.java:115)
    at io.netty.handler.ssl.SslContext.defaultClientProvider(SslContext.java:111)
    at io.netty.handler.ssl.SslContext.newClientContextInternal(SslContext.java:745)
    at io.netty.handler.ssl.SslContextBuilder.build(SslContextBuilder.java:397)
    at com.lafaspot.imapnio.client.IMAPSession.<init>(IMAPSession.java:135)
    at com.lafaspot.imapnio.client.IMAPClient.createSession(IMAPClient.java:68)
    at com.try.platform.imap.work.IMAPMailboxWork.<init>(IMAPMailboxWork.java:58)
    at com.try.platform.imap.pollers.IMAPPoller.initiateIMAPPoller(IMAPPoller.java:144)
    at com.try.platform.imap.pollers.IMAPService.initiateIMAPServices(IMAPService.java:14)
    at com.try.common.AppLoader.initiateAllWorkers(AppLoader.java:64)
    at com.try.common.AppLoader.contextInitialized(AppLoader.java:43)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4853)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5314)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Failed to initialize netty-tcnative; OpenSslEngine will be unavailable.  for more information.
**java.lang.UnsatisfiedLinkError: no provided in java.library.path**
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1864)
    at java.lang.Runtime.loadLibrary0(Runtime.java:870)
    at java.lang.System.loadLibrary(System.java:1122)
    at org.apache.tomcat.jni.Library.<init>(Library.java:80)
    at org.apache.tomcat.jni.Library.initialize(Library.java:180)
    at io.netty.handler.ssl.OpenSsl.initializeTcNative(OpenSsl.java:385)
    at io.netty.handler.ssl.OpenSsl.<clinit>(OpenSsl.java:110)
    at io.netty.handler.ssl.SslContext.defaultProvider(SslContext.java:115)
    at io.netty.handler.ssl.SslContext.defaultClientProvider(SslContext.java:111)
    at io.netty.handler.ssl.SslContext.newClientContextInternal(SslContext.java:745)
    at io.netty.handler.ssl.SslContextBuilder.build(SslContextBuilder.java:397)
    at com.lafaspot.imapnio.client.IMAPSession.<init>(IMAPSession.java:135)
    at com.lafaspot.imapnio.client.IMAPClient.createSession(IMAPClient.java:68)
    at com.try.platform.imap.work.IMAPMailboxWork.<init>(IMAPMailboxWork.java:58)
    at com.try.platform.imap.pollers.IMAPPoller.initiateIMAPPoller(IMAPPoller.java:144)
    at com.try.platform.imap.pollers.IMAPService.initiateIMAPServices(IMAPService.java:14)
    at com.try.common.AppLoader.initiateAllWorkers(AppLoader.java:64)
    at com.try.common.AppLoader.contextInitialized(AppLoader.java:43)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4853)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5314)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

系统无法找到netty-tcnative系列库。 它可以在mac机器上解决上述异常。但是在Linux机器上抛出上面的异常。 (Amazon AMI Linux EC2实例)

虽然我已经在pom.xml中明确添加了这些内容,但机器无法找到netty-tcnative-linux-x86_64,netty-tcnative和netty-tcnative-linux-x86_64-fedora jars

你能帮我解决这个问题。

1 个答案:

答案 0 :(得分:0)

  1. 检查升级到netty-tcnative(2.0.7)。我面临同样的问题升级到2.0.x可能有所帮助。 Failed to load any of the given libraries: [netty-tcnative-linux-x86_64,netty-tcnative]
  2. 选中此选项可查看我使用的完整版本列表。

    1. 或者如果无法升级,libtcnative-1.so.0.2.16下载此rpm并尝试导出LD_LIBRARY_PATH和-Djava.library.path(将其作为CATALINA_OPTS传递)到.so文件的目录