java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native

Jenkins JIRA | C. S. | 4 years ago
  1. 0

    Executing the archive artifacts step you can find in the slave log following messages: {quote} Failed to load native POSIX impl; falling back on Java impl. Stacktrace follows. java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native at org.jruby.ext.posix.POSIXFactory.loadLibC(POSIXFactory.java:96) at org.jruby.ext.posix.POSIXFactory.loadLinuxPOSIX(POSIXFactory.java:65) at org.jruby.ext.posix.POSIXFactory.getPOSIX(POSIXFactory.java:24) at hudson.os.PosixAPI.<clinit>(PosixAPI.java:41) at hudson.util.IOUtils.mode(IOUtils.java:125) at hudson.util.io.TarArchiver.visit(TarArchiver.java:102) at hudson.util.DirScanner$Glob.scan(DirScanner.java:133) at hudson.FilePath.writeToTar(FilePath.java:1939) at hudson.FilePath.access$1000(FilePath.java:168) at hudson.FilePath$36.invoke(FilePath.java:1880) at hudson.FilePath$36.invoke(FilePath.java:1876) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2348) 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$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) {quote} This error only occurs when trying to archive the artifcats. I have a full build process which works without any errors. Installing the package *libjna-posix-java* fix the above shown exception and result into another exception: {quote} Failed to load native POSIX impl; falling back on Java impl. Stacktrace follows. java.lang.UnsatisfiedLinkError: Unable to load library 'libc.so.6': com.sun.jna.Native.open(Ljava/lang/String;)J at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:166) at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:239) at com.sun.jna.Library$Handler.<init>(Library.java:140) at com.sun.jna.Native.loadLibrary(Native.java:366) at org.jruby.ext.posix.POSIXFactory.loadLibC(POSIXFactory.java:96) at org.jruby.ext.posix.POSIXFactory.loadLinuxPOSIX(POSIXFactory.java:65) at org.jruby.ext.posix.POSIXFactory.getPOSIX(POSIXFactory.java:24) at hudson.os.PosixAPI.<clinit>(PosixAPI.java:41) at hudson.util.IOUtils.mode(IOUtils.java:125) at hudson.util.io.TarArchiver.visit(TarArchiver.java:102) at hudson.util.DirScanner$Glob.scan(DirScanner.java:133) at hudson.FilePath.writeToTar(FilePath.java:1939) at hudson.FilePath.access$1000(FilePath.java:168) at hudson.FilePath$36.invoke(FilePath.java:1880) at hudson.FilePath$36.invoke(FilePath.java:1876) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2348) 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$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) {quote} But in general it seems to work. There is only an information in the log: {quote} log4j:WARN No appenders could be found for logger (org.apache.commons.beanutils.converters.BooleanConverter). log4j:WARN Please initialize the log4j system properly. {quote} If there is a possibility to get more details from the slave client, please tell me. I couldn't find anything in the wiki.

    Jenkins JIRA | 4 years ago | C. S.
    java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native
  2. 0

    Executing the archive artifacts step you can find in the slave log following messages: {quote} Failed to load native POSIX impl; falling back on Java impl. Stacktrace follows. java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native at org.jruby.ext.posix.POSIXFactory.loadLibC(POSIXFactory.java:96) at org.jruby.ext.posix.POSIXFactory.loadLinuxPOSIX(POSIXFactory.java:65) at org.jruby.ext.posix.POSIXFactory.getPOSIX(POSIXFactory.java:24) at hudson.os.PosixAPI.<clinit>(PosixAPI.java:41) at hudson.util.IOUtils.mode(IOUtils.java:125) at hudson.util.io.TarArchiver.visit(TarArchiver.java:102) at hudson.util.DirScanner$Glob.scan(DirScanner.java:133) at hudson.FilePath.writeToTar(FilePath.java:1939) at hudson.FilePath.access$1000(FilePath.java:168) at hudson.FilePath$36.invoke(FilePath.java:1880) at hudson.FilePath$36.invoke(FilePath.java:1876) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2348) 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$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) {quote} This error only occurs when trying to archive the artifcats. I have a full build process which works without any errors. Installing the package *libjna-posix-java* fix the above shown exception and result into another exception: {quote} Failed to load native POSIX impl; falling back on Java impl. Stacktrace follows. java.lang.UnsatisfiedLinkError: Unable to load library 'libc.so.6': com.sun.jna.Native.open(Ljava/lang/String;)J at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:166) at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:239) at com.sun.jna.Library$Handler.<init>(Library.java:140) at com.sun.jna.Native.loadLibrary(Native.java:366) at org.jruby.ext.posix.POSIXFactory.loadLibC(POSIXFactory.java:96) at org.jruby.ext.posix.POSIXFactory.loadLinuxPOSIX(POSIXFactory.java:65) at org.jruby.ext.posix.POSIXFactory.getPOSIX(POSIXFactory.java:24) at hudson.os.PosixAPI.<clinit>(PosixAPI.java:41) at hudson.util.IOUtils.mode(IOUtils.java:125) at hudson.util.io.TarArchiver.visit(TarArchiver.java:102) at hudson.util.DirScanner$Glob.scan(DirScanner.java:133) at hudson.FilePath.writeToTar(FilePath.java:1939) at hudson.FilePath.access$1000(FilePath.java:168) at hudson.FilePath$36.invoke(FilePath.java:1880) at hudson.FilePath$36.invoke(FilePath.java:1876) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2348) 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$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) {quote} But in general it seems to work. There is only an information in the log: {quote} log4j:WARN No appenders could be found for logger (org.apache.commons.beanutils.converters.BooleanConverter). log4j:WARN Please initialize the log4j system properly. {quote} If there is a possibility to get more details from the slave client, please tell me. I couldn't find anything in the wiki.

    Jenkins JIRA | 4 years ago | C. S.
    java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native
  3. 0

    Could not initialize class com.sun.jna.Native

    Google Groups | 4 years ago | sti
    java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    'mvn site' fails on Ubuntu 12.04

    Google Groups | 5 years ago | Oli
    java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native
  6. 0

    Jenkins users - Could not initialize class com.sun.jna.Native

    nabble.com | 5 months ago
    java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NoClassDefFoundError

      Could not initialize class com.sun.jna.Native

      at org.jruby.ext.posix.POSIXFactory.loadLibC()
    2. JNA-POSIX
      POSIXFactory.getPOSIX
      1. org.jruby.ext.posix.POSIXFactory.loadLibC(POSIXFactory.java:96)
      2. org.jruby.ext.posix.POSIXFactory.loadLinuxPOSIX(POSIXFactory.java:65)
      3. org.jruby.ext.posix.POSIXFactory.getPOSIX(POSIXFactory.java:24)
      3 frames
    3. Hudson
      FilePath$FileCallableWrapper.call
      1. hudson.os.PosixAPI.<clinit>(PosixAPI.java:41)
      2. hudson.util.IOUtils.mode(IOUtils.java:125)
      3. hudson.util.io.TarArchiver.visit(TarArchiver.java:102)
      4. hudson.util.DirScanner$Glob.scan(DirScanner.java:133)
      5. hudson.FilePath.writeToTar(FilePath.java:1939)
      6. hudson.FilePath.access$1000(FilePath.java:168)
      7. hudson.FilePath$36.invoke(FilePath.java:1880)
      8. hudson.FilePath$36.invoke(FilePath.java:1876)
      9. hudson.FilePath$FileCallableWrapper.call(FilePath.java:2348)
      9 frames
    4. Hudson :: Remoting Layer
      InterceptingExecutorService$1.call
      1. hudson.remoting.UserRequest.perform(UserRequest.java:118)
      2. hudson.remoting.UserRequest.perform(UserRequest.java:48)
      3. hudson.remoting.Request$2.run(Request.java:326)
      4. hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      4 frames
    5. Java RT
      Thread.run
      1. java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      2. java.util.concurrent.FutureTask.run(FutureTask.java:166)
      3. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      4. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      5. java.lang.Thread.run(Thread.java:722)
      5 frames