mardi 24 mars 2015

ClassNotFound Exception: org.postgresql.Driver Using Geotool: gt-imagemosiac-jdbc-x.x.jar


I am a newbie to GIS, coming from a strict MIS background. Anyway, I have been having a little challenge for the past couple of days trying to import tiles and pyramids into my database. Using a tutorial I found here. Whenever I run this command on windows (8.1);


java -jar <your_geoserver_install_dir>/webapps/geoserver/WEB-INF/lib/gt-imagemosaic-jdbc-{version}.jar import -config <your geoserver data dir>/coverages/osm.postgis.xml -spatialTNPrefix tileosm -tileTNPrefix tileosm -dir tiles -ext png


I get this exception


java.lang.ClassNotFoundException: org.postgresql.Drive at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at org.geotools.gce.imagemosaic.jdbc.Import.start(Import.java:366) at org.geotools.gce.imagemosaic.jdbc.Toolbox.main(Toolbox.java:46)


I have already copied the postgressql driver jar file to my java runtime, lib/ext directory. which is found here; C:\java\jre7\lib\ext. I have also tried to write a java program to test for the driver and it works fine, and by the way I also have Netbeans(8.0.2) installed and the driver is working fine in there too. But I don't know why I still get that exception.





Aucun commentaire:

Enregistrer un commentaire