I am new to geotools and building a swing application displaying a WMS
layer and offering at least one tool for interaction. I developed the
application using eclipse IDE + maven and just following these [0] steps
regarding the reference system identification task.
When running with eclipse IDE everything is fine. BUT, when packed as
jar, I am getting an exception:
org.opengis.referencing.NoSuchAuthorityCodeException: No code
"EPSG:4326" from authority "EPSG" found for object of type "EngineeringCRS".
My problem is, that I have gt-epsg-hsql as direct dependency for my
application and I am building my application jar with
maven-assembly-plugin + jar-with-dependencies.
All required files are present in the final jar.
Any hints or ideas?
Did I miss any information you may need for solving my issue?
Kind regards,
Links
[0]
http://docs.geotools.org/latest/userguide/faq.html#q-how-to-choose-an-epsg-authority
Eike Hinderk Jürrens
52°North Initiative for Geospatial Open Source Software GmbH
Martin-Luther-King-Weg 24
48155 Münster, Germany
E-Mail: e.h.j...@52...
Fon: +49-(0)-251–396371-33
Fax: +49-(0)-251–396371-11
http://52north.org/
General Managers: Dr. Albert Remke, Dr. Andreas Wytzisk
Local Court Muenster HRB 10849
> I am new to geotools and building a swing application displaying a WMS
> layer and offering at least one tool for interaction. I developed the
> application using eclipse IDE + maven and just following these [0] steps
> regarding the reference system identification task.
> When running with eclipse IDE everything is fine. BUT, when packed as
> jar, I am getting an exception:
> org.opengis.referencing.NoSuchAuthorityCodeException: No code
> "EPSG:4326" from authority "EPSG" found for object of type
> "EngineeringCRS".
> My problem is, that I have gt-epsg-hsql as direct dependency for my
> application and I am building my application jar with
> maven-assembly-plugin + jar-with-dependencies.
> All required files are present in the final jar.
> Any hints or ideas?
> Did I miss any information you may need for solving my issue?
This issue has been reported under different names over and over on this
mailing list,
search for the achives.
The problem is that the GeoTools plugin system (Java own SPI, Service
Provider interface)
uses files in META-INF/services that have a predictable name, and you get
files with the
same name in different jars. All is good until you try to mix everything
into a single jar,
most of these utilities are not smart enough to handle the duplicated files
and you end up
with only the last one, whilst their contents should be merged instead
Cheers
Andrea
Our support, Your Success! Visit
http://opensdi.geo-solutions.it
for more
information.
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 962313
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------
On 15 August 2012 23:56, Andrea Aime <andre...@ge...> wrote:
> On Wed, Aug 15, 2012 at 2:47 PM, Eike Hinderk Jürrens
> <e.h.j...@52...> wrote:
>> When running with eclipse IDE everything is fine. BUT, when packed as
>> jar, I am getting an exception:
>> org.opengis.referencing.NoSuchAuthorityCodeException: No code
>> "EPSG:4326" from authority "EPSG" found for object of type
>> "EngineeringCRS".
> This issue has been reported under different names over and over on this
> mailing list,
> search for the achives.
See this item in the GeoTools FAQ for a solution using the maven shade plugin:
http://docs.geotools.org/latest/userguide/faq.html#how-do-i-create-an-executable-jar-for-my-geotools-app
Michael
Am 16.08.2012 01:21, schrieb Michael Bedward:
> On 15 August 2012 23:56, Andrea Aime <andre...@ge...> wrote:
>> On Wed, Aug 15, 2012 at 2:47 PM, Eike Hinderk Jürrens
>> <e.h.j...@52...> wrote:
>>> When running with eclipse IDE everything is fine. BUT, when packed as
>>> jar, I am getting an exception:
>>> org.opengis.referencing.NoSuchAuthorityCodeException: No code
>>> "EPSG:4326" from authority "EPSG" found for object of type
>>> "EngineeringCRS".
>> This issue has been reported under different names over and over on this
>> mailing list,
>> search for the achives.
> See this item in the GeoTools FAQ for a solution using the maven shade plugin:
> http://docs.geotools.org/latest/userguide/faq.html#how-do-i-create-an-executable-jar-for-my-geotools-app
> Michael
Thanks to the last two replies. Using your information, I established a
solution using the maven-assembly-plugin oriented at:
http://blog.xebia.com/2011/07/20/jar-with-deps-dont-like-meta-infservices/
Kind regards,
Eike Hinderk Jürrens
52°North Initiative for Geospatial Open Source Software GmbH
Martin-Luther-King-Weg 24
48155 Münster, Germany
E-Mail: e.h.j...@52...
Fon: +49-(0)-251–396371-33
Fax: +49-(0)-251–396371-11
http://52north.org/
General Managers: Dr. Albert Remke, Dr. Andreas Wytzisk
Local Court Muenster HRB 10849
> My problem is, that I have gt-epsg-hsql as direct dependency for my
> application and I am building my application jar with
> maven-assembly-plugin + jar-with-dependencies.
> All required files are present in the final jar.
I finally used the gt-epsg-wkt implementation that does not use an internal
hsql db. I think that one is sufficient for most use cases.
Cheers,
komoot GmbH
Jan Torben Heuer
Friedrich-Wilhelm-Boelcke-Straße 2
14473 Potsdam
ja...@ko...
http://www.komoot.de
Tel +49 331 2316790
Fax +49 331 2353725
Amtsgericht Potsdam HRB 23672 P
USt-IdNr. DE270695170
Geschäftsführer: Markus Hallermann
Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
More information about our ad policies
Please provide the ad click URL, if possible: