Hi,
  I’m getting a weird set of warnings in Geotools 15.0 that I don’t seem to 
understand. Specifically “class not found errors” that related to classes that 
I can’t see exist in the Geotools javadoc. "Cause is "NoClassDefFoundError: 
org/opengis/util/Factory.”  I don’t see an entry for org.opengis.utis.factory 
here 
(http://docs.geotools.org/stable/javadocs/org/opengis/util/package-summary.html).
  Does anyone know (a) what maven package it’s in, or (b) how to fix?


thanks,

code and error below:

Code:

        try {
        logger.info("infO: {} {} ({})", dataStore.getInfo().getTitle(), 
dataStore.getInfo().getDescription(), dataStore.getInfo().getKeywords());
        } catch (Error e) {
            logger.warn("exception in shapefile processing", e);
        }
        FeatureSource<?, ?> featureSource = 
dataStore.getFeatureSource(typeName);
        FeatureCollection<?, ?> collection = featureSource.getFeatures();
        FeatureIterator<?> iterator = collection.features();
        
                …

        FeatureJSON fjson = new FeatureJSON();
        FeatureCollection<?, ?> collection = collection_;
        CoordinateReferenceSystem crs = 
collection.getSchema().getCoordinateReferenceSystem();
        logger.debug("{}", collection.getSchema());
        logger.debug("crs: {}", crs);
        try {
            if (crs != null) {
                collection = new 
ReprojectingFeatureCollection((FeatureCollection) collection, crs, 
CRS.decode("EPSG:4326"));
            }
            setGeoJsonFile(new File(System.getProperty("java.io.tmpdir"), 
FilenameUtils.getBaseName(getDatabaseFile().getName()) + ".json"));
            FileWriter writer = new FileWriter(getGeoJsonFile());
            fjson.writeFeatureCollection(collection, writer);
            IOUtils.closeQuietly(writer);
        } catch (IOException | FactoryException e) {
            logger.error("could not convert dataset to GeoJSON", e);
        }


Log Entry:
INFO  2016-06-28 11:23:21,837 234585 [qtp1011246131-43 []] 
(ShapeFileDatabaseConverter.java:122) 
org.tdar.db.conversion.converters.ShapeFileDatabaseConverter - infO: null 
Features from ShapefileDataStore (null)
Jun 28, 2016 11:23:21 AM org.geotools.factory.FactoryRegistry scanForPlugins
WARNING: Can't load a service for category "CRSFactory". Cause is 
"NoClassDefFoundError: org/opengis/util/Factory".
Jun 28, 2016 11:23:21 AM org.geotools.factory.FactoryRegistry scanForPlugins
WARNING: Can't load a service for category "DatumFactory". Cause is 
"NoClassDefFoundError: org/opengis/util/Factory".
Jun 28, 2016 11:23:21 AM org.geotools.factory.FactoryRegistry scanForPlugins
WARNING: Can't load a service for category "MathTransformFactory". Cause is 
"NoClassDefFoundError: org/opengis/util/Factory".
DEBUG 2016-06-28 11:23:22,067 234815 [qtp1011246131-43 []] 
(ShapeFileDatabaseConverter.java:201) 
org.tdar.db.conversion.converters.ShapeFileDatabaseConverter - 
SimpleFeatureTypeImpl SitePolylines identified extends 
lineFeature(the_geom:MultiLineString,FID_:FID_,Entity:Entity,Layer:Layer,Color:Color,Linetype:Linetype,Elevation:Elevation,LineWt:LineWt,RefName:RefName)
DEBUG 2016-06-28 11:23:22,116 234864 [qtp1011246131-43 []] 
(ShapeFileDatabaseConverter.java:202) 
org.tdar.db.conversion.converters.ShapeFileDatabaseConverter - crs: 
GEOGCS["GCS_WGS_1984", 
  DATUM["D_WGS_1984", 
    SPHEROID["WGS_1984", 6378137.0, 298.257223563]], 
  PRIMEM["Greenwich", 0.0], 
  UNIT["degree", 0.017453292519943295], 
  AXIS["Longitude", EAST], 
  AXIS["Latitude", NORTH]]
Jun 28, 2016 11:23:22 AM org.geotools.factory.FactoryRegistry scanForPlugins
WARNING: Can't load a service for category "CSFactory". Cause is 
"NoClassDefFoundError: org/opengis/util/Factory".
Jun 28, 2016 11:23:23 AM org.geotools.factory.FactoryRegistry scanForPlugins
WARNING: Can't load a service for category "CoordinateOperationFactory". Cause 
is "NoClassDefFoundError: org/opengis/util/Factory".
-- 
_________________________________________________________
Adam Brin
Director of Technology, Digital Antiquity
480.965.1278

------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to