This is one for the coverage gurus really (Simone, Andrea et al) and
you should treat what follows as stab-in-the-dark advice...
Does jai_imagio end up in your uber jar and/or is it on the classpath
? I was under the impression that the ImageRead operation leads to
On 30 August 2013 12:12, Spencer Bliven <sbliven@...> wrote:
> Thanks for the advice. I switched to the shade plugin. That fixed the
> problem with the CRS, but I'm still getting some errors from JAI when it
> goes to actually read the image. It seems that the "ImageRead" operation
> isn't included in the JAI operation registry, which I presume gets
> initialized from a file.
> java.lang.IllegalArgumentException: ImageRead: No OperationDescriptor is
> registered in the current operation registry under this name.
> at javax.media.jai.JAI.createNS(JAI.java:1074)
> at javax.media.jai.JAI.create(JAI.java:977)
> at org.geotools.gce.gtopo30.GTopo30Reader.read(GTopo30Reader.java:352)
> After doing some reflection it looks like the JAI class is being loaded from
> my System's jai_core.java, even though shade is including its own copy in
> the jar. I was a little surprised that JAI isn't standard on the default
> classpath, but if I add a shade rule to exclude 'javax.media:*' I get errors
> even earlier.
> I realize this is getting more into a packaging question and less of a
> geotools question, but I really appreciate the help!
> On Wed, Aug 28, 2013 at 8:13 PM, Michael Bedward <michael.bedward@...>
>> Hi Spencer,
>> Use the maven shade plugin instead of the assembly plugin:
>> On 29 August 2013 11:39, Spencer Bliven <sbliven@...> 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
>> > GeoTools-GT2-Users@...
>> > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users