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

Conflicting property-based creators, JSON LineString mapping #58

Closed
aldayj-intific opened this issue Feb 21, 2017 · 4 comments

Comments

@aldayj-intific
Copy link

commented Feb 21, 2017

I believe the version of com.fasterxml.jackson compiled with geospark is out of date, and carries a bug when reading LineString data from JSON.

java.lang.RuntimeException: java.lang.RuntimeException: com.fasterxml.jackson.databind.JsonMappingException: Conflicting property-based creators: already had explicitly marked [constructor for org.wololo.geojson.LineString, annotations: {interface com.fasterxml.jackson.annotation.JsonCreator=@com.fasterxml.jackson.annotation.JsonCreator(mode=DEFAULT)}], encountered [constructor for org.wololo.geojson.LineString, annotations: {interface com.fasterxml.jackson.annotation.JsonCreator=@com.fasterxml.jackson.annotation.JsonCreator(mode=DEFAULT)}] at GeoExample$CustomGeoJsonMapper.call(GeoExample.java:262) at GeoExample$CustomGeoJsonMapper.call(GeoExample.java:232) at org.apache.spark.api.java.JavaRDDLike$$anonfun$fn$1$1.apply(JavaRDDLike.scala:125) at org.apache.spark.api.java.JavaRDDLike$$anonfun$fn$1$1.apply(JavaRDDLike.scala:125) at scala.collection.Iterator$$anon$12.nextCur(Iterator.scala:434) at scala.collection.Iterator$$anon$12.hasNext(Iterator.scala:440) at org.apache.spark.rdd.RDD$$anonfun$reduce$1$$anonfun$15.apply(RDD.scala:1010) at org.apache.spark.rdd.RDD$$anonfun$reduce$1$$anonfun$15.apply(RDD.scala:1009) at org.apache.spark.SparkContext$$anonfun$33.apply(SparkContext.scala:1980) at org.apache.spark.SparkContext$$anonfun$33.apply(SparkContext.scala:1980) at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:87) at org.apache.spark.scheduler.Task.run(Task.scala:99) at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:282) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

Please refer to Conflicting property-based creators #8. You may just need update the version you are using.

This is when GeoJSONFactory.create(String json) is used. I didn't think it to be a geospark issue, but seeing as how this issue has been resolved already in the main package, it must mean that geospark is carrying an older version that introduces the bug.

@aldayj-intific

This comment has been minimized.

Copy link
Author

commented Feb 21, 2017

Hey @jiayuasu , I worked out an easy fix for this. You'll only need to update jts2geojson from 0.7.0 to 0.10.0 in the pom.xml and that should fix this issue. I'm using a local build of it to get by, but it would be awesome if you can get this updated in maven.

@jiayuasu

This comment has been minimized.

Copy link
Member

commented Feb 21, 2017

Hi @aldayj-intific ,

I have updated the dependency and have published GeoSpark 0.5.2 snapshot onto Maven Central. It should be synced to Maven Central within several hours. Check out the coordinates here: https://github.com/DataSystemsLab/GeoSpark/wiki/GeoSpark-Maven-Central-Coordinates

@aldayj-intific

This comment has been minimized.

Copy link
Author

commented Feb 21, 2017

@jiayuasu Awesome,

Thanks for the quick update on this!

@aldayj-intific

This comment has been minimized.

Copy link
Author

commented Feb 22, 2017

Confirmed new update, everything is green!

@jiayuasu jiayuasu added this to the 0.5.2 milestone Feb 24, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.