Hi Viatcheslav!

The quickstart has a modules example, but I have not tired it since the
introduction of ImageN.

We have talked about removing JAI18N (and internationalization) from ImageN
codebase as it does not add much value vs how much work it is to maintain.
Please report it to the ImageN issue tracker and we can discuss further.

And yes it is these kind of things we want to sort out before ImageN 1.0 is
made. Thank you very much for the feedback!
- -
Jody Garnett


On Dec 8, 2025 at 7:56:50 AM, Viatcheslav Sysoltsev <
[email protected]> wrote:

> Hi everyone,
>
> does anybody use geotools in java9-modularized project (former project
> jigsaw)? I get a problem updating from geotools-33.0 to 34.1 in regard to
> ImageN migration.
>
> Short about my project: it is gradle based and uses java modules. I could
> patch JAI using https://github.com/gradlex-org/extra-java-module-info,
> but fail so far doing it for ImageN. The test case is rather minimal and
> does not even use Geotools (but uses java modules):
>
> public static void main(String[] args) {
>        ImageN.*getDefaultInstance*();
>        ...
> }
>
> I get exception:
>
> Caused by: java.lang.ExceptionInInitializerError
> at java.base/java.lang.Class.forName0(Native Method)
> at java.base/java.lang.Class.forName(Class.java:467)
> at java.base/java.lang.Class.forName(Class.java:458)
> at [email protected]
> /org.eclipse.imagen.RegistryFileParser.getInstance(RegistryFileParser.java:187)
> at [email protected]
> /org.eclipse.imagen.RegistryFileParser.registerDescriptor(RegistryFileParser.java:312)
> at [email protected]
> /org.eclipse.imagen.RegistryFileParser.parseFile(RegistryFileParser.java:251)
> at [email protected]
> /org.eclipse.imagen.RegistryFileParser.loadOperationRegistry(RegistryFileParser.java:55)
> at [email protected]
> /org.eclipse.imagen.OperationRegistry.registerServices(OperationRegistry.java:1543)
> at [email protected]
> /org.eclipse.imagen.ThreadSafeOperationRegistry.registerServices(ThreadSafeOperationRegistry.java:529)
> at [email protected]
> /org.eclipse.imagen.OperationRegistry.initializeRegistry(OperationRegistry.java:311)
> at [email protected]
> /org.eclipse.imagen.ImageN.<clinit>(ImageN.java:351)
> at
> SSV9GUIKomponents/de.oowv.application.SSVMainWindow.main(SSVMainWindow.java:51)
> at
> java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
> ... 6 more
> Caused by: java.lang.NullPointerException: Cannot invoke
> "java.util.ResourceBundle.getString(String)" because "b" is null
> at [email protected]
> /org.eclipse.imagen.media.util.PropertyUtil.getString(PropertyUtil.java:159)
> at org.eclipse.imagen.media.affine.JaiI18N.getString(JaiI18N.java:26)
> at
> org.eclipse.imagen.media.affine.AffineDescriptor.<clinit>(AffineDescriptor.java:254)
> ... 19 more
>
> The way JaiI18N reads the resources is not compatible with modules, it has
> to use classloader of the class for which the properties are being loaded.
> I submit an issue to ImageN tomorrow, but not sure how to proceed with
> planned Geotools version update so far. Any ideas for me / experience in
> regard to the issue?
>
> With best regards
>
> Viatcheslav Sysoltsev / Slava
>
>
> _______________________________________________
> GeoTools-GT2-Users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to