Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to LOAD native library #61

Open
infofinity opened this issue Jan 21, 2014 · 0 comments
Open

Failed to LOAD native library #61

infofinity opened this issue Jan 21, 2014 · 0 comments

Comments

@infofinity
Copy link

The IBM JDK includes a version.properties file (for its built-in HealthCenter CPU profiling tool) which is read before the version.properties file in VersionUDT.java. This causes a NullPointerException in barchartName with the following output on the console (using http://www.littleshoot.org/littleproxy/ as an example):

java.lang.IllegalStateException: Fatal: library load failed.
at com.barchart.udt.lib.LibraryLoaderUDT.load(LibraryLoaderUDT.java:75)
at com.barchart.udt.SocketUDT.(SocketUDT.java:142)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:228)
at com.barchart.udt.EpollUDT.(EpollUDT.java:140)
at com.barchart.udt.nio.SelectorUDT.(SelectorUDT.java:78)
at com.barchart.udt.nio.SelectorProviderUDT.openSelector(SelectorProviderUDT.java:107)
at com.barchart.udt.nio.SelectorProviderUDT.openSelector(SelectorProviderUDT.java:24)
at io.netty.channel.nio.NioEventLoop.openSelector(NioEventLoop.java:126)
at io.netty.channel.nio.NioEventLoop.(NioEventLoop.java:120)
at io.netty.channel.nio.NioEventLoopGroup.newChild(NioEventLoopGroup.java:87)
at io.netty.util.concurrent.MultithreadEventExecutorGroup.(MultithreadEventExecutorGroup.java:57)
at io.netty.channel.MultithreadEventLoopGroup.(MultithreadEventLoopGroup.java:49)
at io.netty.channel.nio.NioEventLoopGroup.(NioEventLoopGroup.java:61)
at org.littleshoot.proxy.impl.DefaultHttpProxyServer$ServerGroup.initializeTransport(DefaultHttpProxyServer.java:448)
at org.littleshoot.proxy.impl.DefaultHttpProxyServer$ServerGroup.(DefaultHttpProxyServer.java:413)
at org.littleshoot.proxy.impl.DefaultHttpProxyServer$ServerGroup.(DefaultHttpProxyServer.java:368)
at org.littleshoot.proxy.impl.DefaultHttpProxyServer.(DefaultHttpProxyServer.java:154)
at org.littleshoot.proxy.impl.DefaultHttpProxyServer.(DefaultHttpProxyServer.java:78)
at org.littleshoot.proxy.impl.DefaultHttpProxyServer$DefaultHttpProxyServerBootstrap.build(DefaultHttpProxyServer.java:726)
at org.littleshoot.proxy.impl.DefaultHttpProxyServer$DefaultHttpProxyServerBootstrap.start(DefaultHttpProxyServer.java:714)
at org.littleshoot.proxy.Launcher.main(Launcher.java:112)
244 2014-01-20 17:14:40,707 WARN [main] impl.DefaultHttpProxyServer.? (?:?) - Unable to initialize transport protocol UDT: null
java.lang.ExceptionInInitializerError
at java.lang.J9VMInternals.initialize(J9VMInternals.java:250)
at com.barchart.udt.EpollUDT.(EpollUDT.java:140)
at com.barchart.udt.nio.SelectorUDT.(SelectorUDT.java:78)
at com.barchart.udt.nio.SelectorProviderUDT.openSelector(SelectorProviderUDT.java:107)
at com.barchart.udt.nio.SelectorProviderUDT.openSelector(SelectorProviderUDT.java:24)
at io.netty.channel.nio.NioEventLoop.openSelector(NioEventLoop.java:126)
at io.netty.channel.nio.NioEventLoop.(NioEventLoop.java:120)
at io.netty.channel.nio.NioEventLoopGroup.newChild(NioEventLoopGroup.java:87)
at io.netty.util.concurrent.MultithreadEventExecutorGroup.(MultithreadEventExecutorGroup.java:57)
at io.netty.channel.MultithreadEventLoopGroup.(MultithreadEventLoopGroup.java:49)
at io.netty.channel.nio.NioEventLoopGroup.(NioEventLoopGroup.java:61)
at org.littleshoot.proxy.impl.DefaultHttpProxyServer$ServerGroup.initializeTransport(DefaultHttpProxyServer.java:448)
at org.littleshoot.proxy.impl.DefaultHttpProxyServer$ServerGroup.(DefaultHttpProxyServer.java:413)
at org.littleshoot.proxy.impl.DefaultHttpProxyServer$ServerGroup.(DefaultHttpProxyServer.java:368)
at org.littleshoot.proxy.impl.DefaultHttpProxyServer.(DefaultHttpProxyServer.java:154)
at org.littleshoot.proxy.impl.DefaultHttpProxyServer.(DefaultHttpProxyServer.java:78)
at org.littleshoot.proxy.impl.DefaultHttpProxyServer$DefaultHttpProxyServerBootstrap.build(DefaultHttpProxyServer.java:726)
at org.littleshoot.proxy.impl.DefaultHttpProxyServer$DefaultHttpProxyServerBootstrap.start(DefaultHttpProxyServer.java:714)
at org.littleshoot.proxy.Launcher.main(Launcher.java:112)
Caused by: java.lang.RuntimeException: load
at com.barchart.udt.SocketUDT.(SocketUDT.java:146)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:228)
... 18 more
Caused by: java.lang.IllegalStateException: Fatal: library load failed.
at com.barchart.udt.lib.LibraryLoaderUDT.load(LibraryLoaderUDT.java:75)
at com.barchart.udt.SocketUDT.(SocketUDT.java:142)
... 20 more
245 2014-01-20 17:14:40,708 ERROR [Finalizer thread] udt.EpollUDT.? (?:?) - failed to destroy id=0
java.lang.NullPointerException
at com.barchart.udt.EpollUDT.destroy(EpollUDT.java:155)
at com.barchart.udt.EpollUDT.finalize(EpollUDT.java:190)
at java.lang.J9VMInternals.runFinalize(J9VMInternals.java:455)

This works fine on a non-IBM JDK.

I resolved this problem by changing version.properties to versionudt.properties and recompiling VersionUDT and renaming version.properties in the core JAR file. Can you please fix this as well in master?

Also, it would be nice if LibraryLoaderUDT.java called e.printStackTrace in its catch blocks as the warning message was not useful in finding root cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant