Closed jason-fox closed 4 years ago
This one I can't reproduce. Works just fine for me ...
This seems to be a Postman only issue:
time=Tuesday 18 Feb 10:39:27 2020.715Z | lvl=INFO | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=logMsg.h[1916]:lmTransactionEnd | msg=Transaction ended
time=Tuesday 18 Feb 10:41:06 2020.934Z | lvl=WARN | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=orionldMhdConnectionInit.cpp[279]:orionldMhdConnectionInit | msg=------------------------- Servicing NGSI-LD request 038: PATCH /ngsi-ld/v1/entities/urn:ngsi-ld:Shelf:unit001/attrs --------------------------
time=Tuesday 18 Feb 10:41:06 2020.935Z | lvl=WARN | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=rest.cpp[590]:httpHeaderGet | msg=FWD: Got HTTP Header: Link: <https://fiware.github.io/tutorials.Step-by-Step/tutorials-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"
time=Tuesday 18 Feb 10:41:06 2020.935Z | lvl=WARN | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=rest.cpp[590]:httpHeaderGet | msg=FWD: Got HTTP Header: Content-Type: application/json
time=Tuesday 18 Feb 10:41:06 2020.935Z | lvl=WARN | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=rest.cpp[590]:httpHeaderGet | msg=FWD: Got HTTP Header: User-Agent: PostmanRuntime/7.22.0
time=Tuesday 18 Feb 10:41:06 2020.936Z | lvl=WARN | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=rest.cpp[590]:httpHeaderGet | msg=FWD: Got HTTP Header: Accept: */*
time=Tuesday 18 Feb 10:41:06 2020.936Z | lvl=WARN | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=rest.cpp[590]:httpHeaderGet | msg=FWD: Got HTTP Header: Host: localhost:1026
time=Tuesday 18 Feb 10:41:06 2020.936Z | lvl=WARN | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=rest.cpp[590]:httpHeaderGet | msg=FWD: Got HTTP Header: Accept-Encoding: gzip, deflate, br
time=Tuesday 18 Feb 10:41:06 2020.936Z | lvl=WARN | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=rest.cpp[590]:httpHeaderGet | msg=FWD: Got HTTP Header: Content-Length: 55
time=Tuesday 18 Feb 10:41:06 2020.936Z | lvl=WARN | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=rest.cpp[590]:httpHeaderGet | msg=FWD: Got HTTP Header: Cookie: _csrf=MAPTGFPcoPnewsGCWklHi4Mq; connect.sid=s%3Akghk0WDrWw8O6Zv98gVFFNOnFm4ipsJ1.cEZcCYmr%2BcPbE%2Fb0EPOO8IuRBrBOmIeFgv%2FBiU3QjRw
time=Tuesday 18 Feb 10:41:06 2020.937Z | lvl=WARN | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=rest.cpp[590]:httpHeaderGet | msg=FWD: Got HTTP Header: Connection: keep-alive
time=Tuesday 18 Feb 10:41:06 2020.937Z | lvl=ERROR | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=orionldMhdConnectionTreat.cpp[134]:contentTypeCheck | msg=Bad Input (@context missing in JSON payload: For application/ld+json, the @context must be present in the JSON payload)
time=Tuesday 18 Feb 10:41:06 2020.971Z | lvl=INFO | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=logMsg.h[1916]:lmTransactionEnd | msg=Transaction ended
time=Tuesday 18 Feb 10:42:03 2020.646Z | lvl=WARN | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion |
op=orionldMhdConnectionInit.cpp[279]:orionldMhdConnectionInit | msg=------------------------- Servicing NGSI-LD request 039: PATCH /ngsi-ld/v1/entities/urn:ngsi-ld:Shelf:unit001/attrs --------------------------
time=Tuesday 18 Feb 10:42:03 2020.647Z | lvl=WARN | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=rest.cpp[590]:httpHeaderGet | msg=FWD: Got HTTP Header: Host: localhost:1026
time=Tuesday 18 Feb 10:42:03 2020.647Z | lvl=WARN | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=rest.cpp[590]:httpHeaderGet | msg=FWD: Got HTTP Header: User-Agent: curl/7.64.1
time=Tuesday 18 Feb 10:42:03 2020.647Z | lvl=WARN | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=rest.cpp[590]:httpHeaderGet | msg=FWD: Got HTTP Header: Accept: */*
time=Tuesday 18 Feb 10:42:03 2020.647Z | lvl=WARN | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=rest.cpp[590]:httpHeaderGet | msg=FWD: Got HTTP Header: Link: <https://fiware.github.io/tutorials.Step-by-Step/tutorials-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"
time=Tuesday 18 Feb 10:42:03 2020.647Z | lvl=WARN | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=rest.cpp[590]:httpHeaderGet | msg=FWD: Got HTTP Header: Content-Type: application/json
time=Tuesday 18 Feb 10:42:03 2020.647Z | lvl=WARN | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=rest.cpp[590]:httpHeaderGet | msg=FWD: Got HTTP Header: Content-Length: 55
time=Tuesday 18 Feb 10:42:03 2020.648Z | lvl=WARN | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=mongoCppLegacyKjTreeFromBsonObj.cpp[54]:mongoCppLegacyKjTreeFromBsonObj | msg=BsonObj Converted to a JSON String: { "_id" : { "id" : "urn:ngsi-ld:Shelf:unit001", "type" : "https://fiware.github.io/tutorials.Step-by-Step/schema/Shelf", "servicePath" : "/" }, "attrNames" : [ "location", "https://fiware.github.io/tutorials.Step-by-Step/schema/maxCapacity", "https://fiware.github.io/tutorials.Step-by-Step/schema/numberOfItems", "https://uri.etsi.org/ngsi-ld/name", "https://fiware.github.io/tutorials.Step-by-Step/schema/stocks", "https://fiware.github.io/tutorials.Step-by-Step/schema/locatedIn" ], "attrs" : { "location" : { "type" : "GeoProperty", "creDate" : 1582022298, "modDate" : 1582022298, "value" : { "type" : "Point", "coordinates" : [ 13.3986112, 52.554699 ] }, "mdNames" : [] }, "https://fiware=github=io/tutorials=Step-by-Step/schema/maxCapacity" : { "type" : "Property", "creDate" : 1582022298, "modDate" : 1582022298, "value" : 50, "mdNames" : [] }, "https://fiware=github=io/tutorials=Step-by-Step/schema/numberOfItems" : { "value" : 9, "type" : "Property", "mdNames" : [], "creDate" : 1582022298, "modDate" : 1582022354 }, "https://uri=etsi=org/ngsi-ld/name" : { "type" : "Property", "creDate" : 1582022298, "modDate" : 1582022298, "value" : "Corner Unit", "mdNames" : [] }, "https://fiware=github=io/tutorials=Step-by-Step/schema/stocks" : { "type" : "Relationship", "creDate" : 1582022298, "modDate" : 1582022298, "value" : "urn:ngsi-ld:Product:001", "mdNames" : [] }, "https://fiware=github=io/tutorials=Step-by-Step/schema/locatedIn" : { "type" : "Relationship", "creDate" : 1582022298, "modDate" : 1582022298, "value" : "urn:ngsi-ld:Building:store001", "md" : { "https://fiware=github=io/tutorials=Step-by-Step/schema/requestedBy" : { "type" : "Relationship", "value" : "urn:ngsi-ld:Person:bob-the-manager" }, "https://fiware=github=io/tutorials=Step-by-Step/schema/installedBy" : { "type" : "Relationship", "value" : "urn:ngsi-ld:Person:employee001" }, "https://fiware=github=io/tutorials=Step-by-Step/schema/statusOfWork" : { "type" : "Property", "value" : "https://fiware.github.io/tutorials.Step-by-Step/schema/completed" } }, "mdNames" : [ "https://fiware.github.io/tutorials.Step-by-Step/schema/requestedBy", "https://fiware.github.io/tutorials.Step-by-Step/schema/installedBy", "https://fiware.github.io/tutorials.Step-by-Step/schema/statusOfWork" ] } }, "creDate" : 1582022298, "modDate" : 1582022354, "location" : { "attrName" : "location", "coords" : { "type" : "Point", "coordinates" : [ 13.3986112, 52.554699 ] } }, "lastCorrelator" : "" }
time=Tuesday 18 Feb 10:42:03 2020.649Z | lvl=DEBUG | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=MongoGlobal.cpp[611]:composeDatabaseName | msg=database name composed: 'orion'
time=Tuesday 18 Feb 10:42:03 2020.650Z | lvl=INFO | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=connectionOperations.cpp[94]:collectionQuery | msg=Database Operation Successful (query: { _id.id: "urn:ngsi-ld:Shelf:unit001", _id.servicePath: { $in: [ null, /^/$/ ] } })
time=Tuesday 18 Feb 10:42:03 2020.650Z | lvl=INFO | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=logMsg.h[1916]:lmTransactionEnd | msg=Transaction ended
"Fixed" by rebooting Postman - closing as non-reproducible.
I create a shelf Unit:
I update the shelf unit providing the
@context
in aLink
Header and settingContent-type=application/json
I receive an invalid BadRequestData response - note my payload is JSON only.