Hi,

the GeoTools 14-RC1 
(http://sourceforge.net/projects/geotools/files/GeoTools%2014%20Releases/14-RC1/geotools-14-RC1-bin.zip)
 is missing the JAR file jt-utilities-1.0.6.jar.
After downloading the library (can’t find the download link anymore, see 
https://github.com/geosolutions-it/jai-ext) the exception was gone.


Andrej


Von: Gabriella Turek [mailto:gabriella.tu...@niwa.co.nz]
Gesendet: Montag, 5. Oktober 2015 23:46
An: geotools net
Betreff: Re: [Geotools-gt2-users] Issues upgrading to 14.0 on MacOSX

Hi Tom, Jody,
I’ve tried moving the JAI as suggested, but as I mentioned before this seems to 
make no difference. I am using jdk 1.8.0_60. I still get the same error message 
even though the path now only contains the jai that comes with the geotools 
14.0.
I was not aware that I needed extra command line options to to see the jai jars 
included in the SDK, everything works hunky dory “as is”  with geotools 13.2 
(so from what you are saying that version is either not using JAI – hard to 
believe - or is perfectly happy with the system’s JAI)
I am running a simple test:


    //System.setProperty("org.geotools.coverage.jaiext.enabled", "true");

    GridCoverage2D gc = GeoToolsUtils.readAsciiGridFile(new 
File(getClass().getResource("asciitest1.asc").getFile()));

    double[] mins = GeoToolsUtils.getMinimums(gc);

    double[] maxs = GeoToolsUtils.getMaximums(gc);

    Double noData = (Double) gc.getProperties().get("GC_NODATA");

    assertTrue(mins[0] == noData);

    assertTrue(maxs[0] == 0.76245);



As per a previous posting, I want to move to 14 so I can take advantage of the 
enhanced ASCII grid file handling. It seems that I cannot. I have not tried 
this on another platform, but it’s a concern :-(

Gaby


From: Tom Kunicki <tom.kuni...@weather.com<mailto:tom.kuni...@weather.com>>
Date: Tuesday, 6 October 2015 03:31
To: Jody Garnett <jody.garn...@gmail.com<mailto:jody.garn...@gmail.com>>
Cc: Gabriella Turek 
<gabriella.tu...@niwa.co.nz<mailto:gabriella.tu...@niwa.co.nz>>, geotools net 
<geotools-gt2-users@lists.sourceforge.net<mailto:geotools-gt2-users@lists.sourceforge.net>>
Subject: Re: [Geotools-gt2-users] Issues upgrading to 14.0 on MacOSX

Gabriella,

OS X ships with a JAI implementation that's inserted into the default system 
classpath.  This JAI version has traditionally caused me issues and the first 
thing I do on a new Mac is move it aside. If you'd wish to try this:

cd /System/Library/Java/Extensions/
sudo mkdir DISABLED
sudo mv *jai* DISABLED

On Mon, Oct 5, 2015 at 2:28 AM, Jody Garnett 
<jody.garn...@gmail.com<mailto:jody.garn...@gmail.com>> wrote:
I have not run into a problem yet, take a look at your eclipse class path. If 
it is an OSGi app for example you need extra command line options to allow it 
to see the JAI jars included in the SDK. Even for a normal Java app you may get 
out of sync when updating the version of Java on your system, double check the 
Java Runtime listed in eclipse and confirm the correct jars are listed.

--
Jody Garnett

On 1 October 2015 at 15:56, Gabriella Turek 
<gabriella.tu...@niwa.co.nz<mailto:gabriella.tu...@niwa.co.nz>> wrote:
I am trying to update my geotools libraries from 13.2 to 14.0 in order to
take advantage of the extended ARC Grid raster support.
However I am now running into some issues which I never had before:

java.lang.NoClassDefFoundError: Could not initialize class
javax.media.jai.JAI
        at
org.geotools.gce.arcgrid.ArcGridReader.createCoverage(ArcGridReader.java:48
7)
        at org.geotools.gce.arcgrid.ArcGridReader.read(ArcGridReader.java:398)
        at 
riskscape.util.GeoToolsUtils.readAsciiGridFile(GeoToolsUtils.java:369)
        at
riskscape.util.GeoToolsUtilsTest.testReadStandardFile(GeoToolsUtilsTest.jav
a:598)
…..


The jai jars are there, but the Java SDK also has jai jars. Removing the
geotool ones, I still get the same error, hum.
I am using Eclipse. This was not happening with 13.2
Gaby


------------------------------------------------------------------------------
___________________Tom Kunicki 
<tom.kuni...@weather.com>____________________________
GeoTools-GT2-Users mailing listJody Garnett <jody.garn...@gmail.com>
GeoTools-GT2-Users@lists.sourceforge.net<mailto:GeoTools-GT2-Users@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users


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

_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net<mailto:GeoTools-GT2-Users@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users



--
 Tom Kunicki    |    Software Engineer
w: 608 695 4251 e: tom.kuni...@weather.com<mailto:tom.kuni...@weather.com>
[Das Bild wurde vom Absender entfernt.]


------------------------------------------------------------------------------
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to