Announcement Announcement Module
Collapse
No announcement yet.
UnsatisfiedLinkError when using external library Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • UnsatisfiedLinkError when using external library

    Hi,

    Can anyone help me with this?

    I'm simply trying to use a native java library with grails (jnetpcap ), but I'm struggling with an error that happens at runtime when my controller is evoking a function from the jnetpcap.

    Caused by InvocationTargetException: null
    ->> 1110 | runWorker in java.util.concurrent.ThreadPoolExecutor
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    | 603 | run in java.util.concurrent.ThreadPoolExecutor$Worker
    ^ 722 | run . . . in java.lang.Thread
    Caused by UnsatisfiedLinkError: no jnetpcap in java.library.path
    ->> 1860 | loadLibrary in java.lang.ClassLoader

    I have a controller that is calling a groovy script that imports the jnetpcap classes. I've tested the groovy script successfully, and I've been able to compile the grails source code by adding the dependencies in Buildconfig
    runtime group: 'org.jnetpcap', name: 'jNetPcap', version: '1.3.0'
    compile group: 'org.jnetpcap', name: 'jNetPcap', version: '1.3.0'

    However, when the controller that executes the function is called I get that error....

    I've placed the libjnetpcap.so in /usr/libs (Ubuntu) and set it in the $LD_LIBRARY_PATH both in .profile and in the STS grails Run Configuration, but it seems like the Grails server is not loading it.

    I've searched a lot of topics regarding similar issues, but none solved my problem so far
    Last edited by sh4mu; Jun 29th, 2012, 04:50 AM.
Working...
X