{"action":"created","issue":{"url":"https://api.github.com/repos/netty/netty-tcnative/issues/136","repository_url":"https://api.github.com/repos/netty/netty-tcnative","labels_url":"https://api.github.com/repos/netty/netty-tcnative/issues/136/labels{/name}","comments_url":"https://api.github.com/repos/netty/netty-tcnative/issues/136/comments","events_url":"https://api.github.com/repos/netty/netty-tcnative/issues/136/events","html_url":"https://github.com/netty/netty-tcnative/issues/136","id":151301065,"number":136,"title":"java.lang.UnsatisfiedLinkError: org.apache.tomcat.jni.Library.version(I)I","user":{"login":"shelined","id":1737550,"avatar_url":"https://avatars.githubusercontent.com/u/1737550?v=3","gravatar_id":"","url":"https://api.github.com/users/shelined","html_url":"https://github.com/shelined","followers_url":"https://api.github.com/users/shelined/followers","following_url":"https://api.github.com/users/shelined/following{/other_user}","gists_url":"https://api.github.com/users/shelined/gists{/gist_id}","starred_url":"https://api.github.com/users/shelined/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shelined/subscriptions","organizations_url":"https://api.github.com/users/shelined/orgs","repos_url":"https://api.github.com/users/shelined/repos","events_url":"https://api.github.com/users/shelined/events{/privacy}","received_events_url":"https://api.github.com/users/shelined/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-04-27T05:21:51Z","updated_at":"2016-05-04T10:29:33Z","closed_at":null,"body":"I'm attempting to use grpc-java with netty-tcnative-boringssl-static and getting the following exception.\r\n```\r\nDEBUG io.netty.handler.ssl.OpenSsl - Failed to load netty-tcnative; OpenSslEngine will be unavailable. See http://netty.io/wiki/forked-tomcat-native.html for more information.\r\njava.lang.UnsatisfiedLinkError: org.apache.tomcat.jni.Library.version(I)I\r\n\tat org.apache.tomcat.jni.Library.version(Native Method) ~[netty-tcnative-boringssl-static-1.1.33.Fork14-linux-x86_64.jar:1.1.33.Fork14]\r\n\tat org.apache.tomcat.jni.Library.initialize(Library.java:176) ~[netty-tcnative-boringssl-static-1.1.33.Fork14-linux-x86_64.jar:1.1.33.Fork14]\r\n\tat io.netty.handler.ssl.OpenSsl.<clinit>(OpenSsl.java:61) ~[netty-handler-4.1.0.CR3.jar:4.1.0.CR3]\r\n\tat io.grpc.netty.GrpcSslContexts.defaultSslProvider(GrpcSslContexts.java:135) [grpc-netty-0.13.2.jar:0.13.2]\r\n\tat io.grpc.netty.GrpcSslContexts.configure(GrpcSslContexts.java:117) [grpc-netty-0.13.2.jar:0.13.2]\r\n\tat io.grpc.netty.GrpcSslContexts.forClient(GrpcSslContexts.java:88) [grpc-netty-0.13.2.jar:0.13.2]\r\n```\r\n\r\nI understand it might complicate things but I'm running inside Tomcat for the time being. I have set the -classpath to the path of netty-tcnative-boringssl-static-1.1.33.Fork14-linux-x86_64.jar as you can see below in the command to execute Tomcat.\r\n```\r\n/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -Dnop -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djuli-logback.configurationFile=file:/usr/local/tomcat/conf/logback.xml? -Djava.endorsed.dirs=/usr/local/tomcat/endorsed -classpath /usr/local/tomcat/webapps/ROOT/WEB-INF/lib/netty-tcnative-boringssl-static-1.1.33.Fork14-linux-x86_64.jar:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start\r\n```\r\n\r\nI've tried both statically and dynamically linked and keep running across the same exception.\r\n\r\ngrpc-java = 0.13.2\r\nnetty-tcnative-boringssl-static = 1.1.33.Fork14 on linux-x86_64 (also tried dynamic and Fork15)\r\n\r\n```\r\n$ java -version\r\nopenjdk version \"1.8.0_72-internal\"\r\nOpenJDK Runtime Environment (build 1.8.0_72-internal-b15)\r\nOpenJDK 64-Bit Server VM (build 25.72-b15, mixed mode)\r\n```\r\n```\r\n$ uname -a     \r\nLinux <docker container name> 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u4 (2016-02-29) x86_64 GNU/Linux\r\n```\r\nCCing @nmittler and @normanmaurer per @nmittler "},"comment":{"url":"https://api.github.com/repos/netty/netty-tcnative/issues/comments/216823410","html_url":"https://github.com/netty/netty-tcnative/issues/136#issuecomment-216823410","issue_url":"https://api.github.com/repos/netty/netty-tcnative/issues/136","id":216823410,"user":{"login":"jjpp","id":44979,"avatar_url":"https://avatars.githubusercontent.com/u/44979?v=3","gravatar_id":"","url":"https://api.github.com/users/jjpp","html_url":"https://github.com/jjpp","followers_url":"https://api.github.com/users/jjpp/followers","following_url":"https://api.github.com/users/jjpp/following{/other_user}","gists_url":"https://api.github.com/users/jjpp/gists{/gist_id}","starred_url":"https://api.github.com/users/jjpp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjpp/subscriptions","organizations_url":"https://api.github.com/users/jjpp/orgs","repos_url":"https://api.github.com/users/jjpp/repos","events_url":"https://api.github.com/users/jjpp/events{/privacy}","received_events_url":"https://api.github.com/users/jjpp/received_events","type":"User","site_admin":false},"created_at":"2016-05-04T10:29:33Z","updated_at":"2016-05-04T10:29:33Z","body":"It seems that I have the same/similar problem -- netty-tcnative-boringssl-static in tomcat (tomcat8, openjdk8 under centos7) that fails with UnsatisfiedLinkError about Library.version(int). I need it to use HTTP/2 over TLS. I have removed tomcat-jni.jar from tomcat libraries to avoid conflict there. \r\n\r\nSo far I have found an extra hint: if I copy the temporary file that NativeLibraryLoader creates and loads with System.load to eg /usr/lib/libnetty-tcnative.so and try to start tomcat then (so System.loadLibrary succeeds), everything works. So it kind of seems that Runtime.loadLibrary and Runtime.load do something differently. JNI specification was updated for JDK8, but it should be compatible with old usage as far as i understand."}}