incubator-s4-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "唐装鼠" <>
Subject 回复: jni error
Date Mon, 08 Jul 2013 09:13:47 GMT
Yes.I load the native library.I used System.load().The java code is showed as below:

 public class Shellcode {
       }  catch (Exception e) {
    public native void checkShellcode(String filename);
    public native int checkShellcode(byte[] payload,int length,int[] array);
     * @param args
    public static void main(String[] args) {
       Shellcode sc=new Shellcode();


I tested the class and it works well.
I can't understand.Why it can not work in s4 while it can work well in terminal.

------------------ 原始邮件 ------------------
发件人: "Matthieu Morel"<>;
发送时间: 2013年7月8日(星期一) 下午4:54
收件人: "<>"<>; 

主题: Re: jni error


with merely the stacktrace it is difficult to make any diagnostic.

How are you loading/embedding the native library? Is it embedded in the S4R archive (you'd
probably need some customization here)?

Is this possible to reproduce, and how?



On Jul 8, 2013, at 10:42 , 唐装鼠 <> wrote:

> Hi,it looks like S4 has problem when loading libraries.
> I use JNI in my project.When call the native method,errors come out as below:
> 16:31:52.626 [atos] ERROR org.apache.s4.core.S4Node - Uncaught exception in thread atos
> java.lang.UnsatisfiedLinkError: hello.Shellcode.checkShellcode(Ljava/lang/String;)V
>     at hello.Shellcode.checkShellcode(Native Method) ~[qqApp.jar:unspecified]
>     at hello.ShellcodeCheckPE.onEvent( ~[qqApp.jar:unspecified]
>     at OverloadDispatcher709.dispatchEvent(Unknown Source) ~[na:na]
>     at org.apache.s4.core.ProcessingElement.handleInputEvent(
>     at org.apache.s4.core.Stream$ ~[s4-core-0.6.0-incubating.jar:0.6.0-incubating]
>     at org.apache.s4.comm.staging.BlockingThreadPoolExecutorService$
>     at java.util.concurrent.ThreadPoolExecutor.runWorker(
>     at java.util.concurrent.ThreadPoolExecutor$
>     at ~[na:1.7.0_25]
> Could anyone help me?

View raw message