incubator-s4-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthieu Morel <matth...@yahoo-inc.com>
Subject Re: 回复: dependency
Date Thu, 09 May 2013 10:53:11 GMT

On May 9, 2013, at 05:26 , 唐装鼠 wrote:


Hi,I have read the dependency document  http://incubator.apache.org/s4/doc/0.6.0/application_dependencies/;
I want to use jnetpcap in my project.
I edited the build.gradle by adding compile ':jnetpcap' to dependencies {}.
And while I run the command "./s4 s4r -a=hello.HelloApp -b=`pwd`/build.gradle myApp",it showed
"build successful".
However,while the project was running,it came below errors:

10:39:18.003 [itoa] ERROR org.apache.s4.core.S4Node - Uncaught exception in thread itoa
java.lang.NoClassDefFoundError: Could not initialize class org.jnetpcap.packet.PcapPacket
    at hello.AbstractPE.onEvent(AbstractPE.java:28) ~[phishApp.jar:unspecified]
    at OverloadDispatcher192.dispatchEvent(Unknown Source) ~[na:na]
    at org.apache.s4.core.ProcessingElement.handleInputEvent(ProcessingElement.java:461) ~[s4-core-0.6.0-incubating.jar:0.6.0-incubating]
    at org.apache.s4.core.Stream$StreamEventProcessingTask.run(Stream.java:333) ~[s4-core-0.6.0-incubating.jar:0.6.0-incubating]
    at org.apache.s4.comm.staging.BlockingThreadPoolExecutorService$RunnableWithPermitRelease.run(BlockingThreadPoolExecutorService.java:178)
~[s4-comm-0.6.0-incubating.jar:0.6.0-incubating]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) ~[na:1.7.0_19]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) ~[na:1.7.0_19]
    at java.lang.Thread.run(Thread.java:722) ~[na:1.7.0_19]


I don't know what caused the error.I check the *.jar file compiled by the s4r command.In the
*.jar file ,there is class org.jnetpcap.packet.PcapPacket in jnetpcap.jar file.


If your dependency is not in the standard maven repository, make sure it is in the lib directory.

The jnetpcap.jar file must be embedded in the generated s4r file, can you make sure this is
the case (just unzip to check)?


Matthieu


------------------ 原始邮件 ------------------
发件人: "Matthieu Morel"<mmorel@apache.org<mailto:mmorel@apache.org>>;
发送时间: 2013年5月8日(星期三) 晚上9:42
收件人: "s4-user"<s4-user@incubator.apache.org<mailto:s4-user@incubator.apache.org>>;
主题: Re: dependency

Please check the 0.6.0 documentation here: http://incubator.apache.org/s4/doc/0.6.0/application_dependencies/

Hope this helps,

Matthieu

On May 8, 2013, at 15:39 , 唐装鼠 wrote:

How to add dependencies to my S4 application?
I want to use jnetpcap in one PE.
How to add dependencies to my s4 application?



Mime
View raw message