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

FIWARE.Request.Tech.Data.CEP.Orion-Integration

    Details

    • Type: extRequest
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Fix Version/s: 2021
    • Component/s: FIWARE-TECH-HELP
    • Labels:
      None
    • Sender Email:
    • HD-Chapter:
      Data
    • HD-Enabler:
      CEP

      Description

      Hi all,

      i have some troubles integration Orion and CEP

      Orion version:
      Name : contextBroker
      Arch : x86_64
      Version : 1.2.0
      Release : 1
      Size : 3.8 M
      Repo : installed
      From repo : testbed-fi-ware
      Summary : Orion Context Broker
      URL :
      http://catalogue.fiware.org/enablers/publishsubscribe-context-broker-orion-context-broker
      License : AGPLv3
      Description : The Orion Context Broker is an implementation of NGSI9 and
      NGSI10 interfaces.
      : Using these interfaces, clients can do several operations:
      : * Register context producer applications, e.g. a temperature
      sensor within a room.
      : * Update context information, e.g. send updates of
      temperature.
      : * Being notified when changes on context information take
      place (e.g. the
      : temperature has changed) or with a given frecuency (e.g.
      get the temperature
      : each minute).
      : * Query context information. The Orion Context Broker stores
      context information
      : updated from applications, so queries are resolved based on
      that information.

      CEP version: the one installed with the image cep-r3.3.3-img
      <https://cloud.lab.fiware.org/#nova/images/91ea7bbc-714c-403c-930d-e575a8c81916>

      I have subscribed CEP to Orion updates, and i got the following error in
      catalina.out
      Tue Jun 14 10:53:42 CEST 2016 - Archon1 loaded sucessfully
      14-jun-2016 10:54:21
      com.ibm.hrl.proton.webapp.providers.EventJSONMessageReader readFrom
      INFO: started event message body reader
      14-jun-2016 10:54:21
      com.ibm.hrl.proton.webapp.providers.EventJSONMessageReader readFrom
      *GRAVE: Could not parse json event org.apache.wink.json4j.JSONException:
      The key [Name] was not in the map, reason: The key [Name] was not in the
      map*

      This is data definition in CEP:

      1. curl 127.0.0.1:8080/ProtonOnWebServerAdmin/resources/definitions
        [ {"name":"\/opt\/repositories\/tomcat10\/Archon1.json","url":"\/ProtonOnWebServerAdmin\/resources\/definitions\/Archon1"}

        ]

      {"declaredClass":"metadata.CreateJSON","epn":{"events":[{"name":"RoomContextUpdate","attributes":[

      {"dimension":0,"description":"The certainty that this event happen (value between 0 to 1)","name":"temperature","type":"Double"}

      ,

      {"dimension":0,"description":"No value means it equals the event detection time, other option is to use one of the defined distribution functions with parameters","name":"pressure","type":"Integer"}

      ,

      {"dimension":0,"name":"entityType","type":"String"}

      ,

      {"dimension":0,"name":"entityId","type":"String"}

      ],"createdDate":"Mon
      Jun 13
      2016"}],"name":"Archon1","consumers":[],"epas":[],"contexts":

      {"temporal":[],"segmentation":[],"composite":[]}

      ,"producers":[],"actions":[]}}

      This is the definition on Orion:
      {
      "contextResponses": [
      {
      "contextElement": {
      "attributes": [

      { "name": "entityId", "type": "string", "value": "dwaee" }

      ,

      { "name": "entityType", "type": "string", "value": "Room" }

      ,

      { "name": "pressure", "type": "integer", "value": "712" }

      ,

      { "name": "temperature", "type": "float", "value": "23" }

      ],
      "id": "Room2",
      "isPattern": "false",
      "type": "Room"
      },
      "statusCode":

      { "code": "200", "reasonPhrase": "OK" }

      }
      ]
      }

      Can you help me on this topic?

      Thanks

      Daniele

      Since January 1st, old domains won't be supported and messages sent to any domain different to @lists.fiware.org will be lost.
      Please, send your messages using the new domain (Fiware-lab-help@lists.fiware.org) instead of the old one.
      _______________________________________________
      Fiware-lab-help mailing list
      Fiware-lab-help@lists.fiware.org
      https://lists.fiware.org/listinfo/fiware-lab-help
      [Created via e-mail received from: Daniele Stanzani <ds@archon.ai>]

        Issue Links

          Activity

          Hide
          mev Manuel Escriche added a comment -

          Hi Daniele,
          This tickets has been created to give you support for CEP questions since Fermin, Orion GE Owner informs last questions are related to CEP.
          Thanks.
          Manuel

          Show
          mev Manuel Escriche added a comment - Hi Daniele, This tickets has been created to give you support for CEP questions since Fermin, Orion GE Owner informs last questions are related to CEP. Thanks. Manuel
          Hide
          mev Manuel Escriche added a comment -

          Last question we got for Uri to answer:
          Comment by ds@archon.ai :
          Orion sends this data to CEP:
          POST /ProtonOnWebServer/rest/events HTTP/1.1
          User-Agent: orion/0.28.0 libcurl/7.19.7
          Host: 192.168.100.155:8080
          Accept: application/xml, application/json
          Content-length: 902
          Content-type: application/xml
          <notifyContextRequest>
          <subscriptionId>575fd8b6d57eb098cfd3c17e</subscriptionId>
          <originator>localhost</originator>
          <contextResponseList>
          <contextElementResponse>
          <contextElement>
          <entityId type="Room" isPattern="false">
          <id>Room2</id>
          </entityId>
          <contextAttributeList>
          <contextAttribute>
          <name>pressure</name>
          <type>integer</type>
          <contextValue>713</contextValue>
          </contextAttribute>
          <contextAttribute>
          <name>temperature</name>
          <type>float</type>
          <contextValue>23</contextValue>
          </contextAttribute>
          </contextAttributeList>
          </contextElement>
          <statusCode>
          <code>200</code>
          <reasonPhrase>OK</reasonPhrase>
          </statusCode>
          </contextElementResponse>
          </contextResponseList>
          </notifyContextRequest>
          And the error is as follows:
          INFO: started event message body reader
          20-jun-2016 10:35:48
          com.ibm.hrl.proton.webapp.providers.EventXmlNgsiMessageReader readFrom
          *GRAVE: Could not parse XML NGSI event java.lang.NullPointerException,
          reason: null*
          last attribute name: null last value: null
          20-jun-2016 10:35:48
          com.ibm.hrl.proton.webapp.providers.EventXmlNgsiMessageReader readFrom
          INFO: finished event message body reader
          20-jun-2016 10:35:48 com.ibm.hrl.proton.webapp.resources.EventResource
          submitNewEvent
          INFO: starting submitNewEvent
          20-jun-2016 10:35:48 com.ibm.hrl.proton.webapp.resources.EventResource
          submitNewEvent
          GRAVE: Could not send event, reason: java.lang.NullPointerException,
          message: null
          Thanks
          Daniele
          On Mon, Jun 20, 2016 at 10:16 AM, Daniele Stanzani <ds@archon.ai> wrote:
          > Hello,
          >
          > i have downgraded orion and the error disappeared, but now i get this null
          > pointer execption
          >
          > INFO: starting submitNewEvent
          > 20-jun-2016 10:15:27 com.ibm.hrl.proton.webapp.resources.EventResource
          > submitNewEvent
          > GRAVE: Could not send event, reason: java.lang.NullPointerException,
          > message: null
          >
          > Ant hint on this?
          >
          > Thanks
          >
          > Daniele
          >
          >
          > On Tue, Jun 14, 2016 at 11:55 AM, Help-Desk <jira-help-desk@fi-ware.org>
          > wrote:
          >
          >>
          >>
          >

          Show
          mev Manuel Escriche added a comment - Last question we got for Uri to answer: Comment by ds@archon.ai : Orion sends this data to CEP: POST /ProtonOnWebServer/rest/events HTTP/1.1 User-Agent: orion/0.28.0 libcurl/7.19.7 Host: 192.168.100.155:8080 Accept: application/xml, application/json Content-length: 902 Content-type: application/xml <notifyContextRequest> <subscriptionId>575fd8b6d57eb098cfd3c17e</subscriptionId> <originator>localhost</originator> <contextResponseList> <contextElementResponse> <contextElement> <entityId type="Room" isPattern="false"> <id>Room2</id> </entityId> <contextAttributeList> <contextAttribute> <name>pressure</name> <type>integer</type> <contextValue>713</contextValue> </contextAttribute> <contextAttribute> <name>temperature</name> <type>float</type> <contextValue>23</contextValue> </contextAttribute> </contextAttributeList> </contextElement> <statusCode> <code>200</code> <reasonPhrase>OK</reasonPhrase> </statusCode> </contextElementResponse> </contextResponseList> </notifyContextRequest> And the error is as follows: INFO: started event message body reader 20-jun-2016 10:35:48 com.ibm.hrl.proton.webapp.providers.EventXmlNgsiMessageReader readFrom *GRAVE: Could not parse XML NGSI event java.lang.NullPointerException, reason: null* last attribute name: null last value: null 20-jun-2016 10:35:48 com.ibm.hrl.proton.webapp.providers.EventXmlNgsiMessageReader readFrom INFO: finished event message body reader 20-jun-2016 10:35:48 com.ibm.hrl.proton.webapp.resources.EventResource submitNewEvent INFO: starting submitNewEvent 20-jun-2016 10:35:48 com.ibm.hrl.proton.webapp.resources.EventResource submitNewEvent GRAVE: Could not send event, reason: java.lang.NullPointerException, message: null Thanks Daniele On Mon, Jun 20, 2016 at 10:16 AM, Daniele Stanzani <ds@archon.ai> wrote: > Hello, > > i have downgraded orion and the error disappeared, but now i get this null > pointer execption > > INFO: starting submitNewEvent > 20-jun-2016 10:15:27 com.ibm.hrl.proton.webapp.resources.EventResource > submitNewEvent > GRAVE: Could not send event, reason: java.lang.NullPointerException, > message: null > > Ant hint on this? > > Thanks > > Daniele > > > On Tue, Jun 14, 2016 at 11:55 AM, Help-Desk <jira-help-desk@fi-ware.org> > wrote: > >> >> >
          Hide
          urishani Uri Shani added a comment -

          Still looking into this issue and will respond soon with more clarifications.
          Thanks,

          • Uri
          Show
          urishani Uri Shani added a comment - Still looking into this issue and will respond soon with more clarifications. Thanks, Uri
          Hide
          urishani Uri Shani added a comment -

          As far as we can see, the user is sending JSON NGSI events which Proton doesn't support.
          It will help if the user shares how notifyContextRequests notifications sent by ContextBroker look ?
          (just to make sure it is indeed JSON and not XML)
          Thanks.

          Show
          urishani Uri Shani added a comment - As far as we can see, the user is sending JSON NGSI events which Proton doesn't support. It will help if the user shares how notifyContextRequests notifications sent by ContextBroker look ? (just to make sure it is indeed JSON and not XML) Thanks.
          Hide
          urishani Uri Shani added a comment -

          Closing due to no further response form the user.

          Show
          urishani Uri Shani added a comment - Closing due to no further response form the user.

            People

            • Assignee:
              urishani Uri Shani
              Reporter:
              fw.ext.user FW External User
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: