How do I use the OpenSSL feature in Netty 4.0.23 (an error occurs, such as unable to find dependent libraries)?

I tried to use the SSL feature in Netty 4.0.23 but failed so far.

The problem occurs like this (at runtime. No problem occurs during the build process).

java.lang.UnsatisfiedLinkError: C:\Users\heuser\AppData\Local\Temp\netty-tcnative4254708149416235536.dll: Can't find dependent libraries
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1965)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1890)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1851)
    at java.lang.Runtime.load0(Runtime.java:795)
    at java.lang.System.load(System.java:1062)
    at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:193)
    at io.netty.handler.ssl.OpenSsl.<clinit>(OpenSsl.java:39)
    at io.netty.handler.ssl.SslContext.newServerContext(SslContext.java:184)
    at io.netty.handler.ssl.SslContext.newServerContext(SslContext.java:85)

      

The netty-tcnative4254708149416235536.dll file seems to have some dependencies, but no more hints.

To fix the error and other errors, I followed the instruction at http://netty.io/wiki/forked-tomcat-native.html

As you can see, I tested on Windows (x86_64).

Besides what I added to my pom.xml,

    <dependency>
        <groupId>org.reflections</groupId>
        <artifactId>reflections-maven</artifactId>
        <version>0.9.8</version>
        <type>maven-plugin</type>
    </dependency>

    <dependency>
        <groupId>io.netty</groupId>
        <artifactId>netty-tcnative</artifactId>
        <version>1.1.30.Fork2</version>
        <classifier>${os.detected.classifier}</classifier>
    </dependency>

      

...

    <extensions>
        <extension>
            <groupId>kr.motd.maven</groupId>
            <artifactId>os-maven-plugin</artifactId>
            <version>1.2.3.Final</version>
        </extension>
    </extensions>

      

+3


source to share





All Articles