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 <[email protected]<mailto:[email protected]>>
Date: Tuesday, 6 October 2015 03:31
To: Jody Garnett <[email protected]<mailto:[email protected]>>
Cc: Gabriella Turek
<[email protected]<mailto:[email protected]>>, geotools net
<[email protected]<mailto:[email protected]>>
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
<[email protected]<mailto:[email protected]>> 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
<[email protected]<mailto:[email protected]>> 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
<[email protected]>____________________________
GeoTools-GT2-Users mailing listJody Garnett <[email protected]>
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
------------------------------------------------------------------------------
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
--
Tom Kunicki | Software Engineer
w: 608 695 4251 e: [email protected]<mailto:[email protected]>
[http://s.imwx.com/ads/creatives/weather/sigs/TheWeatherCompany_2014EmailSignature.jpg]
------------------------------------------------------------------------------
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users