Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-4036

FIWARE.Request.Tech.Data.CEP.events

    Details

    • Type: extRequest
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Fix Version/s: 2021
    • Component/s: FIWARE-TECH-HELP
    • Labels:
      None

      Description

      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@il.ibm.com 972-4-8296320

      From: Marco Stenico <marco.stenico@openmove.com>
      To: Tali Yatzkar-Haham/Haifa/IBM@IBMIL
      Cc: Pasquale Vitale <pvitale@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

      _______________________________________________
      Fiware-tech-help mailing list
      Fiware-tech-help@lists.fi-ware.org
      https://lists.fi-ware.org/listinfo/fiware-tech-help

      1. image.gif
        0.1 kB
      2. image.gif
        0.1 kB
      3. image.gif
        0.1 kB
      4. image.gif
        0.1 kB
      5. image.gif
        0.1 kB
      6. image.gif
        0.1 kB
      7. image.gif
        0.1 kB
      8. image.gif
        0.1 kB
      9. image.gif
        0.1 kB
      10. image.gif
        0.1 kB
      11. image.gif
        0.1 kB
      12. image.gif
        0.1 kB
      13. image.gif
        0.1 kB
      14. image.gif
        0.1 kB
      15. image.gif
        0.1 kB
      16. image.gif
        0.1 kB
      17. image.gif
        0.1 kB
      18. image.gif
        0.1 kB
      19. image.gif
        0.1 kB

        Activity

        Hide
        fw.ext.user FW External User added a comment -

        Hi Marco,

        My intention was for you to send me the commands you use to configure the
        server on your computer, like what definition file to read, and when you
        start and stop the server. Examples of commands which I'm talking about:
        http://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/Complex_Event_Processing_Open_RESTful_API_Specification#Managing_the_Definitions_Repository
        http://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/Complex_Event_Processing_Open_RESTful_API_Specification#Administrating_Instances

        Regards,

        Itai Peri
        Software Developer
        Smart Decisions Group

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

        From: Marco Stenico <marco.stenico@openmove.com>
        To: Itai Peri/Haifa/IBM@IBMIL
        Cc: Tali Yatzkar-Haham/Haifa/IBM@IBMIL, "fiware-tech-he."
        <fiware-tech-help@lists.fi-ware.org>
        Date: 08/09/2015 05:19 PM
        Subject: Re: CEP events

        Hi,

        I used a ready made fiware image. I do not know how it was built. I wonder
        if you know what I could check to verify it was ok.

        Thanks,
        Marco

        On Tue, Sep 8, 2015 at 4:09 PM, Itai Peri <ITAIP@il.ibm.com> wrote:
        Hi,

        What do you mean by "importing models"?
        Additionally, I would appreciate if you could send me all the commands
        that you use to configure the Proton server, so we can check that
        everything is done right. (not the POST requests that encapsulate the
        events, but the commands to the server itself, like restart etc.)

        Regards,

        Itai Peri
        Software Developer
        Smart Decisions Group

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

        From: Marco Stenico <marco.stenico@openmove.com>
        To: Itai Peri/Haifa/IBM@IBMIL
        Date: 08/09/2015 03:06 PM
        Subject: Re: CEP events

        Hi,

        I configured Proton using the web interface.

        Anyway, I restarted tomcat and now it works for Test event.
        However, if I create a new event, it doesn't work for that event even
        after restarting.

        Are you able to create events using the web interface? Without importing
        models.

        Regards,
        Marco

        On Tue, Sep 8, 2015 at 1:45 PM, Itai Peri <ITAIP@il.ibm.com> wrote:
        Hi Marco,
        After consulting with Tali on the matter, we would like to ask you to
        clear tomcat's log files, start tomcat over again, do the procedure you
        did last time to try to get it working, and then send us the log files and
        also details about the REST commands you use to configure proton before
        you try to send your POST requests.

        Regards,

        Itai Peri
        Software Developer
        Smart Decisions Group

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

        From: Marco Stenico <marco.stenico@openmove.com>
        To: Itai Peri/Haifa/IBM@IBMIL
        Date: 08/09/2015 02:19 PM
        Subject: Re: CEP events

        Hi Itai,

        I do not understand what you mean. What should the path be?
        Anyway I didn't edit that file, it was created by proton.

        thanks
        Marco

        On Tue, Sep 8, 2015 at 1:00 PM, Itai Peri <ITAIP@il.ibm.com> wrote:
        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@il.ibm.com IBM Haifa Research Labs
        Phone: 972-4-828-1353 Israel

        From: Marco Stenico <marco.stenico@openmove.com>
        To: Tali Yatzkar-Haham/Haifa/IBM@IBMIL
        Cc: Pasquale Vitale <pvitale@eng.it>, Itai Peri/Haifa/IBM@IBMIL,
        "fiware-tech-he." <fiware-tech-help@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@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@il.ibm.com 972-4-8296320

        From: Marco Stenico <marco.stenico@openmove.com>
        To: Tali Yatzkar-Haham/Haifa/IBM@IBMIL
        Cc: Pasquale Vitale <pvitale@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

        Show
        fw.ext.user FW External User added a comment - Hi Marco, My intention was for you to send me the commands you use to configure the server on your computer, like what definition file to read, and when you start and stop the server. Examples of commands which I'm talking about: http://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/Complex_Event_Processing_Open_RESTful_API_Specification#Managing_the_Definitions_Repository http://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/Complex_Event_Processing_Open_RESTful_API_Specification#Administrating_Instances Regards, Itai Peri Software Developer Smart Decisions Group E-mail: itaip@il.ibm.com IBM Haifa Research Labs Phone: 972-4-828-1353 Israel From: Marco Stenico <marco.stenico@openmove.com> To: Itai Peri/Haifa/IBM@IBMIL Cc: Tali Yatzkar-Haham/Haifa/IBM@IBMIL, "fiware-tech-he." <fiware-tech-help@lists.fi-ware.org> Date: 08/09/2015 05:19 PM Subject: Re: CEP events Hi, I used a ready made fiware image. I do not know how it was built. I wonder if you know what I could check to verify it was ok. Thanks, Marco On Tue, Sep 8, 2015 at 4:09 PM, Itai Peri <ITAIP@il.ibm.com> wrote: Hi, What do you mean by "importing models"? Additionally, I would appreciate if you could send me all the commands that you use to configure the Proton server, so we can check that everything is done right. (not the POST requests that encapsulate the events, but the commands to the server itself, like restart etc.) Regards, Itai Peri Software Developer Smart Decisions Group E-mail: itaip@il.ibm.com IBM Haifa Research Labs Phone: 972-4-828-1353 Israel From: Marco Stenico <marco.stenico@openmove.com> To: Itai Peri/Haifa/IBM@IBMIL Date: 08/09/2015 03:06 PM Subject: Re: CEP events Hi, I configured Proton using the web interface. Anyway, I restarted tomcat and now it works for Test event. However, if I create a new event, it doesn't work for that event even after restarting. Are you able to create events using the web interface? Without importing models. Regards, Marco On Tue, Sep 8, 2015 at 1:45 PM, Itai Peri <ITAIP@il.ibm.com> wrote: Hi Marco, After consulting with Tali on the matter, we would like to ask you to clear tomcat's log files, start tomcat over again, do the procedure you did last time to try to get it working, and then send us the log files and also details about the REST commands you use to configure proton before you try to send your POST requests. Regards, Itai Peri Software Developer Smart Decisions Group E-mail: itaip@il.ibm.com IBM Haifa Research Labs Phone: 972-4-828-1353 Israel From: Marco Stenico <marco.stenico@openmove.com> To: Itai Peri/Haifa/IBM@IBMIL Date: 08/09/2015 02:19 PM Subject: Re: CEP events Hi Itai, I do not understand what you mean. What should the path be? Anyway I didn't edit that file, it was created by proton. thanks Marco On Tue, Sep 8, 2015 at 1:00 PM, Itai Peri <ITAIP@il.ibm.com> wrote: 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@il.ibm.com IBM Haifa Research Labs Phone: 972-4-828-1353 Israel From: Marco Stenico <marco.stenico@openmove.com> To: Tali Yatzkar-Haham/Haifa/IBM@IBMIL Cc: Pasquale Vitale <pvitale@eng.it>, Itai Peri/Haifa/IBM@IBMIL, "fiware-tech-he." <fiware-tech-help@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@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@il.ibm.com 972-4-8296320 From: Marco Stenico <marco.stenico@openmove.com> To: Tali Yatzkar-Haham/Haifa/IBM@IBMIL Cc: Pasquale Vitale <pvitale@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
        Hide
        fw.ext.user FW External User added a comment -

        Hi,

        I use only start/stop instance command. I configure Proton using the user
        interface.
        I created a project, but I am having the same problems also with the demo
        project DoSAttack where I created a new event.
        The instance runs because the status is started and I can send previously
        defined events with success.
        What I can't do is to send new events. In one case restarting tomcat solved
        the problem, but now this trick doesn't seem to work anymore.

        PUT
        http://MY_IP/ProtonOnWebServerAdmin/resources/instances/ProtonOnWebServer
        data

        {"action":"ChangeState","state":"start"}

        GET
        http://MY_IP/ProtonOnWebServerAdmin/resources/instances/ProtonOnWebServer
        output:

        { "state": "started", "definitions-url": "/ProtonOnWebServerAdmin/resources/definitions/DoSAttack" } POST http://MY_IP/ProtonOnWebServer/rest/events {"Name":"TrafficReport", "volume":"123"}

        WORK!

        POST http://MY_IP/ProtonOnWebServer/rest/events

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

        DOESN'T WORK!

        Thanks,
        Marco

        _______________________________________________
        Fiware-tech-help mailing list
        Fiware-tech-help@lists.fiware.org
        https://lists.fiware.org/listinfo/fiware-tech-help-new

        Show
        fw.ext.user FW External User added a comment - Hi, I use only start/stop instance command. I configure Proton using the user interface. I created a project, but I am having the same problems also with the demo project DoSAttack where I created a new event. The instance runs because the status is started and I can send previously defined events with success. What I can't do is to send new events. In one case restarting tomcat solved the problem, but now this trick doesn't seem to work anymore. PUT http://MY_IP/ProtonOnWebServerAdmin/resources/instances/ProtonOnWebServer data {"action":"ChangeState","state":"start"} GET http://MY_IP/ProtonOnWebServerAdmin/resources/instances/ProtonOnWebServer output: { "state": "started", "definitions-url": "/ProtonOnWebServerAdmin/resources/definitions/DoSAttack" } POST http://MY_IP/ProtonOnWebServer/rest/events {"Name":"TrafficReport", "volume":"123"} WORK! POST http://MY_IP/ProtonOnWebServer/rest/events {"Name":"NewEvent", "volume":"123"} DOESN'T WORK! Thanks, Marco _______________________________________________ Fiware-tech-help mailing list Fiware-tech-help@lists.fiware.org https://lists.fiware.org/listinfo/fiware-tech-help-new
        Hide
        fw.ext.user FW External User added a comment -

        Hi Marco,

        Have you saved AND exported the definitions from the user interface to
        /ProtonOnWebServerAdmin/resources/definitions/DoSAttack?
        Saving in the Authoring Tool is not enough, as it only saves a local copy
        of it in the authoring tool. You also need to export it back to it's
        original place for changes to take place.

        Regards,

        Itai Peri
        Software Developer
        Smart Decisions Group

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

        From: Marco Stenico <marco.stenico@openmove.com>
        To: Itai Peri/Haifa/IBM@IBMIL
        Cc: "fiware-tech-he." <fiware-tech-help@lists.fi-ware.org>, Tali
        Yatzkar-Haham/Haifa/IBM@IBMIL
        Date: 08/09/2015 06:06 PM
        Subject: Re: CEP events

        Hi,

        I use only start/stop instance command. I configure Proton using the user
        interface.
        I created a project, but I am having the same problems also with the demo
        project DoSAttack where I created a new event.
        The instance runs because the status is started and I can send previously
        defined events with success.
        What I can't do is to send new events. In one case restarting tomcat
        solved the problem, but now this trick doesn't seem to work anymore.

        PUT
        http://MY_IP/ProtonOnWebServerAdmin/resources/instances/ProtonOnWebServer
        data

        {"action":"ChangeState","state":"start"}

        GET
        http://MY_IP/ProtonOnWebServerAdmin/resources/instances/ProtonOnWebServer
        output:

        { "state": "started", "definitions-url": "/ProtonOnWebServerAdmin/resources/definitions/DoSAttack" } POST http://MY_IP/ProtonOnWebServer/rest/events {"Name":"TrafficReport", "volume":"123"}

        WORK!

        POST http://MY_IP/ProtonOnWebServer/rest/events

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

        DOESN'T WORK!

        Thanks,
        Marco

        On Tue, Sep 8, 2015 at 4:41 PM, Itai Peri <ITAIP@il.ibm.com> wrote:
        Hi Marco,

        My intention was for you to send me the commands you use to configure the
        server on your computer, like what definition file to read, and when you
        start and stop the server. Examples of commands which I'm talking about:
        http://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/Complex_Event_Processing_Open_RESTful_API_Specification#Managing_the_Definitions_Repository

        http://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/Complex_Event_Processing_Open_RESTful_API_Specification#Administrating_Instances

        Regards,

        Itai Peri
        Software Developer
        Smart Decisions Group

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

        From: Marco Stenico <marco.stenico@openmove.com>
        To: Itai Peri/Haifa/IBM@IBMIL
        Cc: Tali Yatzkar-Haham/Haifa/IBM@IBMIL, "fiware-tech-he." <
        fiware-tech-help@lists.fi-ware.org>
        Date: 08/09/2015 05:19 PM
        Subject: Re: CEP events

        Hi,

        I used a ready made fiware image. I do not know how it was built. I wonder
        if you know what I could check to verify it was ok.

        Thanks,
        Marco

        On Tue, Sep 8, 2015 at 4:09 PM, Itai Peri <ITAIP@il.ibm.com> wrote:
        Hi,

        What do you mean by "importing models"?
        Additionally, I would appreciate if you could send me all the commands
        that you use to configure the Proton server, so we can check that
        everything is done right. (not the POST requests that encapsulate the
        events, but the commands to the server itself, like restart etc.)

        Regards,

        Itai Peri
        Software Developer
        Smart Decisions Group

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

        From: Marco Stenico <marco.stenico@openmove.com>
        To: Itai Peri/Haifa/IBM@IBMIL
        Date: 08/09/2015 03:06 PM
        Subject: Re: CEP events

        Hi,

        I configured Proton using the web interface.

        Anyway, I restarted tomcat and now it works for Test event.
        However, if I create a new event, it doesn't work for that event even
        after restarting.

        Are you able to create events using the web interface? Without importing
        models.

        Regards,
        Marco

        On Tue, Sep 8, 2015 at 1:45 PM, Itai Peri <ITAIP@il.ibm.com> wrote:
        Hi Marco,
        After consulting with Tali on the matter, we would like to ask you to
        clear tomcat's log files, start tomcat over again, do the procedure you
        did last time to try to get it working, and then send us the log files and
        also details about the REST commands you use to configure proton before
        you try to send your POST requests.

        Regards,

        Itai Peri
        Software Developer
        Smart Decisions Group

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

        From: Marco Stenico <marco.stenico@openmove.com>
        To: Itai Peri/Haifa/IBM@IBMIL
        Date: 08/09/2015 02:19 PM
        Subject: Re: CEP events

        Hi Itai,

        I do not understand what you mean. What should the path be?
        Anyway I didn't edit that file, it was created by proton.

        thanks
        Marco

        On Tue, Sep 8, 2015 at 1:00 PM, Itai Peri <ITAIP@il.ibm.com> wrote:
        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@il.ibm.com IBM Haifa Research Labs
        Phone: 972-4-828-1353 Israel

        From: Marco Stenico <marco.stenico@openmove.com>
        To: Tali Yatzkar-Haham/Haifa/IBM@IBMIL
        Cc: Pasquale Vitale <pvitale@eng.it>, Itai Peri/Haifa/IBM@IBMIL,
        "fiware-tech-he." <fiware-tech-help@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@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@il.ibm.com 972-4-8296320

        From: Marco Stenico <marco.stenico@openmove.com>
        To: Tali Yatzkar-Haham/Haifa/IBM@IBMIL
        Cc: Pasquale Vitale <pvitale@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

        Show
        fw.ext.user FW External User added a comment - Hi Marco, Have you saved AND exported the definitions from the user interface to /ProtonOnWebServerAdmin/resources/definitions/DoSAttack? Saving in the Authoring Tool is not enough, as it only saves a local copy of it in the authoring tool. You also need to export it back to it's original place for changes to take place. Regards, Itai Peri Software Developer Smart Decisions Group E-mail: itaip@il.ibm.com IBM Haifa Research Labs Phone: 972-4-828-1353 Israel From: Marco Stenico <marco.stenico@openmove.com> To: Itai Peri/Haifa/IBM@IBMIL Cc: "fiware-tech-he." <fiware-tech-help@lists.fi-ware.org>, Tali Yatzkar-Haham/Haifa/IBM@IBMIL Date: 08/09/2015 06:06 PM Subject: Re: CEP events Hi, I use only start/stop instance command. I configure Proton using the user interface. I created a project, but I am having the same problems also with the demo project DoSAttack where I created a new event. The instance runs because the status is started and I can send previously defined events with success. What I can't do is to send new events. In one case restarting tomcat solved the problem, but now this trick doesn't seem to work anymore. PUT http://MY_IP/ProtonOnWebServerAdmin/resources/instances/ProtonOnWebServer data {"action":"ChangeState","state":"start"} GET http://MY_IP/ProtonOnWebServerAdmin/resources/instances/ProtonOnWebServer output: { "state": "started", "definitions-url": "/ProtonOnWebServerAdmin/resources/definitions/DoSAttack" } POST http://MY_IP/ProtonOnWebServer/rest/events {"Name":"TrafficReport", "volume":"123"} WORK! POST http://MY_IP/ProtonOnWebServer/rest/events {"Name":"NewEvent", "volume":"123"} DOESN'T WORK! Thanks, Marco On Tue, Sep 8, 2015 at 4:41 PM, Itai Peri <ITAIP@il.ibm.com> wrote: Hi Marco, My intention was for you to send me the commands you use to configure the server on your computer, like what definition file to read, and when you start and stop the server. Examples of commands which I'm talking about: http://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/Complex_Event_Processing_Open_RESTful_API_Specification#Managing_the_Definitions_Repository http://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/Complex_Event_Processing_Open_RESTful_API_Specification#Administrating_Instances Regards, Itai Peri Software Developer Smart Decisions Group E-mail: itaip@il.ibm.com IBM Haifa Research Labs Phone: 972-4-828-1353 Israel From: Marco Stenico <marco.stenico@openmove.com> To: Itai Peri/Haifa/IBM@IBMIL Cc: Tali Yatzkar-Haham/Haifa/IBM@IBMIL, "fiware-tech-he." < fiware-tech-help@lists.fi-ware.org> Date: 08/09/2015 05:19 PM Subject: Re: CEP events Hi, I used a ready made fiware image. I do not know how it was built. I wonder if you know what I could check to verify it was ok. Thanks, Marco On Tue, Sep 8, 2015 at 4:09 PM, Itai Peri <ITAIP@il.ibm.com> wrote: Hi, What do you mean by "importing models"? Additionally, I would appreciate if you could send me all the commands that you use to configure the Proton server, so we can check that everything is done right. (not the POST requests that encapsulate the events, but the commands to the server itself, like restart etc.) Regards, Itai Peri Software Developer Smart Decisions Group E-mail: itaip@il.ibm.com IBM Haifa Research Labs Phone: 972-4-828-1353 Israel From: Marco Stenico <marco.stenico@openmove.com> To: Itai Peri/Haifa/IBM@IBMIL Date: 08/09/2015 03:06 PM Subject: Re: CEP events Hi, I configured Proton using the web interface. Anyway, I restarted tomcat and now it works for Test event. However, if I create a new event, it doesn't work for that event even after restarting. Are you able to create events using the web interface? Without importing models. Regards, Marco On Tue, Sep 8, 2015 at 1:45 PM, Itai Peri <ITAIP@il.ibm.com> wrote: Hi Marco, After consulting with Tali on the matter, we would like to ask you to clear tomcat's log files, start tomcat over again, do the procedure you did last time to try to get it working, and then send us the log files and also details about the REST commands you use to configure proton before you try to send your POST requests. Regards, Itai Peri Software Developer Smart Decisions Group E-mail: itaip@il.ibm.com IBM Haifa Research Labs Phone: 972-4-828-1353 Israel From: Marco Stenico <marco.stenico@openmove.com> To: Itai Peri/Haifa/IBM@IBMIL Date: 08/09/2015 02:19 PM Subject: Re: CEP events Hi Itai, I do not understand what you mean. What should the path be? Anyway I didn't edit that file, it was created by proton. thanks Marco On Tue, Sep 8, 2015 at 1:00 PM, Itai Peri <ITAIP@il.ibm.com> wrote: 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@il.ibm.com IBM Haifa Research Labs Phone: 972-4-828-1353 Israel From: Marco Stenico <marco.stenico@openmove.com> To: Tali Yatzkar-Haham/Haifa/IBM@IBMIL Cc: Pasquale Vitale <pvitale@eng.it>, Itai Peri/Haifa/IBM@IBMIL, "fiware-tech-he." <fiware-tech-help@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@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@il.ibm.com 972-4-8296320 From: Marco Stenico <marco.stenico@openmove.com> To: Tali Yatzkar-Haham/Haifa/IBM@IBMIL Cc: Pasquale Vitale <pvitale@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
        Hide
        fw.ext.user FW External User added a comment -

        Hi,

        yes, I did. I clicked on "save and export".

        Regards,
        Marco

        _______________________________________________
        Fiware-tech-help mailing list
        Fiware-tech-help@lists.fiware.org
        https://lists.fiware.org/listinfo/fiware-tech-help-new

        Show
        fw.ext.user FW External User added a comment - Hi, yes, I did. I clicked on "save and export". Regards, Marco _______________________________________________ Fiware-tech-help mailing list Fiware-tech-help@lists.fiware.org https://lists.fiware.org/listinfo/fiware-tech-help-new
        Hide
        fw.ext.user FW External User added a comment -

        Hi Marco,
        I have tried to replicate your problem on my machine, but without success.
        I made a new EPN (defintions file), put it into ProtonWebServerAdmin
        through the RESTful API, and then sent events, and they were successfully
        processed.

        Therefore, I would appreciate if you can write more details about the
        whole process you are doing. Especially - I would like to get a screenshot
        of your definitions repository that ProtonOnWebServerAdmin uses, and your
        definitions file that is stored there that you use.

        Regards,

        Itai Peri
        Software Developer
        Smart Decisions Group

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

        From: Marco Stenico <marco.stenico@openmove.com>
        To: Itai Peri/Haifa/IBM@IBMIL
        Cc: "fiware-tech-he." <fiware-tech-help@lists.fi-ware.org>, Tali
        Yatzkar-Haham/Haifa/IBM@IBMIL
        Date: 09/09/2015 01:46 PM
        Subject: Re: CEP events

        Hi,

        yes, I did. I clicked on "save and export".

        Regards,
        Marco

        On Wed, Sep 9, 2015 at 10:39 AM, Itai Peri <ITAIP@il.ibm.com> wrote:
        Hi Marco,

        Have you saved AND exported the definitions from the user interface to
        /ProtonOnWebServerAdmin/resources/definitions/DoSAttack?
        Saving in the Authoring Tool is not enough, as it only saves a local copy
        of it in the authoring tool. You also need to export it back to it's
        original place for changes to take place.

        Regards,

        Itai Peri
        Software Developer
        Smart Decisions Group

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

        From: Marco Stenico <marco.stenico@openmove.com>
        To: Itai Peri/Haifa/IBM@IBMIL
        Cc: "fiware-tech-he." <fiware-tech-help@lists.fi-ware.org>, Tali
        Yatzkar-Haham/Haifa/IBM@IBMIL
        Date: 08/09/2015 06:06 PM
        Subject: Re: CEP events

        Hi,

        I use only start/stop instance command. I configure Proton using the user
        interface.
        I created a project, but I am having the same problems also with the demo
        project DoSAttack where I created a new event.
        The instance runs because the status is started and I can send previously
        defined events with success.
        What I can't do is to send new events. In one case restarting tomcat
        solved the problem, but now this trick doesn't seem to work anymore.

        PUT
        http://MY_IP/ProtonOnWebServerAdmin/resources/instances/ProtonOnWebServer
        data

        {"action":"ChangeState","state":"start"}

        GET
        http://MY_IP/ProtonOnWebServerAdmin/resources/instances/ProtonOnWebServer
        output:

        { "state": "started", "definitions-url": "/ProtonOnWebServerAdmin/resources/definitions/DoSAttack" } POST http://MY_IP/ProtonOnWebServer/rest/events {"Name":"TrafficReport", "volume":"123"}

        WORK!

        POST http://MY_IP/ProtonOnWebServer/rest/events

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

        DOESN'T WORK!

        Thanks,
        Marco

        On Tue, Sep 8, 2015 at 4:41 PM, Itai Peri <ITAIP@il.ibm.com> wrote:
        Hi Marco,

        My intention was for you to send me the commands you use to configure the
        server on your computer, like what definition file to read, and when you
        start and stop the server. Examples of commands which I'm talking about:
        http://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/Complex_Event_Processing_Open_RESTful_API_Specification#Managing_the_Definitions_Repository

        http://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/Complex_Event_Processing_Open_RESTful_API_Specification#Administrating_Instances

        Regards,

        Itai Peri
        Software Developer
        Smart Decisions Group

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

        From: Marco Stenico <marco.stenico@openmove.com>
        To: Itai Peri/Haifa/IBM@IBMIL
        Cc: Tali Yatzkar-Haham/Haifa/IBM@IBMIL, "fiware-tech-he." <
        fiware-tech-help@lists.fi-ware.org>
        Date: 08/09/2015 05:19 PM
        Subject: Re: CEP events

        Hi,

        I used a ready made fiware image. I do not know how it was built. I wonder
        if you know what I could check to verify it was ok.

        Thanks,
        Marco

        On Tue, Sep 8, 2015 at 4:09 PM, Itai Peri <ITAIP@il.ibm.com> wrote:
        Hi,

        What do you mean by "importing models"?
        Additionally, I would appreciate if you could send me all the commands
        that you use to configure the Proton server, so we can check that
        everything is done right. (not the POST requests that encapsulate the
        events, but the commands to the server itself, like restart etc.)

        Regards,

        Itai Peri
        Software Developer
        Smart Decisions Group

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

        From: Marco Stenico <marco.stenico@openmove.com>
        To: Itai Peri/Haifa/IBM@IBMIL
        Date: 08/09/2015 03:06 PM
        Subject: Re: CEP events

        Hi,

        I configured Proton using the web interface.

        Anyway, I restarted tomcat and now it works for Test event.
        However, if I create a new event, it doesn't work for that event even
        after restarting.

        Are you able to create events using the web interface? Without importing
        models.

        Regards,
        Marco

        On Tue, Sep 8, 2015 at 1:45 PM, Itai Peri <ITAIP@il.ibm.com> wrote:
        Hi Marco,
        After consulting with Tali on the matter, we would like to ask you to
        clear tomcat's log files, start tomcat over again, do the procedure you
        did last time to try to get it working, and then send us the log files and
        also details about the REST commands you use to configure proton before
        you try to send your POST requests.

        Regards,

        Itai Peri
        Software Developer
        Smart Decisions Group

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

        From: Marco Stenico <marco.stenico@openmove.com>
        To: Itai Peri/Haifa/IBM@IBMIL
        Date: 08/09/2015 02:19 PM
        Subject: Re: CEP events

        Hi Itai,

        I do not understand what you mean. What should the path be?
        Anyway I didn't edit that file, it was created by proton.

        thanks
        Marco

        On Tue, Sep 8, 2015 at 1:00 PM, Itai Peri <ITAIP@il.ibm.com> wrote:
        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@il.ibm.com IBM Haifa Research Labs
        Phone: 972-4-828-1353 Israel

        From: Marco Stenico <marco.stenico@openmove.com>
        To: Tali Yatzkar-Haham/Haifa/IBM@IBMIL
        Cc: Pasquale Vitale <pvitale@eng.it>, Itai Peri/Haifa/IBM@IBMIL,
        "fiware-tech-he." <fiware-tech-help@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@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@il.ibm.com 972-4-8296320

        From: Marco Stenico <marco.stenico@openmove.com>
        To: Tali Yatzkar-Haham/Haifa/IBM@IBMIL
        Cc: Pasquale Vitale <pvitale@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

        Show
        fw.ext.user FW External User added a comment - Hi Marco, I have tried to replicate your problem on my machine, but without success. I made a new EPN (defintions file), put it into ProtonWebServerAdmin through the RESTful API, and then sent events, and they were successfully processed. Therefore, I would appreciate if you can write more details about the whole process you are doing. Especially - I would like to get a screenshot of your definitions repository that ProtonOnWebServerAdmin uses, and your definitions file that is stored there that you use. Regards, Itai Peri Software Developer Smart Decisions Group E-mail: itaip@il.ibm.com IBM Haifa Research Labs Phone: 972-4-828-1353 Israel From: Marco Stenico <marco.stenico@openmove.com> To: Itai Peri/Haifa/IBM@IBMIL Cc: "fiware-tech-he." <fiware-tech-help@lists.fi-ware.org>, Tali Yatzkar-Haham/Haifa/IBM@IBMIL Date: 09/09/2015 01:46 PM Subject: Re: CEP events Hi, yes, I did. I clicked on "save and export". Regards, Marco On Wed, Sep 9, 2015 at 10:39 AM, Itai Peri <ITAIP@il.ibm.com> wrote: Hi Marco, Have you saved AND exported the definitions from the user interface to /ProtonOnWebServerAdmin/resources/definitions/DoSAttack? Saving in the Authoring Tool is not enough, as it only saves a local copy of it in the authoring tool. You also need to export it back to it's original place for changes to take place. Regards, Itai Peri Software Developer Smart Decisions Group E-mail: itaip@il.ibm.com IBM Haifa Research Labs Phone: 972-4-828-1353 Israel From: Marco Stenico <marco.stenico@openmove.com> To: Itai Peri/Haifa/IBM@IBMIL Cc: "fiware-tech-he." <fiware-tech-help@lists.fi-ware.org>, Tali Yatzkar-Haham/Haifa/IBM@IBMIL Date: 08/09/2015 06:06 PM Subject: Re: CEP events Hi, I use only start/stop instance command. I configure Proton using the user interface. I created a project, but I am having the same problems also with the demo project DoSAttack where I created a new event. The instance runs because the status is started and I can send previously defined events with success. What I can't do is to send new events. In one case restarting tomcat solved the problem, but now this trick doesn't seem to work anymore. PUT http://MY_IP/ProtonOnWebServerAdmin/resources/instances/ProtonOnWebServer data {"action":"ChangeState","state":"start"} GET http://MY_IP/ProtonOnWebServerAdmin/resources/instances/ProtonOnWebServer output: { "state": "started", "definitions-url": "/ProtonOnWebServerAdmin/resources/definitions/DoSAttack" } POST http://MY_IP/ProtonOnWebServer/rest/events {"Name":"TrafficReport", "volume":"123"} WORK! POST http://MY_IP/ProtonOnWebServer/rest/events {"Name":"NewEvent", "volume":"123"} DOESN'T WORK! Thanks, Marco On Tue, Sep 8, 2015 at 4:41 PM, Itai Peri <ITAIP@il.ibm.com> wrote: Hi Marco, My intention was for you to send me the commands you use to configure the server on your computer, like what definition file to read, and when you start and stop the server. Examples of commands which I'm talking about: http://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/Complex_Event_Processing_Open_RESTful_API_Specification#Managing_the_Definitions_Repository http://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/Complex_Event_Processing_Open_RESTful_API_Specification#Administrating_Instances Regards, Itai Peri Software Developer Smart Decisions Group E-mail: itaip@il.ibm.com IBM Haifa Research Labs Phone: 972-4-828-1353 Israel From: Marco Stenico <marco.stenico@openmove.com> To: Itai Peri/Haifa/IBM@IBMIL Cc: Tali Yatzkar-Haham/Haifa/IBM@IBMIL, "fiware-tech-he." < fiware-tech-help@lists.fi-ware.org> Date: 08/09/2015 05:19 PM Subject: Re: CEP events Hi, I used a ready made fiware image. I do not know how it was built. I wonder if you know what I could check to verify it was ok. Thanks, Marco On Tue, Sep 8, 2015 at 4:09 PM, Itai Peri <ITAIP@il.ibm.com> wrote: Hi, What do you mean by "importing models"? Additionally, I would appreciate if you could send me all the commands that you use to configure the Proton server, so we can check that everything is done right. (not the POST requests that encapsulate the events, but the commands to the server itself, like restart etc.) Regards, Itai Peri Software Developer Smart Decisions Group E-mail: itaip@il.ibm.com IBM Haifa Research Labs Phone: 972-4-828-1353 Israel From: Marco Stenico <marco.stenico@openmove.com> To: Itai Peri/Haifa/IBM@IBMIL Date: 08/09/2015 03:06 PM Subject: Re: CEP events Hi, I configured Proton using the web interface. Anyway, I restarted tomcat and now it works for Test event. However, if I create a new event, it doesn't work for that event even after restarting. Are you able to create events using the web interface? Without importing models. Regards, Marco On Tue, Sep 8, 2015 at 1:45 PM, Itai Peri <ITAIP@il.ibm.com> wrote: Hi Marco, After consulting with Tali on the matter, we would like to ask you to clear tomcat's log files, start tomcat over again, do the procedure you did last time to try to get it working, and then send us the log files and also details about the REST commands you use to configure proton before you try to send your POST requests. Regards, Itai Peri Software Developer Smart Decisions Group E-mail: itaip@il.ibm.com IBM Haifa Research Labs Phone: 972-4-828-1353 Israel From: Marco Stenico <marco.stenico@openmove.com> To: Itai Peri/Haifa/IBM@IBMIL Date: 08/09/2015 02:19 PM Subject: Re: CEP events Hi Itai, I do not understand what you mean. What should the path be? Anyway I didn't edit that file, it was created by proton. thanks Marco On Tue, Sep 8, 2015 at 1:00 PM, Itai Peri <ITAIP@il.ibm.com> wrote: 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@il.ibm.com IBM Haifa Research Labs Phone: 972-4-828-1353 Israel From: Marco Stenico <marco.stenico@openmove.com> To: Tali Yatzkar-Haham/Haifa/IBM@IBMIL Cc: Pasquale Vitale <pvitale@eng.it>, Itai Peri/Haifa/IBM@IBMIL, "fiware-tech-he." <fiware-tech-help@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@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@il.ibm.com 972-4-8296320 From: Marco Stenico <marco.stenico@openmove.com> To: Tali Yatzkar-Haham/Haifa/IBM@IBMIL Cc: Pasquale Vitale <pvitale@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

          People

          • Assignee:
            TALI Fabiana Fournier
            Reporter:
            fw.ext.user FW External User
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: