Hi Andrea, 

That's exactly my point. I  do assume that it was not intended for these two to 
coexist, but it should just work fine because there are two different 
registries and the operations interfaces are different, so in theory these two 
do not collide at all. That gives all users a good "workaround" to live with 
until applications and libraries have succeeded to migrate. 

And that's also exactly where my PR comes in. The three mentioned ImageN 
libraries (and only those three!) contain ServiceLoader definitions that are 
wrong. The register the ImageN operations at the JAI registry. That leads to 
class cast exceptions (wrong interfaces). That's the point that must definitely 
be fixed whatsoever.

Now that fixed, here arises the second aspect: Right now you cannot mix 
standard ImageN and ServiceLoader registration. ImageN does not support that. 
It will fail to initialize if one operation had already been registered by that 
other means. So you must decide: either support multiple ways of registration 
in the ImageN core or decide upon one and let it go. 

Therefore my PR removes the three ServiceLoader definitions: 1) because they 
were wrong and 2) because that is the least invasive fix to make ImageN 
initialize correctly. The PR#119 was tested locally running GeoServer 2.2.8.0 
and another application that uses JAI and it worked just fine.

I hope you can agree that this is a proper fix and should be part in one of the 
next releases. For us it is a show-stopper for upgrading to GT 33.x / GS 
2.28.x. 

Thanks!
Sören

-----Ursprüngliche Nachricht-----
Von: Andrea Aime <[email protected]> 
Gesendet: Freitag, 31. Oktober 2025 15:25
An: Kalesse Sören <[email protected]>
Cc: GeoTools Users <[email protected]>
Betreff: Re: [Geotools-gt2-users] GeoTools 34.0 released for Java 17 with 
Eclipse ImageN processing engine

Hi,
I second what Jody said, there was no plan to make the coexist, it's an upgrade 
path.
However... I believe that a coexistence could be possible, the java packages
are different, so by having ImageN use a different file name for the registry 
files in META-INF, 
from registryFile.jai to registryFile.imagen, a coexistence might be possible, 
even if likely
wasteful (two separate image processing caches in memory are not the greatest 
of ideas).

A coexistence is just not in our plans, but since ImageN is not yet available 
as 1.0, if DWD wants
to put the development effort to get it done, I would not be against it.
I see this applicable to the GeoServer 3.0 series.

I would recommend switching existing software to ImageN though, we prepared 
migration scripts
that should help in the endeavor.

Regards,

Andrea Aime




==


GeoServer Professional Services from the experts!

Visit http://bit.ly/gs-services-us <http://bit.ly/gs-services-us>  for more 
information.



==

Ing. Andrea Aime 
@geowolf
Technical Lead



GeoSolutions Group
phone: +39 0584 962313

fax:     +39 0584 1660272

mob:   +39  339 8844549


https://www.geosolutionsgroup.com/ 
<https://ofcsg2dvf1.dwd.de/fmlurlsvc/?fewReq=:B:JVs5MjYyOSV1PjEtMyVqZz4zMjkzMiVwamRtYnd2cWY+Ozs6OjQ2MTAyM2Y1MDU1NjQxZzFiOzUwMWA0ZjAwZzQwNzA6ZTY2NCV3PjI0NTI6MTM0OzolcmpnPjY6VUZSV3FGMzEyMTswLjY6VUZSV3FFMzEyMTswJXFgc3c+UGxmcWZtLUhib2ZwcGZDZ3RnLWdmJWA+NjEla2dvPjM=&url=https%3a%2f%2fwww.geosolutionsgroup.com%2f>
 

http://twitter.com/geosolutions_it 
<https://ofcsg2dvf1.dwd.de/fmlurlsvc/?fewReq=:B:JVs5MjYyOSV1PjEtMyVqZz4zMjkzMiVwamRtYnd2cWY+MDplNTQ7ZzM6YTozNmU7NGY1OjtmZzdnYTIzYjIwYmJmNGU2MDBgZiV3PjI0NTI6MTM0OzolcmpnPjY6VUZSV3FGMzEyMTswLjY6VUZSV3FFMzEyMTswJXFgc3c+UGxmcWZtLUhib2ZwcGZDZ3RnLWdmJWA+MDQla2dvPjM=&url=http%3a%2f%2ftwitter.com%2fgeosolutions_it>
 

-------------------------------------------------------


Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 
2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa 
che ogni circostanza inerente alla presente email (il suo contenuto, gli 
eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i 
destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per 
errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei 
comunque grato se potesse darmene notizia.

This email is intended only for the person or entity to which it is addressed 
and may contain information that is privileged, confidential or otherwise 
protected from disclosure. We remind that - as provided by European Regulation 
2016/679 “GDPR” - copying, dissemination or use of this e-mail or the 
information herein by anyone other than the intended recipient is prohibited. 
If you have received this email by mistake, please notify us immediately by 
telephone or e-mail



On Thu, Oct 30, 2025 at 5:29 PM Kalesse Sören <[email protected] 
<mailto:[email protected]> > wrote:


        Hi,
        
        thanks for the new release! We have noticed a problem though, that 
deals with environments where GeoTools (and now ImageN) and JAI are used at the 
same time. I have documented the issue at 
https://github.com/eclipse-imagen/imagen/issues/118 
<https://ofcsg2dvf1.dwd.de/fmlurlsvc/?fewReq=:B:JVs5MjYyOSV1PjEtMyVqZz4zMjkzMiVwamRtYnd2cWY+NDE1YDExNTs1ZjpnNTEwZzIyZmU7NmE7O2ZmZWFgYjJnMzA0NmY1NSV3PjI0NTI6MTM0OzolcmpnPjY6VUZSV3FGMzEyMTswLjY6VUZSV3FFMzEyMTswJXFgc3c+UGxmcWZtLUhib2ZwcGZDZ3RnLWdmJWA+NjEla2dvPjM=&url=https%3a%2f%2fgithub.com%2feclipse-imagen%2fimagen%2fissues%2f118>
  and there is a PR attached https://github.com/eclipse-imagen/imagen/pull/119 
<https://ofcsg2dvf1.dwd.de/fmlurlsvc/?fewReq=:B:JVs5MjYyOSV1PjEtMyVqZz4zMjkzMiVwamRtYnd2cWY+ZmVgNDplZTRlYWY0NWUzZ2BlMjA3M2UzZTU1MGdmNjQ6Zzc1MGdnNyV3PjI0NTI6MTM0OzolcmpnPjY6VUZSV3FGMzEyMTswLjY6VUZSV3FFMzEyMTswJXFgc3c+UGxmcWZtLUhib2ZwcGZDZ3RnLWdmJWA+NjEla2dvPjM=&url=https%3a%2f%2fgithub.com%2feclipse-imagen%2fimagen%2fpull%2f119>
 . 
        
        I wonder if there's any chance the problem can be solved soon as it 
currently prevents us from upgrading to GeoServer 2.28.x. 
        
        Thanks and Best Regards
        Sören 
        
        -----Ursprüngliche Nachricht-----
        Von: Jody Garnett <[email protected] 
<mailto:[email protected]> > 
        Gesendet: Mittwoch, 22. Oktober 2025 20:57
        An: GeoTools Users <[email protected] 
<mailto:[email protected]> >
        Betreff: [Geotools-gt2-users] GeoTools 34.0 released for Java 17 with 
Eclipse ImageN processing engine
        
        The GeoTools team is pleased to announce the release 
<https://ofcsg2dvf1.dwd.de/fmlurlsvc/?fewReq=:B:JVE3PDg8Nyt7MD8jPStkaTA9PDc9PCt+ZGpjbHl4f2gwazk7bj5uNG8+Oj5saW5ub2s4NT5raW5paWg+bGw+bjs0OT41azw9PCt5MDw6Ozw8ODQ1OjsrfGRpMDg0QEc5bGFpPT85NDs4IDg0QEc5bGFoPT85NDs4K39ufXkwXmJof2hjI0ZsYWh+fmhNaXppI2loK24wNT0rZWlhMD0=&url=https%3a%2f%2fgeotoolsnews.blogspot.com%2f2025%2f10%2fgeotools-340-release.html>
  of the latest stable version of GeoTools 34.0 
<https://ofcsg2dvf1.dwd.de/fmlurlsvc/?fewReq=:B:JVE3PDg8Nyt7MD8jPStkaTA9PDc9PCt+ZGpjbHl4f2gwbDU1azU5OWhpaT9sbG5rPTRuPmw9ND9rOWg7NGhuPDU9Oz88aWtsOit5MDw6Ozw8ODQ1OjsrfGRpMDg0QEc5bGFpPT85NDs4IDg0QEc5bGFoPT85NDs4K39ufXkwXmJof2hjI0ZsYWh+fmhNaXppI2loK24wOD8rZWlhMD0=&url=https%3a%2f%2fsourceforge.net%2fprojects%2fgeotools%2ffiles%2fGeoTools%252034%2520Releases%2f34.0%2f>
 . This release is available from the repo.osgeo.org 
<https://ofcsg2dvf1.dwd.de/fmlurlsvc/?fewReq=:B:JVs5MjYyOSV1PjEtMyVqZz4zMjkzMiVwamRtYnd2cWY+YGFhNzE3MmAxNDM1YmJlNjNhOzpiYTpiYjc6NGU6N2BiNTRiOjQyZiV3PjI0NTI6MTM0OzolcmpnPjY6VUZSV3FGMzEyMTswLjY6VUZSV3FFMzEyMTswJXFgc3c+UGxmcWZtLUhib2ZwcGZDZ3RnLWdmJWA+NjEla2dvPjM=&url=http%3a%2f%2frepo.osgeo.org>
  
<https://ofcsg2dvf1.dwd.de/fmlurlsvc/?fewReq=:B:JVE3PDg8Nyt7MD8jPStkaTA9PDc9PCt+ZGpjbHl4f2gwbGw0Pms+O2g7NDs/aD84NT47PjloPj48O2g6PGw7OGxpbDg+aG44byt5MDw6Ozw8ODQ1OjsrfGRpMDg0QEc5bGFpPT85NDs4IDg0QEc5bGFoPT85NDs4K39ufXkwXmJof2hjI0ZsYWh+fmhNaXppI2loK24wOD8rZWlhMD0=&url=http%3a%2f%2frepo.osgeo.org>
  and is made in conjunction with ImageN 0.9.0, ImageIO-Ext 2.0.0, GeoWebCache 
1.28.0, and GeoServer 2.28.0.
        
        This is a major update:
        
        *       The library now requires Java 17, ending support for Java 11
        
        *       Upgrade from Java Advanced Imaging Library 1.1.3 to Eclipse 
ImageN 0.9.0.
        
        *       Library now provides a maven bill-of-materials import for both 
library modules and third-party-dependences making it considerably easier for 
downstream projects to synchronize dependences when upgrading GeoTools
        
        *       For more information please see upgrade instructions 
<https://ofcsg2dvf1.dwd.de/fmlurlsvc/?fewReq=:B:JVE3PDg8Nyt7MD8jPStkaTA9PDc9PCt+ZGpjbHl4f2gwNDk1bjo7P2s0bms0OTk9aTo+a287a2k8PzlvbjhuaTw9PjtoPj81NSt5MDw6Ozw8ODQ1OjsrfGRpMDg0QEc5bGFpPT85NDs4IDg0QEc5bGFoPT85NDs4K39ufXkwXmJof2hjI0ZsYWh+fmhNaXppI2loK24wOD8rZWlhMD0=&url=https%3a%2f%2fdocs.geotools.org%2fstable%2fuserguide%2fwelcome%2fupgrade.html>
  in the user manual
        
        Thanks to Jody Garnett (GeoCat) for making this release, Gabriel Roldan 
(Camptocamp) for all the build improvements, and Andrea Aime (GeoServer) for 
working so hard on the Eclipse ImageN migration.
        
        These major library updates were undertaken as part of the GeoServer 3 
activities, and we would like to the crowdfunding sponsors their financial 
support.
        
        _______________________________________________
        GeoTools-GT2-Users mailing list
        [email protected] 
<mailto:[email protected]> 
        https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users 
<https://ofcsg2dvf1.dwd.de/fmlurlsvc/?fewReq=:B:JVs5MjYyOSV1PjEtMyVqZz4zMjkzMiVwamRtYnd2cWY+Zmc0OmBnYDViNTA1NDdmMzMyNTQ6ZmIxYmcxNTJnNTMyNGJiNDU2NiV3PjI0NTI6MTM0OzolcmpnPjY6VUZSV3FGMzEyMTswLjY6VUZSV3FFMzEyMTswJXFgc3c+UGxmcWZtLUhib2ZwcGZDZ3RnLWdmJWA+NjEla2dvPjM=&url=https%3a%2f%2flists.sourceforge.net%2flists%2flistinfo%2fgeotools-gt2-users>
 
        


_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to