Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [geomesa-users] Fwd: NoSuchAuthorityCodeException: No code "EPSG:4326" from authority "EPSG" found for object of type "EngineeringCRS"

Thanks all for your help! Simply adding this dependency to the sbt build file seems to resolve the issue:

"org.geotools" % "gt-epsg-hsql" % "17.1"

I have a few other errors to debug ... once everything is working, I shall publish a blog post on this.

Best regards,
Diethard

On Mon, Jun 26, 2017 at 3:33 PM, Jim Hughes <jnh5y@xxxxxxxx> wrote:
Hi Diethard, all,

The error is due to the lack of a GeoTools EPSG factory being available on the classpath at runtime (1).  Generally, it seems that SBT has two issues to address:  first, it doesn't necessarily pull in all the transitive dependencies list POMs and second, code loaded via SPI needs some handling to preserve entries in META-INF/services. 

The SO question (2) address the latter concern.  For the former, it may suffice to add a dependency on gt-epsg-hsql or gt-epsg-wkt.  The HSQL version of the library is preferable since it has a few more codes. 

That said, there are some caveats.  I have seen mismatches between the version of HSQL that GeoTools uses and versions available in Hadoop.  Also, HSQL sets up a temp directory in a common (yet configurable!) location.  For a system where multiple users are going to use the GeoMesa tools, some care may be required.  If those problems prove too much, one can try out the gt-epsg-wkt option instead.

Cheers,

Jim

1.  More info about the EPSG options in GeoTools.  http://docs.geotools.org/stable/userguide/library/referencing/index.html

2.  https://stackoverflow.com/questions/27429097/geotools-cannot-find-hsql-epsg-db-throws-error-nosuchauthoritycodeexception


On 06/25/2017 06:24 PM, Andrew Morgan wrote:
Hi Diethart,

Matt had a look - and responded with the notes below:
Hope that helps.

Andrew


Begin forwarded message:

From: Matthew Hallett <matts.mail.2008@xxxxxxxxx>
Subject: Re: [geomesa-users] NoSuchAuthorityCodeException: No code "EPSG:4326" from authority "EPSG" found for object of type "EngineeringCRS"
Date: 25 June 2017 23:18:23 BST
To: Andrew Morgan <andrew@xxxxxxxxxxxx>

We don't use SBT, the example uses Maven - so that suggests a possible build problem right away as there has been some translation.

looking here: http://osgeo-org.1560.x6.nabble.com/Facing-NoSuchAuthorityCodeException-problem-when-deployed-GeoTools-on-server-td4885362.html - The error appears to be related to a missing dependency, at least in that case .

https://dev.locationtech.org/mhonarc/lists/geomesa-users/msg00058.html outlines the exact issue and solution also (missing dependency)

My code doesn't go anywhere near EPSG:4326, its part of the Geomesa code used to create and write to a Datastore.

So it must be the way the dependencies are done, although I dont know how to fix the SBT example given unfortunately.

Matt





On 25 June 2017 at 13:36, Andrew Morgan <andrew@xxxxxxxxxxxx> wrote:
Matt,

A question came up from a reader about the geomesa writer to spark.
Andrew

Sent from my iPhone

Begin forwarded message:

From: Diethard Steiner <diethard.steiner@xxxxxxxxx>
Date: 25 June 2017 at 11:43:36 BST
To: Geomesa User discussions <geomesa-users@xxxxxxxxxxxxxxxg>
Subject: [geomesa-users] NoSuchAuthorityCodeException: No code "EPSG:4326" from authority "EPSG" found for object of type "EngineeringCRS"
Reply-To: Geomesa User discussions <geomesa-users@xxxxxxxxxxxxxxxg>

Hi,

I am trying to get an Spark Ingestion Example going, which is based on your original MapReduce example as well as some code from the "Mastering Spark for Data Science".
I am using sbt. The `build.sbt` file has a simple `first` merge strategy defined (code available here). The scala code is available here.

I build the fat jar and then run it on Spark like so:

```bash
sbt clean assembly
# submit job
spark-submit --master local[4] \
  --class examples.IngestDataWithSpark \
  target/scala-2.11/GeoMesaSparkExample-assembly-0.1.jar
```

Then I get an error returned:

```
NoSuchAuthorityCodeException: No code "EPSG:4326" from authority "EPSG" found for object of type "EngineeringCRS"
```

This Stackoverflow thread indicates that the merge strategy might not be correct, but I couldn't resolve the issue. I'd appreciate if you could point out the solution.

Best regards,
Diethard
_______________________________________________
geomesa-users mailing list
geomesa-users@xxxxxxxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.locationtech.org/mailman/listinfo/geomesa-users




_______________________________________________
geomesa-users mailing list
geomesa-users@xxxxxxxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.locationtech.org/mailman/listinfo/geomesa-users



_______________________________________________
geomesa-users mailing list
geomesa-users@xxxxxxxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.locationtech.org/mailman/listinfo/geomesa-users


Back to the top