Hi Justin, Any chance you can help Andy here? Andy can you supply a
JIRA report on this, Justin is trying to improve things now that
GeoServer is slated to makes use of this code.
Cheers,
Jody
> If you add a shapefile service with a file that doesnt exist
> you get a Null pointer exception instead of a file not found exception
>
> in a class that extends DefaultCatalog
> ...
> shapeUri = new URI("file:///home/andy/shp/Muni_Ant.shp"); Map params=new
> HashMap();
> params.put("url",new URL("file://home/andy/shp/Muni_Ant.shp")); // note
> there are only 2 / there should be 3
> Service service=new ShapefileService(this,shapeUri,params);
> add(service);
> ...
> later on in the service getInfo method:
>
> Exception in thread "main" java.lang.NullPointerException
> at org.geotools.catalog.shapefile.ShapefileGeoResource.getInfo
> (ShapefileGeoResource.java:101)
> at com.hazlorealidad.geo.GeoCatalog.main(GeoCatalog.java:193)
>
> In several other places I encountered a NPE when trying to develop a
> Catalog (really because I didnt know what I was doing) and had to
> download the source to find out what the real problem was. Not something
> everyone would want to do.
>
> It would be cool when rethrowing an exception in the catalog api to add
> the last one as a nested exception.
>
> Thanks to all the developers for your hard work.
>
> Andy Bailey
> Hazlorealidad.com
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Geotools-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-devel
>
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel