[SOLVED]
I'm still not sure what the "right" way to do this is, but the following
solved my specific problems:
OperationRegistry registry =
JAI.getDefaultInstance().getOperationRegistry();
new ImageReadWriteSpi().updateRegistry(registry);
That code covers the operation in
/META-INF/services/javax.media.jai.OperationRegistrySpi, but not the three
in /META-INF/registryFile.jai. Probably these would have to be handled as
well when loaded some other specialized image types, but they weren't
required for GTopo30 files.
Thanks for the help, Michael!
-Spencer
On Sat, Aug 31, 2013 at 11:58 AM, Spencer Bliven <[email protected]> wrote:
> Progress! The operation registry I was getting the exception from gets
> loaded from a GeoTools resource, META-INF/registryFile.jai. The comments
> mention that org.geotools.image.jai.Registry.
> registerGeotoolsServices(OperationRegistry) needs to be called when using
> a custom classloader. That would be great, except the relevant method has
> been removed.
>
> Anyone here know what the proper way to register Geotools services is in
> geotools 10?
>
> -Spencer
>
>
> On Fri, Aug 30, 2013 at 2:52 PM, Spencer Bliven <[email protected]> wrote:
>
>> Trying to isolate the problem, I've found that GeoTools works fine for me
>> when the jar gets called normally (eg java -jar ...). Unfortunately I'm
>> trying to deploy as a plugin to a larger system that seems to be using a
>> custom ClassLoader to run the jar. I'm guessing that's where things are
>> going wrong for me. The custom loader finds the jai_imageio from my shaded
>> jar, but it doesn't do whatever configuration steps are necessary to set up
>> the 'operation registry' for the native-library parts of jai (in
>> jai_core.jar).
>>
>> I guess I'll try to contact the ClassLoader authors and see if they have
>> suggestions. Please let me know if you have any additional ideas.
>>
>> -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=58041391&iu=/4140/ostg.clktrk
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users