Created question in FIWARE Q/A platform on 19-05-2015 at 10:05
Please, ANSWER this question AT http://stackoverflow.com/questions/30320326/null-pointer-exception-on-cep-event
Question:
Null Pointer Exception on CEP event
Description:
I'm sending a REST post request to Proton CEP from Context Broker (both in localhost) but when it receives the event can not read the xml.
This is the catalina log:
may 20, 2015 9:38:52 AM com.ibm.hrl.proton.webapp.providers.EventXmlNgsiMessageReader readFrom
INFORMACIÓN: started event message body reader
may 20, 2015 9:38:52 AM com.ibm.hrl.proton.webapp.providers.EventXmlNgsiMessageReader readFrom
INFORMACIÓN: Event: TripContextUpdate
may 20, 2015 9:38:52 AM 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
may 20, 2015 9:38:52 AM com.ibm.hrl.proton.webapp.providers.EventXmlNgsiMessageReader readFrom
INFORMACIÓN: finished event message body reader
may 20, 2015 9:38:52 AM com.ibm.hrl.proton.webapp.resources.EventResource submitNewEvent
INFORMACIÓN: starting submitNewEvent
may 20, 2015 9:38:52 AM com.ibm.hrl.proton.webapp.resources.EventResource submitNewEvent
GRAVE: Could not send event, reason: java.lang.NullPointerException, message: null
When I send it a REST post in JSON format the response is:
may 20, 2015 10:23:57 AM com.ibm.hrl.proton.webapp.providers.EventJSONMessageReader readFrom
INFORMACIÓN: started event message body reader
may 20, 2015 10:23:57 AM 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