Exception in thread "main" java.lang.UnsatisfiedLinkError:com.slytechs.library.NativeLibrary.dlopen(Ljava/lang/String;)J

467 views Asked by At

I am trying to convert .pcap files into .xml files using this repo https://github.com/ISCX/ISCXFlowMeter for my deep learning project. I am new to java so I can't understand how to resolve this issue. I am using 32 bit jdk on 64 bit ubuntu. Seems like there is an issue with jnetpcap. Please someone help me as my deadline is very near. Thank you.

enter image description here

1

There are 1 answers

20
Dici On

From the looks of it I would say you are missing an external library, like a Shared Object (.so) in Linux or a Dynamic Link Library (.dll) in Windows. If you shared the entire exception we could find out exactly where the exception is thrown and try to see if the code tells us where the library is expected to be found. Otherwise, I'd look at your classpath and make sure it contains the relevant dynamic libraries jnetpcap needs (reading the doc, jnetpcap is just a Java wrapper over existing non-Java utilities so that makes complete sense that there are non-Java dependencies to provide).

I tracked down the code in your stacktrace on Github and found that the exception was thrown here while loading the libraries in this annotation. Therefore, my guess is that you're missing one of the following libraries in your classpath: wpcap, pcap, jnetpcap-pcap100, jnetpcap. Two of them can be found here, for Linux (Windows available in the same repo).