Getting a UnsatisfiedLinkError on simulator startup

Issue #49 resolved
Stefan Kohlbrecher created an issue

I think this probably some screw-up on my part, but tracking the problem here for future reference also for other users who might get it.

I'm currently getting the following when starting the simulator (ihmc_atlas_scs_finals.launch):

#!

Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't obtain updateLastError method for class com.sun.jna.Native
    at com.sun.jna.Native.initIDs(Native Method)
    at com.sun.jna.Native.<clinit>(Native.java:139)
    at us.ihmc.convexOptimization.NativeLibraryLoader.loadJNALibraryFromClassPath(NativeLibraryLoader.java:74)
    at us.ihmc.convexOptimization.QpOASESCWrapper.<clinit>(QpOASESCWrapper.java:5)
    at us.ihmc.commonWalkingControlModules.controlModules.nativeOptimization.OASESConstrainedQPSolver.<init>(OASESConstrainedQPSolver.java:48)
    at us.ihmc.commonWalkingControlModules.controlModules.nativeOptimization.OASESConstrainedQPSolver.<init>(OASESConstrainedQPSolver.java:43)
    at us.ihmc.commonWalkingControlModules.momentumBasedController.optimization.OptimizationMomentumControlModule.<init>(OptimizationMomentumControlModule.java:132)
    at us.ihmc.commonWalkingControlModules.momentumBasedController.MomentumBasedController.<init>(MomentumBasedController.java:371)
    at us.ihmc.commonWalkingControlModules.highLevelHumanoidControl.factories.MomentumBasedControllerFactory.getController(MomentumBasedControllerFactory.java:204)
    at us.ihmc.wholeBodyController.DRCControllerThread.createMomentumBasedController(DRCControllerThread.java:241)
    at us.ihmc.wholeBodyController.DRCControllerThread.<init>(DRCControllerThread.java:165)
    at us.ihmc.darpaRoboticsChallenge.DRCSimulationFactory.createRobotController(DRCSimulationFactory.java:222)
    at us.ihmc.darpaRoboticsChallenge.DRCSimulationFactory.<init>(DRCSimulationFactory.java:116)
    at us.ihmc.darpaRoboticsChallenge.DRCSimulationStarter.createSimulationFactory(DRCSimulationStarter.java:423)
    at us.ihmc.darpaRoboticsChallenge.DRCSimulationStarter.startSimulation(DRCSimulationStarter.java:386)
    at us.ihmc.darpaRoboticsChallenge.ROSAPISimulator.<init>(ROSAPISimulator.java:72)
    at us.ihmc.atlas.AtlasFinalsROSAPISimulator.<init>(AtlasFinalsROSAPISimulator.java:28)
    at us.ihmc.atlas.AtlasFinalsROSAPISimulator.main(AtlasFinalsROSAPISimulator.java:73)

It was working 2 days ago and I'm not sure what I did to make it fail (installing or upgrading packages for instance). I uninstalled everything Java, so the simulator complains about it missing and then re-installed it using

#!

apt-get install openjdk-7-jdk

The error still persists and with rudimentary ability to interpret Java error messages I'm a bit lost as to what could be the cause.

/edit: This is the Java version output:

#!

java -version
java version "1.7.0_79"
OpenJDK Runtime Environment (IcedTea 2.5.6) (7u79-2.5.6-0ubuntu1.14.04.1)
OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode)

I'm on a Ubuntu 14.04/64bit machine.

Comments (4)

  1. DouglasS

    @Stefan_Kohlbrecher We have some code that uses a library called JNA (Java Native Access, an alternative to the Java built-in Java Native Interface), and we rely on a fairly new version. I've seen this before on Ubuntu when JNA gets installed via apt-get somehow, causing the system-level JNA installation to take precedence over the one that is contained in the IHMC binary distribution. The one from apt-get is too old for our code.

    I believe the package is called libjna-java, but you can double check with a dpkg -l | grep -i jna.

  2. Stefan Kohlbrecher reporter

    Thanks for the quick help! That indeed was it and I have my working simulator back :)

  3. Log in to comment