August 2016

Exception in thread "main" java.lang.UnsatisfiedLinkError: no jnetpcap in java.library.path

Trying to read the pcap file and dump the GPS location related information into a text file
I'm using Eclipse (Eclipse Java EE IDE for Web Developers. Version: Mars.1 Release (4.5.1) Build id: 20150924-1200 )
on windows 7 (SP1) 64 bit Operating system

Downloaded jnetpcap.jar file for 1.3 version for for both 32 and 64 and tried the following code
installed the jar file from Eclipse->project->properties->java buidd path-> Libraries and added the jar file (as explained in one of the options on this site)

public static void main(String[] args) {
final String FILENAME = "c://some.pcap";

final StringBuilder errbuf = new StringBuilder();

final Pcap pcap = Pcap.openOffline(FILENAME, errbuf);
}

in both cases, I'm getting the followimg error
Exception in thread "main" java.lang.UnsatisfiedLinkError: no jnetpcap in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at org.jnetpcap.Pcap.(Unknown Source)
at PCAPTestParser.main(PCAPTestParser.java:20)

What am I doing wrong?

Please help

JVM crash while modifying Pcap Packet with SCTP payload

I am new to jnetPcap, I am trying to build simple application that reads from a pcap file that has SCTP payload and modifies some of the attributes in the SCTP payload data and writes the modified pcap packet to another file. The following JVM crash is reported in the console while running my app after processing 31 pcakets:

jNetPCAP API version: 1.4.r1425
OS: Open Suse 13.2, kernel version: 3.16.7-35-desktop #1 SMP PREEMPT Sun Feb 7 17:32:21 UTC 2016 (832c776) x86_64 x86_64 x86_64 GNU/Linux

CRASH INFO:
-------------
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f06558ca125, pid=3373, tid=139665193740032
#
# JRE version: Java(TM) SE Runtime Environment (7.0_79-b15) (build 1.7.0_79-b15)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.79-b02 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C [libc.so.6+0x78125]2016-08-22 07:13:24

THREAD DUMP:
-------------
I also did a kill -3 on the pid, here's the thread dump info:
Full thread dump Java HotSpot(TM) 64-Bit Server VM (24.79-b02 mixed mode):

"DisposableGC" daemon prio=10 tid=0x00007f065011f800 nid=0xd3f in Object.wait() [0x00007f061fddc000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000007d7181608> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:135)
- locked <0x00000007d7181608> (a java.lang.ref.ReferenceQueue$Lock)
at org.jnetpcap.nio.DisposableGC.drainRefQueueLoop(Unknown Source)
at org.jnetpcap.nio.DisposableGC$2.run(Unknown Source)
at java.lang.Thread.run(Thread.java:745)

"Service Thread" daemon prio=10 tid=0x00007f065009f800 nid=0xd3d runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

"C2 CompilerThread1" daemon prio=10 tid=0x00007f065009d800 nid=0xd3c waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE