java.lang.UnsatisfiedLinkError

If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.
tip

When installing an APK, it automatically extracts the libraries of the right arch type and has them available for System.loadLibrary. But, if you're trying to load a non-standard library, the installer won't know your app has 32bit native code.

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • After an automatic upgrade from 1.282 to 1.283 builds started failing with: FATAL: C:\Program Files (x86)\Hudson\data\war\WEB-INF\lib\winp.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform java.lang.UnsatisfiedLinkError: C:\Program Files (x86)\Hudson\data\war\WEB-INF \lib\winp.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1647) at java.lang.Runtime.load0(Runtime.java:770) at java.lang.System.load(System.java:1005) at org.jvnet.winp.Native.loadDll(Native.java:124) at org.jvnet.winp.Native.load(Native.java:81) at org.jvnet.winp.Native.<clinit>(Native.java:49) at org.jvnet.winp.WinProcess.enableDebugPrivilege(WinProcess.java:195) at hudson.util.ProcessTreeKiller$Windows.<clinit> (ProcessTreeKiller.java:207) at hudson.util.ProcessTreeKiller.get(ProcessTreeKiller.java:132) at hudson.Launcher$LocalLauncher.kill(Launcher.java:361) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:273) at hudson.model.Run.run(Run.java:866) at hudson.model.Build.run(Build.java:112) at hudson.model.ResourceController.execute(ResourceController.java:93) at hudson.model.Executor.run(Executor.java:119) and after one more restart with: FATAL: Could not initialize class hudson.util.ProcessTreeKiller$Windows java.lang.NoClassDefFoundError: Could not initialize class hudson.util.ProcessTreeKiller$Windows at hudson.util.ProcessTreeKiller.get(ProcessTreeKiller.java:132) at hudson.Launcher$LocalLauncher.kill(Launcher.java:361) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:273) at hudson.model.Run.run(Run.java:866) at hudson.model.Build.run(Build.java:112) at hudson.model.ResourceController.execute(ResourceController.java:93) at hudson.model.Executor.run(Executor.java:119) Maybe a packaging error? Cheers, Filip
    via by fkonvick,
  • Windows slaved builds fail with the following error on the master: 11:56:20 FATAL: hudson.remoting.RequestAbortedException: java.io.IOException: Failed to abort 11:56:20 hudson.remoting.RequestAbortedException: hudson.remoting.RequestAbortedException: java.io.IOException: Failed to abort 11:56:20 at hudson.remoting.RequestAbortedException.wrapForRethrow(RequestAbortedException.java:41) 11:56:20 at hudson.remoting.RequestAbortedException.wrapForRethrow(RequestAbortedException.java:34) 11:56:20 at hudson.remoting.Request.call(Request.java:174) 11:56:20 at hudson.remoting.Channel.call(Channel.java:739) 11:56:20 at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:168) 11:56:20 at com.sun.proxy.$Proxy58.join(Unknown Source) 11:56:20 at hudson.Launcher$RemoteLauncher$ProcImpl.join(Launcher.java:956) 11:56:20 at hudson.tasks.CommandInterpreter.join(CommandInterpreter.java:137) 11:56:20 at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:97) 11:56:20 at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:66) 11:56:20 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) 11:56:20 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:772) 11:56:20 at hudson.model.Build$BuildExecution.build(Build.java:199) 11:56:20 at hudson.model.Build$BuildExecution.doRun(Build.java:160) 11:56:20 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:535) 11:56:20 at hudson.model.Run.execute(Run.java:1740) 11:56:20 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 11:56:20 at hudson.model.ResourceController.execute(ResourceController.java:88) 11:56:20 at hudson.model.Executor.run(Executor.java:234) 11:56:20 Caused by: hudson.remoting.RequestAbortedException: java.io.IOException: Failed to abort 11:56:20 at hudson.remoting.Request.abort(Request.java:299) 11:56:20 at hudson.remoting.Channel.terminate(Channel.java:802) 11:56:20 at hudson.remoting.Channel$2.terminate(Channel.java:483) 11:56:20 at hudson.remoting.AbstractByteArrayCommandTransport$1.terminate(AbstractByteArrayCommandTransport.java:72) 11:56:20 at org.jenkinsci.remoting.nio.NioChannelHub$NioTransport.abort(NioChannelHub.java:195) 11:56:20 at org.jenkinsci.remoting.nio.NioChannelHub.run(NioChannelHub.java:581) 11:56:20 at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28) 11:56:20 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439) 11:56:20 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) 11:56:20 at java.util.concurrent.FutureTask.run(FutureTask.java:138) 11:56:20 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) 11:56:20 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) 11:56:20 at java.lang.Thread.run(Thread.java:695) 11:56:20 Caused by: java.io.IOException: Failed to abort 11:56:20 ... 9 more 11:56:20 Caused by: java.io.IOException: Connection reset by peer 11:56:20 at sun.nio.ch.FileDispatcher.read0(Native Method) 11:56:20 at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:21) 11:56:20 at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:198) 11:56:20 at sun.nio.ch.IOUtil.read(IOUtil.java:171) 11:56:20 at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:245) 11:56:20 at org.jenkinsci.remoting.nio.FifoBuffer$Pointer.receive(FifoBuffer.java:136) 11:56:20 at org.jenkinsci.remoting.nio.FifoBuffer.receive(FifoBuffer.java:306) 11:56:20 at org.jenkinsci.remoting.nio.NioChannelHub.run(NioChannelHub.java:514) 11:56:20 ... 7 more And the following warning on the slave agent: Aug 19, 2014 11:51:09 AM hudson.util.ProcessTree get WARNING: Failed to load winp. Reverting to the default java.lang.UnsatisfiedLinkError: Native Library C:\Users\BuildWin\.jenkins\cache\ jars\12\winp.x64.FEF9CB80B43534DCA303AC36686258E8.dll already loaded in another classloader at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1931) 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 org.jvnet.winp.Native.loadDll(Native.java:189) at org.jvnet.winp.Native.load(Native.java:121) at org.jvnet.winp.Native.<clinit>(Native.java:55) at org.jvnet.winp.WinProcess.enableDebugPrivilege(WinProcess.java:200) at hudson.util.ProcessTree$Windows.<clinit>(ProcessTree.java:469) at hudson.util.ProcessTree.get(ProcessTree.java:328) at hudson.Launcher$RemoteLauncher$KillTask.call(Launcher.java:930) at hudson.Launcher$RemoteLauncher$KillTask.call(Launcher.java:921) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:328) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecut orService.java:72) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor. java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor .java:615) at hudson.remoting.Engine$1$1.run(Engine.java:63) at java.lang.Thread.run(Thread.java:745) Currently restarting the slave agent fixes the issue for a few builds but after about an hour the builds start failing again. It doesn't seem to be a memory issue as I've set the Xmx2048m parameter and the monitoring plugin seems fairly normal in it's reports.
    via by Andy Walker,
  • Seems that JAR caching also takes DLL files on Windows. Thanks to Windows architecture (:(), it leads to access conflicts, because DDLs may be locked by other process. The issue is being heavily reproduced during the process. After several hours, any process termination fails with the FileNotFoundException exception (see the log below). Probably, the high frequency of the issue is somehow related to "Cygwin Process Killer" plugin. On my installation it calls additional remote call on the node before any process termination (it is an interim workaround for JENKINS-19156 and JENKINS-20289 in the custom 1.509.4 core build). {quote} Dec 07, 2013 7:02:28 AM org.jvnet.winp.Native load WARNING: Failed to write winp.x64.dll java.io.FileNotFoundException: C:\Users\XXX\.jenkins\cache\jars\01\winp.x64.dll (The process cannot access the file because it is being used by another process) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(Unknown Source) at java.io.FileOutputStream.<init>(Unknown Source) at org.jvnet.winp.Native.load(Native.java:81) at org.jvnet.winp.Native.<clinit>(Native.java:52) at org.jvnet.winp.WinProcess.enableDebugPrivilege(WinProcess.java:200) at hudson.util.ProcessTree$Windows.<clinit>(ProcessTree.java:470) at hudson.util.ProcessTree.get(ProcessTree.java:335) at hudson.Launcher$RemoteLauncher$KillTask.call(Launcher.java:899) at hudson.Launcher$RemoteLauncher$KillTask.call(Launcher.java:890) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:326) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at hudson.remoting.Engine$1$1.run(Engine.java:63) at java.lang.Thread.run(Unknown Source) Dec 07, 2013 7:02:35 AM hudson.util.ProcessTree get WARNING: Failed to load winp. Reverting to the default java.lang.UnsatisfiedLinkError: Native Library C:\Users\XXX\.jenkins\cache\jars\01\winp.x64.dll already loaded in another classloader at java.lang.ClassLoader.loadLibrary1(Unknown Source) at java.lang.ClassLoader.loadLibrary0(Unknown Source) at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.load0(Unknown Source) at java.lang.System.load(Unknown Source) at org.jvnet.winp.Native.loadDll(Native.java:158) at org.jvnet.winp.Native.load(Native.java:90) at org.jvnet.winp.Native.<clinit>(Native.java:52) at org.jvnet.winp.WinProcess.enableDebugPrivilege(WinProcess.java:200) at hudson.util.ProcessTree$Windows.<clinit>(ProcessTree.java:470) at hudson.util.ProcessTree.get(ProcessTree.java:335) at hudson.Launcher$RemoteLauncher$KillTask.call(Launcher.java:899) at hudson.Launcher$RemoteLauncher$KillTask.call(Launcher.java:890) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:326) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at hudson.remoting.Engine$1$1.run(Engine.java:63) at java.lang.Thread.run(Unknown Source) {quote}
    via by Oleg Nenashev,
  • Seems that JAR caching also takes DLL files on Windows. Thanks to Windows architecture (:(), it leads to access conflicts, because DDLs may be locked by other process. The issue is being heavily reproduced during the process. After several hours, any process termination fails with the FileNotFoundException exception (see the log below). Probably, the high frequency of the issue is somehow related to "Cygwin Process Killer" plugin. On my installation it calls additional remote call on the node before any process termination (it is an interim workaround for JENKINS-19156 and JENKINS-20289 in the custom 1.509.4 core build). {quote} Dec 07, 2013 7:02:28 AM org.jvnet.winp.Native load WARNING: Failed to write winp.x64.dll java.io.FileNotFoundException: C:\Users\XXX\.jenkins\cache\jars\01\winp.x64.dll (The process cannot access the file because it is being used by another process) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(Unknown Source) at java.io.FileOutputStream.<init>(Unknown Source) at org.jvnet.winp.Native.load(Native.java:81) at org.jvnet.winp.Native.<clinit>(Native.java:52) at org.jvnet.winp.WinProcess.enableDebugPrivilege(WinProcess.java:200) at hudson.util.ProcessTree$Windows.<clinit>(ProcessTree.java:470) at hudson.util.ProcessTree.get(ProcessTree.java:335) at hudson.Launcher$RemoteLauncher$KillTask.call(Launcher.java:899) at hudson.Launcher$RemoteLauncher$KillTask.call(Launcher.java:890) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:326) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at hudson.remoting.Engine$1$1.run(Engine.java:63) at java.lang.Thread.run(Unknown Source) Dec 07, 2013 7:02:35 AM hudson.util.ProcessTree get WARNING: Failed to load winp. Reverting to the default java.lang.UnsatisfiedLinkError: Native Library C:\Users\XXX\.jenkins\cache\jars\01\winp.x64.dll already loaded in another classloader at java.lang.ClassLoader.loadLibrary1(Unknown Source) at java.lang.ClassLoader.loadLibrary0(Unknown Source) at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.load0(Unknown Source) at java.lang.System.load(Unknown Source) at org.jvnet.winp.Native.loadDll(Native.java:158) at org.jvnet.winp.Native.load(Native.java:90) at org.jvnet.winp.Native.<clinit>(Native.java:52) at org.jvnet.winp.WinProcess.enableDebugPrivilege(WinProcess.java:200) at hudson.util.ProcessTree$Windows.<clinit>(ProcessTree.java:470) at hudson.util.ProcessTree.get(ProcessTree.java:335) at hudson.Launcher$RemoteLauncher$KillTask.call(Launcher.java:899) at hudson.Launcher$RemoteLauncher$KillTask.call(Launcher.java:890) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:326) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at hudson.remoting.Engine$1$1.run(Engine.java:63) at java.lang.Thread.run(Unknown Source) {quote}
    via by Oleg Nenashev,
  • GitHub comment 2394#270129926
    via GitHub by fviale
    ,
  • Can't find dependent libraries
    via Stack Overflow by Arvind Vishwakarma
    ,
    • java.lang.UnsatisfiedLinkError: C:\Program Files (x86)\Hudson\data\war\WEB-INF \lib\winp.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1647) at java.lang.Runtime.load0(Runtime.java:770) at java.lang.System.load(System.java:1005) at org.jvnet.winp.Native.loadDll(Native.java:124) at org.jvnet.winp.Native.load(Native.java:81) at org.jvnet.winp.Native.<clinit>(Native.java:49) at org.jvnet.winp.WinProcess.enableDebugPrivilege(WinProcess.java:195) at hudson.util.ProcessTreeKiller$Windows.<clinit>(ProcessTreeKiller.java:207) at hudson.util.ProcessTreeKiller.get(ProcessTreeKiller.java:132) at hudson.Launcher$LocalLauncher.kill(Launcher.java:361) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:273) at hudson.model.Run.run(Run.java:866) at hudson.model.Build.run(Build.java:112) at hudson.model.ResourceController.execute(ResourceController.java:93) at hudson.model.Executor.run(Executor.java:119)

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    franky lifranky li
    134 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    82 more bugmates