Hi Spencer,

Use the maven shade plugin instead of the assembly plugin:

http://docs.geotools.org/latest/userguide/build/faq.html#how-do-i-create-an-executable-jar-for-my-geotools-app

Michael


On 29 August 2013 11:39, Spencer Bliven <[email protected]> wrote:
> Hello,
>
> I've run into a problem with loading some SMRT+ data from disk. In my
> development environment (eclipse) I am able to perfectly load the files and
> access elevation data. However, I need to deploy the app as a stand-alone
> jar file (it's a plugin to another system). In the deployment environment I
> get the exception
>
> org.opengis.referencing.NoSuchAuthorityCodeException: No code "EPSG:4326"
> from authority "EPSG" found for object of type "EngineeringCRS".
>
> Which traces back to a call
>
> CRS.decode("EPSG:4326", true);
>
> After some debugging I traced the difference between the environments back
> to a missing entry in the results from
>
> ReferencingFactoryFinder.getCRSAuthorityFactories(hints)
>
> In development this method returns 4 factories, while in production it is
> missing one called 'LongitudeFirstFactory["European Petroleum Survey
> Group"]' which clearly provides the information I need.
>
> Could anyone help me figure out why this is not being loaded when run from
> within another jar rather than being located in the classpath? I assume that
> some resource file with the EPSG spec is not being loaded correctly, but I'm
> not sure how to locate said file.
>
> BTW, I'm using the maven assembly plugin to generate my jar. It pretty much
> just combines throws all the classes and resources from dependencies into
> the target bundle, so it can have problems with common files like
> META-INF/MANIFEST.MF. I hope that's not a red herring.
>
> Thanks!
>
> -Spencer
>
> ------------------------------------------------------------------------------
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
> _______________________________________________
> GeoTools-GT2-Users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to