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

FIWARE.Request.Tech.Data.CEP.Null pointer exception

    Details

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

      Description

      My name is Jose Benitez, and I am working on a FIWARE project for the FINODEX accelerator (FINODEX012).

      I am trying to run an example which is essentialy the same as the DoSAttack that is provided with FI-LAB CEP instance.

      The differences are only three: The name of the parameter that arrives, which is now temperature instead of volume; The condition of the EPA, which now is only “TR3.temperature > TR2.temperature AND TR2.temperature > TR1.temperature”; And the temporal context, which is now an sliding window of 30 seconds long.

      So with that and following the documentation, I started the Proton, which returns me the following answer:

      Request:
      GET http://localhost:8081/ProtonOnWebServerAdmin/resources/instances/ProtonOnWebServer <http://localhost:8081/ProtonOnWebServerAdmin/resources/instances/ProtonOnWebServer>
      Response:

      { "state": "started”, “definitions-url": "/ProtonOnWebServerAdmin/resources/definitions/Temperature” }

      I
      (Note that I made a tunnel to the 8081 port because my cep instance is in cloud and I am working in local).
      I have also restarted the Proton server via PUT queries.
      Now I send the following request:
      Request:
      POST (application/json) http://localhost:8081/ProtonOnWebServer/rest/events <http://localhost:8081/ProtonOnWebServer/rest/events>

      {"Name":"TrafficReport", "temperature":"23"}

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

      My Proton.properties located in /opt/tomcat10/webapps/ProtonOnWebServer/ is the following:

      metadataFileName=/opt/repositories/tomcat10/samples/Temperature.json
      metadataFilePathType=absolute
      outputPortNumber=3301
      inputPortNumber=3001

      And Temperature.json is:

      {"epn":{"events":[{"name":"TrafficReport","attributes":[

      {"name":"temperature","type":"Integer","dimension":0}

      ]},{"name":"ExpectedCrash","attributes":[

      {"name":"Incendio","type":"Double","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.temperature>TR2.temperature AND TR2.temperature>TR1.temperature","evaluationPolicy":"Immediate","cardinalityPolicy":"Single","internalSegmentation":[],"derivedEvents":[{"name":"ExpectedCrash","reportParticipants":false,"expressions":{}}],"derivedActions":[]}],"contexts":{"temporal":[

      {"name":"3MinAfterStartUp","type":"SlidingTimeWindow","atStartup":true,"neverEnding":true,"duration":30,"slidingPeriod":0,"initiators":[],"terminators":[]}

      ],"segmentation":[],"composite":[]},"consumers":[{"name":"SysTemCrashConsumer","type":"File","properties":[

      {"name":"filename","value":"./sample/Temperatura_IndendioPrevisto.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/Temperature_Alert.txt"}

      ,

      {"name":"formatter","value":"json"}

      ,

      {"name":"delimiter","value":";"}

      ,

      {"name":"tagDataSeparator","value":"="}

      ,

      {"name":"SendingDelay","value":"1000"}

      ],"events":[

      {"name":"TrafficReport"}

      ],"actions":[]}],"producers":[{"name":"TrafficReportFileProducer","type":"File","properties":[

      {"name":"filename","value":"./sample/PruebaTemperatura.txt"}

      ,

      {"name":"pollingInterval","value":"1000"}

      ,

      {"name":"sendingDelay","value":"5000"}

      ,

      {"name":"formatter","value":"json"}

      ,

      {"name":"delimiter","value":";"}

      ,

      {"name":"tagDataSeparator","value":"="}

      ],"events":[]}],"actions":[],"name”:”Temperature”}}

      I can see in the tomcat's log the following:

      Jul 17, 2015 2:39:28 PM com.ibm.hrl.proton.webapp.providers.EventJSONMessageReader readFrom
      INFO: name value: TrafficReport looking for: Name
      Jul 17, 2015 2:39:28 PM com.ibm.hrl.proton.webapp.providers.EventJSONMessageReader readFrom
      SEVERE: Could not parse json event java.lang.NullPointerException, reason: null

      Could you please help me find the error?
      Thanks in advance
      Jose Benítez
      Cofounder Secmotic Innovation S.L.
      http://www.secmotic.com <http://www.secmotic.com/>

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

      [Created via e-mail received from: =?utf-8?Q?Jose_Ben=C3=ADtez?= <jose@secmotic.com>]

      1. DOSAttackExample.json
        4 kB
        Fabiana Fournier
      1. Logo-firma.jpg
        9 kB

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        3d 2h 52m 1 Fabiana Fournier 20/Jul/15 5:33 PM
        In Progress In Progress Answered Answered
        5s 1 Fabiana Fournier 20/Jul/15 5:33 PM
        Answered Answered Closed Closed
        9d 19h 9m 1 Fabiana Fournier 30/Jul/15 12:43 PM

          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: