Topic
4 replies Latest Post - ‏2007-11-09T10:17:07Z by SystemAdmin
SystemAdmin
SystemAdmin
9394 Posts
ACCEPTED ANSWER

Pinned topic UnsatisfiedLinkError (126)

‏2007-11-05T22:05:27Z |
Hi,

When I execute a JNI test on my new PDA (with the following WEME version:
ibm-weme-wm50-arm-ppro11_6.1.1.20061110-161633.exe), I get the following
exception:

java.lang.UnsatisfiedLinkError: /Windows/jniTest.dll ((126) No se ha podido
encontrar el m)
at java.lang.ClassLoader.loadLibraryWithPath(Unknown Source)
at java.lang.System.load(Unknown Source)
at Prueba.main(Unknown Source)
at java.lang.reflect.AccessibleObject.invokeV(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.ibm.oti.vm.JarRunner.main(Unknown Source)

Unfortunately, the sentence is not finished and is in Spanish. The
translation would be: "Cannot find the m".

I've used both System.LoadLibrary and System.Load with no success; and it's
not a problem of the location of the dll (it's copied in the Windows
directory and the J9's bin directory) or by the java.library.path System
property.

However, the same test application and dll library in other PDA works. But
both PDAs have Windows Mobile 5.

What's the problem?

Thanks in advance,
Jaime

Updated on 2007-11-09T10:17:07Z at 2007-11-09T10:17:07Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    9394 Posts
    ACCEPTED ANSWER

    Re: UnsatisfiedLinkError (126)

    ‏2007-11-07T08:16:09Z  in response to SystemAdmin
    I'm still working on this problem. I couldn't solve it but, at least, I have
    the whole sentence of the exception (even in English):

    java.lang.UnsatisfiedLinkError: /Windows/jniTest.dll ((126) The specified
    module could not be found)

    Any idea?

    Thanks,
    Jaime

    "Jaime" <jjjaimeosgi@gmail.com> escribió en el mensaje
    news:fgo430$28k7q$1@news.boulder.ibm.com...
    Hi,

    When I execute a JNI test on my new PDA (with the following WEME version:
    ibm-weme-wm50-arm-ppro11_6.1.1.20061110-161633.exe), I get the following
    exception:

    java.lang.UnsatisfiedLinkError: /Windows/jniTest.dll ((126) No se ha
    podido encontrar el m)
    at java.lang.ClassLoader.loadLibraryWithPath(Unknown Source)
    at java.lang.System.load(Unknown Source)
    at Prueba.main(Unknown Source)
    at java.lang.reflect.AccessibleObject.invokeV(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.ibm.oti.vm.JarRunner.main(Unknown Source)

    Unfortunately, the sentence is not finished and is in Spanish. The
    translation would be: "Cannot find the m".

    I've used both System.LoadLibrary and System.Load with no success; and
    it's not a problem of the location of the dll (it's copied in the Windows
    directory and the J9's bin directory) or by the java.library.path System
    property.

    However, the same test application and dll library in other PDA works. But
    both PDAs have Windows Mobile 5.

    What's the problem?

    Thanks in advance,
    Jaime
    • SystemAdmin
      SystemAdmin
      9394 Posts
      ACCEPTED ANSWER

      Re: UnsatisfiedLinkError (126)

      ‏2007-11-07T23:10:29Z  in response to SystemAdmin
      Jaime wrote:
      I'm still working on this problem. I couldn't solve it but, at least, I have
      the whole sentence of the exception (even in English):

      java.lang.UnsatisfiedLinkError: /Windows/jniTest.dll ((126) The specified
      module could not be found)

      Any idea?

      Since it happens on one device but not on another with the same OS / VM,
      it's probably something device-specific. One likely culprit is the
      number of DLLs loaded by the device - some vendors load more by default
      than others, and there's a limit on how many a device can use. Some
      documentation about this limit is here:
      http://www-1.ibm.com/support/docview.wss?uid=swg21106951

      If that's not it, you might want to pursue this with the device
      manufacturer. They have a fair bit of latitude when they put Windows
      Mobile on their devices, but usually react when they learn that an
      application works on all other devices, but not theirs.

      Andrew Jr.

      ======================================================================
      IBM Phoenix Labs (OTI)
      2929 North Central Avenue
      Phoenix, Arizona, USA 85012
      • SystemAdmin
        SystemAdmin
        9394 Posts
        ACCEPTED ANSWER

        Re: UnsatisfiedLinkError (126)

        ‏2007-11-07T23:31:59Z  in response to SystemAdmin
        Another thing to try might be file permissions. The error you're getting
        is ERROR_MOD_NOT_FOUND when running loadLibrary().

        (The list of error numbers can be found at
        http://msdn2.microsoft.com/en-us/library/ms932980.aspx).

        Could it be that the DLL you're trying to load is trying to load other
        DLLs, and they're not being found? Does your DLL rely on a Microsoft C
        runtime DLL that might not exist on your device?

        Andrew Jr.

        ======================================================================
        IBM Phoenix Labs (OTI)
        2929 North Central Avenue
        Phoenix, Arizona, USA 85012
        • SystemAdmin
          SystemAdmin
          9394 Posts
          ACCEPTED ANSWER

          Re: UnsatisfiedLinkError (126)

          ‏2007-11-09T10:17:07Z  in response to SystemAdmin
          Dear Andrew,

          Thanks for your help. The problem was the dependencies of the dll. It's
          nothing to do with the device, except that on of the devices had already
          stored the required dlls (and then it worked).

          I suggest to use the "depends" tool to survive in the dll hell. This tool
          let you open a dll file and displays the list of dependencies (required
          dlls).

          Best regards,
          Jaime
          "Andrew Cornwall" <nobody.home@127.0.0.1> escribió en el mensaje
          news:fgthqj$2t42o$1@news.boulder.ibm.com...
          Another thing to try might be file permissions. The error you're getting
          is ERROR_MOD_NOT_FOUND when running loadLibrary().

          (The list of error numbers can be found at
          http://msdn2.microsoft.com/en-us/library/ms932980.aspx).

          Could it be that the DLL you're trying to load is trying to load other
          DLLs, and they're not being found? Does your DLL rely on a Microsoft C
          runtime DLL that might not exist on your device?

          Andrew Jr.

          ======================================================================
          IBM Phoenix Labs (OTI)
          2929 North Central Avenue
          Phoenix, Arizona, USA 85012