CEP events

Itai Peri ITAIP at il.ibm.com
Tue Sep 8 13:00:52 CEST 2015


Hello Marco,

I've re-created your scenario on my computer, with your DoSAttack.json 
definitions file, and it works fine for me.
Looking at your Proton.properties file, it looks as if your problem is 
that the path is absolute (there is no drive or root directory at the 
beginning as it seems to me), instead of relative.
Please check again that the routing to your definitions file is correct, 
and let me know.
I will note that even if this is the problem, I'm not sure why the error 
you're getting is this specific one, but let's try to understand this one 
thing at a time.

Regards, 

Itai Peri
Software Developer
Smart Decisions Group

E-mail: itaip at il.ibm.com        IBM Haifa Research Labs
Phone: 972-4-828-1353   Israel



From:   Marco Stenico <marco.stenico at openmove.com>
To:     Tali Yatzkar-Haham/Haifa/IBM at IBMIL
Cc:     Pasquale Vitale <pvitale at eng.it>, Itai Peri/Haifa/IBM at IBMIL, 
"fiware-tech-he." <fiware-tech-help at lists.fi-ware.org>
Date:   08/09/2015 11:08 AM
Subject:        Re: CEP events



Thanks for your answer.

I modified DoSAttack project and duplicated TrafficReport just for 
testing. The original TrafficReport works, the duplicate Test doesn't.


=== Proton.properties ====
#Mon Sep 07 14:14:56 CEST 2015
metadataFileName=/opt/repositories/tomcat10/DoSAttack.json
metadataFilePathType=absolute
outputPortNumber=3301
inputPortNumber=3001

=== Logs ===
08-sep-2015 9:43:52 
com.ibm.hrl.proton.webapp.providers.EventJSONMessageReader readFrom
INFO: started event message body reader
08-sep-2015 9:43:52 
com.ibm.hrl.proton.webapp.providers.EventJSONMessageReader readFrom
INFO: name value: Test looking for: Name
08-sep-2015 9:43:52 
com.ibm.hrl.proton.webapp.providers.EventJSONMessageReader readFrom
GRAVE: Could not parse json event java.lang.NullPointerException, reason: 
null

=== Export ===

{"epn":{"events":[{"name":"TrafficReport","attributes":[{"name":"volume","type":"Integer","dimension":0}]},{"name":"ExpectedCrash","attributes":[{"name":"Cost","type":"Double","dimension":0}]},{"name":"Test","createdDate":"Mon 
Sep 07 
2015","attributes":[{"name":"volume","type":"Integer","dimension":"0"}]},{"name":"TT","attributes":[{"name":"volume","type":"Integer","dimension":0}]}],"epas":[{"name":"IncreasingTraffic","epaType":"Sequence","context":"3MinAfterStartUp","inputEvents":[{"name":"TrafficReport","alias":"TR1","consumptionPolicy":"Consume","instanceSelectionPolicy":"First"},{"name":"TrafficReport","alias":"TR2","consumptionPolicy":"Consume","instanceSelectionPolicy":"First"},{"name":"TrafficReport","alias":"TR3","consumptionPolicy":"Consume","instanceSelectionPolicy":"First"}],"computedVariables":[],"assertion":"TR3.volume>1.50* 
TR2.volume AND TR2.volume>1.50 * 
TR1.volume","evaluationPolicy":"Immediate","cardinalityPolicy":"Single","internalSegmentation":[],"derivedEvents":[{"name":"ExpectedCrash","reportParticipants":false,"expressions":{"Cost":"10.0"}}],"derivedActions":[]}],"contexts":{"temporal":[{"name":"3MinAfterStartUp","type":"TemporalInterval","atStartup":true,"neverEnding":false,"initiators":[],"terminators":[{"terminatorType":"RelativeTime","terminationType":"Terminate","relativeTime":"180000"}]}],"segmentation":[],"composite":[]},"consumers":[{"name":"SysTemCrashConsumer","type":"File","properties":[{"name":"filename","value":"./sample/DoSAttack_PredictedCrash.txt"},{"name":"formatter","value":"json"},{"name":"delimiter","value":";"},{"name":"tagDataSeparator","value":"="},{"name":"SendingDelay","value":"1000"}],"events":[{"name":"ExpectedCrash"}],"actions":[]},{"name":"DoSAttackTRConsumer","type":"File","properties":[{"name":"filename","value":"./sample/DoSAttack_TrafficReport.txt"},{"name":"formatter","value":"json"},!
 {"name":"delimiter","value":";"},{"name":"tagDataSeparator","value":"="},{"name":"SendingDelay","value":"1000"}],"events":[{"name":"TrafficReport"}],"actions":[]}],"producers":[],"actions":[],"name":"DoSAttack"}}

=== What I send in POST request ===

{"Name":"Test", "volume":"123"}

Please note that {"Name":"TrafficReport", "volume":"123"} works


On Mon, Sep 7, 2015 at 3:54 PM, Tali Yatzkar-Haham <TALI at il.ibm.com> 
wrote:
Hi Marco, 

Usually it indeed happen when the structure of the event definition does 
not match the event you send. 
In order to analyse the issue could you please send us: 
1. The CEP definition file (exported from the Authoring tool) 
2. The tomcat log file (under <tomcat installation dir> / log) 
3. Proton.properties file (from the <tomcat installation 
dir>/webapps/ProtonOnWebServer/config/Proton.properties) 
4. The data you send in the POST command and the command header. 

I cc the fiware tech help in order to have the issue documented. 

Thanks,
Tali

Tali Yatzkar Haham 
Smart Decision Solutions
IBM Research - Haifa, Israel
tali at il.ibm.com 972-4-8296320




From:        Marco Stenico <marco.stenico at openmove.com> 
To:        Tali Yatzkar-Haham/Haifa/IBM at IBMIL 
Cc:        Pasquale Vitale <pvitale at eng.it> 
Date:        07/09/2015 03:51 PM 
Subject:        CEP events 




Hi, 

I am using CEP Proton in the contest of Finodex challenge. I am having 
some problems in sending events through the REST interface. 

The error I receive is 

Could not parse json event java.lang.NullPointerException, reason: null 

Event definition matches my POST request. The demo project works, but not 
for new events. I tested it with duplicates of TrafficReport without 
success. 


Thanks, 
Marco 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.fiware.org/private/fiware-tech-help/attachments/20150908/c985a80f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 92 bytes
Desc: not available
URL: <https://lists.fiware.org/private/fiware-tech-help/attachments/20150908/c985a80f/attachment.gif>


More information about the Fiware-tech-help mailing list

You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy   Cookies policy