Maven should pull in everything you need with a transitive dependency
(including the java library implementing si.uom.SI). Can you share the
results of *mvn dependency:tree* from your project folder?
--
Jody Garnett


On Mon, 18 Feb 2019 at 05:30, <paul.m...@lfv.se> wrote:

> Hi,
>
> I’m sorry to bother you about such a triviality.
>
> I’m not familiar with maven an have tried to put the GeoTool jars in the
> classpath. But when I try to run my program I’m getting
>
> Exception in thread "main" java.lang.NoClassDefFoundError: si/uom/SI
>
>             at org.geotools.referencing.datum.DefaultEllipsoid.<clinit>(
> *DefaultEllipsoid.java:59*)
>
>             at
> org.geotools.referencing.datum.DefaultGeodeticDatum.<clinit>(
> *DefaultGeodeticDatum.java:73*)
>
>             at org.geotools.referencing.crs.DefaultGeographicCRS.<clinit>(
> *DefaultGeographicCRS.java:89*)
>
>             at dialog.ShapeFileWriter2.createFeatureType(
> *ShapeFileWriter2.java:44*)
>
>             at dialog.ShapeFileWriter2.shapeFileWriter(
> *ShapeFileWriter2.java:71*)
>
>
>
> The code where it explodes:
>
>             *private* *static* SimpleFeatureType createFeatureType() {
>
>                SimpleFeatureTypeBuilder builder = *new*
> SimpleFeatureTypeBuilder();
>
>                builder.setName("Location");
>
>                builder.crs(DefaultGeographicCRS.*WGS84*); // <-
>
>
>                builder.add("the_geom", Point.*class*);
>
>                builder.length(15).add("Name", String.*class*);
>
>
>                *final* SimpleFeatureType LOCATION = builder
> .buildFeatureType();
>
>                *return* LOCATION;
>
>             }
>
>
>
>
>
> I know something is wrong with my setup of gt-epsg-hsql-20.2.jar.
>
> This is the only gt.espg…jar I have in my classPath, but I have not done
> anything else with it. Could someone please point me in correct direction.
>
> Kind regards,
>
> Paul
>
>
> _______________________________________________
> GeoTools-GT2-Users mailing list
> 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
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to