Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error parsing PolyLine #2423

Closed
AlvaroVega opened this issue Oct 3, 2024 · 4 comments
Closed

error parsing PolyLine #2423

AlvaroVega opened this issue Oct 3, 2024 · 4 comments

Comments

@AlvaroVega
Copy link
Member

AlvaroVega commented Oct 3, 2024

time=2024-10-02T10:40:34.742Z | lvl=ERROR | corr=98ff7a1b-66af-4de9-9010-bb2f609d7882; cbnotif=1 | trans=ae03da2c-067f-4ee8-a830-9d79a6e2d438 | srv=N/A | subsrv=N/A | comp=cygnus-ngsi | op=createInstanceFromJson | msg=com.telefonica.iot.cygnus.backends.arcgis.model.PolyLine[136] : IllegalStateException error null parsing PolyLine from json {"paths":[[[-0.35552816436737716,39.476706673380434],[-0.35495815176300549,39.477923611969828]]]}

@AlvaroVega
Copy link
Member Author

AlvaroVega commented Oct 3, 2024

the problem is that "paths" are parsed two times: createInstanceFromJson and StringConstructor
Applies to PolyLine, MultiPoint and Polygon

@AlvaroVega
Copy link
Member Author

AlvaroVega commented Oct 3, 2024

After apply PR #2422 log is a different:

time=2024-10-03T09:52:46.441Z | lvl=DEBUG | corr=5ea6163e-37a7-4478-9be6-d9162f12e36f; cbnotif=1 | trans=14090188-6b7b-424b-ade1-c0b19b517923 | srv=N/A | subsrv=N/A | comp=cygnus-ngsi | op=createInstanceFromJson | msg=com.telefonica.iot.cygnus.backends.arcgis.model.Feature[360] : createInstanceFromJson jsonGeometry as JsonObject: {"paths":[[[-0.35552816436737716,39.476706673380434],[-0.35495815176300549,39.477923611969828]]]}
time=2024-10-03T09:52:46.443Z | lvl=ERROR | corr=5ea6163e-37a7-4478-9be6-d9162f12e36f; cbnotif=1 | trans=14090188-6b7b-424b-ade1-c0b19b517923 | srv=N/A | subsrv=N/A | comp=cygnus-ngsi | op=createInstanceFromJson | msg=com.telefonica.iot.cygnus.backends.arcgis.model.PolyLine[136] : UnsupportedOperationException error JsonObject parsing PolyLine from json {"paths":[[[-0.35552816436737716,39.476706673380434],[-0.35495815176300549,39.477923611969828]]]}
time=2024-10-03T09:52:46.443Z | lvl=ERROR | corr=5ea6163e-37a7-4478-9be6-d9162f12e36f; cbnotif=1 | trans=14090188-6b7b-424b-ade1-c0b19b517923 | srv=N/A | subsrv=N/A | comp=cygnus-ngsi | op=queryFeatures | msg=com.telefonica.iot.cygnus.backends.arcgis.restutils.ArcgisFeatureTable[512] : Can't cast Feature from Json, ArcgisException - Unable to parse PolyLine from json {"paths":[[[-0.35552816436737716,39.476706673380434],[-0.35495815176300549,39.477923611969828]]]} due to JsonObject
time=2024-10-03T09:52:46.443Z | lvl=ERROR | corr=5ea6163e-37a7-4478-9be6-d9162f12e36f; cbnotif=1 | trans=14090188-6b7b-424b-ade1-c0b19b517923 | srv=N/A | subsrv=N/A | comp=cygnus-ngsi | op=setError | msg=com.telefonica.iot.cygnus.backends.arcgis.restutils.ArcgisFeatureTable[602] : Error Message: Can't cast Feature from Json, ArcgisException - Unable to parse PolyLine from json {"paths":[[[-0.35552816436737716,39.476706673380434],[-0.35495815176300549,39.477923611969828]]]} due to JsonObject

@AlvaroVega
Copy link
Member Author

AlvaroVega commented Oct 3, 2024

Maybe getAsString() method is not implemented in that JsonObject. We can try simply with toString()

bf5ba41

@fgalan
Copy link
Member

fgalan commented Oct 3, 2024

Fixed by PR #2422

@fgalan fgalan closed this as completed Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants