From: Jeff S. <jef...@ne...> - 2010-12-14 01:12:25
|
Simone, Thanks for your help. The problem that some of the dlls reference other dlls, and they do not look in the -Djava.library.path. The users that user our software may not have permissions to edit the classpath (or may not know how to). I used DependencyWalker to figure out which libs depend on which other ones. Explicitly calling System.loadLibrary on each of those libraries fixed the problem. Thanks, Jeff -----Original Message----- From: sim...@gm... [mailto:sim...@gm...] On Behalf Of Simone Giannecchini Sent: Monday, December 13, 2010 5:40 PM To: Jeff Storey Cc: geo...@li... Subject: Re: [Geotools-gt2-users] JP2MrSIDReader Unsatisified Linked Error Ciao Jeff, I guess you took the native libs from here: https://imageio-ext.dev.java.net/files/documents/7505/144606/imageio-ext-1.0.5-windows32-dlls.zip If so, I would try to unzip in a directory and run a gdalinfo -- formats to get the list of supported formats and confirm that JP2MrSid is supported. That said, I would also add the directory where you unzip your files to the windows PATH variable. Let me know if that helps. Ciao, Simone. ------------------------------------------------------- Ing. Simone Giannecchini GeoSolutions S.A.S. Founder Via Poggio alle Viti 1187 55054 Massarosa (LU) Italy phone: +39 0584962313 fax: +39 0584962313 mob: +39 333 8128928 http://www.geo-solutions.it http://geo-solutions.blogspot.com/ http://www.linkedin.com/in/simonegiannecchini http://twitter.com/simogeo ------------------------------------------------------- On Mon, Dec 13, 2010 at 6:58 PM, Jeff Storey <jef...@ne...> wrote: > Hi, > > > > I'm trying to run a basic test using the JP2MrSIDReader and I am getting an > unsatisfied link error (stack below). The line of code throwing the error > is: > > > > JP2MrSIDReader reader = new JP2MrSIDReader(new File("C:\\myfile.jp2")); > > > > And the stack trace I'm seeing is: > > Dec 13, 2010 12:48:55 PM it.geosolutions.imageio.gdalframework.GDALUtilities > loadGDAL > > WARNING: Failed to load the GDAL native libs. This is not a problem unless > you need to use the GDAL plugins: they won't be > enabled.java.lang.UnsatisfiedLinkError: no gdaljni in java.library.path > > Dec 13, 2010 12:48:56 PM it.geosolutions.util.KakaduUtilities loadKakadu > > WARNING: Failed to load the Kakadu native libs. This is not a problem unless > you need to use the Kakadu plugin: it won't be enabled. > java.lang.UnsatisfiedLinkError: no kdu_jni in java.library.path > > Native library load failed. > > java.lang.UnsatisfiedLinkError: no gdalconstjni in java.library.path > > Exception in thread "main" java.lang.UnsatisfiedLinkError: > org.gdal.gdalconst.gdalconstJNI.GDT_Unknown_get()I > > at org.gdal.gdalconst.gdalconstJNI.GDT_Unknown_get(Native > Method) > > at > org.gdal.gdalconst.gdalconstConstants.<clinit>(gdalconstConstants.java:12) > > at > it.geosolutions.imageio.gdalframework.GDALImageReader.setInput(GDALImageReader.java:818) > > at javax.imageio.ImageReader.setInput(ImageReader.java:363) > > at > org.geotools.coverageio.BaseGridCoverage2DReader.<init>(BaseGridCoverage2DReader.java:196) > > at > org.geotools.coverageio.gdal.BaseGDALGridCoverage2DReader.<init>(BaseGDALGridCoverage2DReader.java:82) > > at > org.geotools.coverageio.gdal.jp2mrsid.JP2MrSIDReader.<init>(JP2MrSIDReader.java:66) > > at > org.geotools.coverageio.gdal.jp2mrsid.JP2MrSIDReader.<init>(JP2MrSIDReader.java:50) > > > > I have the native library folder in my -Djava.library.path, and that folder > contains the dlls for win 32 that I got from the ImageIO-Ext project for > version 1.0.5. I am using GeoTools 2.6.5. > > > > Does anyone know why this is happening? > > > > Thanks, > > Jeff > > ------------------------------------------------------------------------------ > Lotusphere 2011 > Register now for Lotusphere 2011 and learn how > to connect the dots, take your collaborative environment > to the next level, and enter the era of Social Business. > http://p.sf.net/sfu/lotusphere-d2d > _______________________________________________ > Geotools-gt2-users mailing list > Geo...@li... > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > > |